<% # encoding: utf-8 %>

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

	<table class="table table-bordered">
	  <tr>
	      <%= content_tag (:th) do %>
			<%= t('announcement.bulletin.category') %>
		<% end  if (!params[:search_query].blank? or params[:category_id].blank?)-%>
		<th><%= t('announcement.bulletin.title') %></th>
		<th><%= t('announcement.bulletin.postdate') %></th>
	  </tr>

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

<%= render :partial => 'shared/search_header',:locals=>{:items=>@bulletins}  %>

	<% @bulletins.each do |post| %>
	  <tr>
		<td><%= post.category.title rescue nil %></td>
		<td><%= link_to post.title, panel_announcement_front_end_bulletin_path(post, :category_id => post.category_id) %>
		<%#= link_to post.title, panel_announcement_back_end_bulletin_path(post) %>
		</td>
		<td><%= display_date_time(post.postdate) %></td>
	  </tr>
	  
	<% end %>

	</table>
<%= paginate( @bulletins, :param_name => :page_main, :params => {:inner => 'false'} ) rescue nil%>

