<% # encoding: utf-8 %>

<%= flash_messages %>

<% if @current_category %>
	<h1 class="h1"><%= @current_category.title %></h1>
<% else %>
	<h1 class="h1"><%= t('news.news') %></h1>
<% 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.news_bulletin.image') %></th>
			<th><%= t('news.news_bulletin.title') %></th>
			<th class="span2 pagination-right"><%= t('news.news_bulletin.postdate') %></th>
		</tr>
		<% @news_bulletins.each do |post| %>
		<tr>
			<td><%= image_tag post.image rescue nil %></td>
			<td>
				<%= link_to post.title, panel_news_front_end_news_bulletin_path(post), :class => 'news_title' %>
				<%= post.subtitle.html_safe %>
			</td>
			<td><%= display_date(post.postdate) %></td>
		</tr>
		<% end %> 
	</tbody>
</table>

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

