From 112f7000a000e78ef5c8cbe1726eee282bb82598 Mon Sep 17 00:00:00 2001 From: chris Date: Thu, 15 Nov 2012 17:23:24 +0800 Subject: [PATCH] Fix announcement front-end bug --- .../front_end/bulletins/index.html.erb | 63 ++++++++++--------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb index 192a9a328..76e719a8e 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb @@ -225,39 +225,40 @@ - - - <%= content_tag (:th) do %> - <%= t(:category) %> - <% end if (!params[:search_query].blank? or params[:category_id].blank?)-%> - - - - <% if !params[:name].blank?%> - <%= t("search.unit_get",:unit_name => params[:name],:item_num=>@bulletins.count) %> - <% end %> +
<%= t(:title) %><%= t(:postdate) %>
+ + <%= content_tag (:th) do %> + <%= t(:category) %> + <% end if (!params[:search_query].blank? or params[:category_id].blank?)-%> + + + + <% 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| %> + > + <%= content_tag(:th) do%> + + <% end if(!params[:search_query].blank? or params[:category_id].blank?) %> + + + + + <% end %> +
<%= t(:title) %><%= t(:postdate) %>
<%= (post.bulletin_category.title rescue nil ) %><%= 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) %> + <%= display_date_time(post.postdate) %>
-<% @bulletins.each do |post| %> - > - <%= content_tag(:th) do%> - <%= (post.bulletin_category.title rescue nil ) %> - <% end if(!params[:search_query].blank? or params[:category_id].blank?) %> - <%= 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) %> - - <%= display_date_time(post.postdate) %> - - <% end %> - - <% else %> @@ -270,7 +271,7 @@ <% @bulletins.each do |post| %> -
<%= post.bulletin_category.i18n_variable[I18n.locale] rescue nil %><%= link_to post.title[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.bulletin_category_id) %> + <%= 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) %> <%= display_date_time(post.postdate) %>