Fix announcement front-end bug
This commit is contained in:
parent
9b1ada0af9
commit
112f7000a0
|
@ -225,39 +225,40 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<%= content_tag (:th) do %>
|
||||
<%= t(:category) %>
|
||||
<% end if (!params[:search_query].blank? or params[:category_id].blank?)-%>
|
||||
<th><%= t(:title) %></th>
|
||||
<th><%= t(:postdate) %></th>
|
||||
</tr>
|
||||
<% if !params[:name].blank?%>
|
||||
<%= t("search.unit_get",:unit_name => params[:name],:item_num=>@bulletins.count) %>
|
||||
<% end %>
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<%= content_tag (:th) do %>
|
||||
<%= t(:category) %>
|
||||
<% end if (!params[:search_query].blank? or params[:category_id].blank?)-%>
|
||||
<th><%= t(:title) %></th>
|
||||
<th><%= t(:postdate) %></th>
|
||||
</tr>
|
||||
<% if !params[:name].blank?%>
|
||||
<%= t("search.unit_get",:unit_name => params[:name],:item_num=>@bulletins.count) %>
|
||||
<% end %>
|
||||
|
||||
<% if @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=>@bulletins.count) unless (@bulletins.count == 30) %>
|
||||
<%= t("search.too_many",:search_word => params[:search_query],:exceed_num=>@bulletins.count) if (@bulletins.count ==30) %>
|
||||
<% end %>
|
||||
<% if @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=>@bulletins.count) unless (@bulletins.count == 30) %>
|
||||
<%= t("search.too_many",:search_word => params[:search_query],:exceed_num=>@bulletins.count) if (@bulletins.count ==30) %>
|
||||
<% end %>
|
||||
|
||||
<% @bulletins.each do |post| %>
|
||||
<tr class=<%= cycle('odd', '') %>>
|
||||
<%= content_tag(:th) do%>
|
||||
<td><%= (post.bulletin_category.title rescue nil ) %></td>
|
||||
<% end if(!params[:search_query].blank? or params[:category_id].blank?) %>
|
||||
<td><%= link_to post.title, panel_announcement_front_end_bulletin_path(post, :category_id => post.bulletin_category_id) %>
|
||||
<%#= link_to post.title, panel_announcement_back_end_bulletin_path(post) %>
|
||||
</td>
|
||||
<td class="date"><%= display_date_time(post.postdate) %></td>
|
||||
</tr>
|
||||
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<% @bulletins.each do |post| %>
|
||||
<tr class=<%= cycle('odd', '') %>>
|
||||
<%= content_tag(:th) do%>
|
||||
<td><%= (post.bulletin_category.title rescue nil ) %></td>
|
||||
<% end if(!params[:search_query].blank? or params[:category_id].blank?) %>
|
||||
<td><%= link_to post.title, panel_announcement_front_end_bulletin_path(post, :category_id => post.bulletin_category_id) %>
|
||||
<%#= link_to post.title, panel_announcement_back_end_bulletin_path(post) %>
|
||||
</td>
|
||||
<td class="date"><%= display_date_time(post.postdate) %></td>
|
||||
</tr>
|
||||
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<% else %>
|
||||
|
||||
<table class="table table-bordered">
|
||||
|
@ -270,7 +271,7 @@
|
|||
<% @bulletins.each do |post| %>
|
||||
<tr>
|
||||
<td><%= post.bulletin_category.i18n_variable[I18n.locale] rescue nil %></td>
|
||||
<td><%= link_to post.title[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.bulletin_category_id) %>
|
||||
<td><%= link_to post.title, panel_announcement_front_end_bulletin_path(post, :category_id => post.bulletin_category_id) %>
|
||||
<%#= link_to post.title, panel_announcement_back_end_bulletin_path(post) %>
|
||||
</td>
|
||||
<td><%= display_date_time(post.postdate) %></td>
|
||||
|
|
Loading…
Reference in New Issue