<% # encoding: utf-8 %>

<%= flash_messages %>

<h1 class="h1"><%= @page.title rescue nil %></h1>

<% if !params[:name].blank?%>
 	<%= t("search.unit_get",:unit_name => UnitListForAnc.find(params[:name]).title,:item_num=>@news_bulletins.count) %>
<% end %>

<% if @news_bulletins.blank? and !params[:search_query].blank? %>
	<%=render :partial => 'shared/search_not_found'  %>
<% elsif  !params[:search_query].blank?  %>
  	<%= t("search.result_get",:search_word => params[:search_query],:item_num=>@news_bulletins.count) %>
<% end %>
<table class="table table-bordered">
	<tbody>
		<tr>
			<th class="span2"><%= t('news_bulletin.news_bulletin.image') %></th>
			<th><%= t(:text) %></th>
			<th class="span2 pagination-right"><%= t('news_bulletin.news_bulletin.postdate') %></th>
		</tr>
		<% @news_bulletins.each do |post| %>
		<tr>
			<td class="img"><%= image_tag post.image.url %></td>
			<td>
				<%= link_to post.title, panel_news_front_end_news_bulletin_path(post), :class => 'news_title' %>
				<%= post.subtitle.html_safe rescue '' %>
			</td>
			<td class="date"><%= display_date(post.postdate) %></td>
		</tr>
		<% end %> 
	</tbody>
</table>

<%= paginate @news_bulletins, :param_name => :page_main, :params => {:inner => 'false'} %>

