diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index 4eb044b1a..1f996cec0 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -248,7 +248,7 @@ module ParserCommon when 'this_year' res << display_visitors_this_year.to_s end - fragment = Nokogiri::HTML::DocumentFragment.new(body, res) + fragment = Nokogiri::HTML::DocumentFragment.new(body, "
#{res}
") counter.swap(fragment) end end 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 99473218b..d63c21eb7 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 @@ -23,16 +23,16 @@ <% if ff[1] == 'title' %> - <%= link_to post.send("#{ff[0]}")[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.send("#{post.class.to_s.underscore}_category_id")) %> + <%= link_to post.send("#{ff[0]}"), panel_announcement_front_end_bulletin_path(post, :category_id => post.send("#{post.class.to_s.underscore}_category_id")) %> <% elsif ff[1] == 'date' %> <%= display_date(post.send(ff[0])) %> <% elsif ff[1] == 'category' %> - <%= post.send("#{post.class.to_s.underscore}_#{ff[0]}").i18n_variable[I18n.locale] rescue nil %> + <%= post.send("#{post.class.to_s.underscore}_#{ff[0]}").title rescue nil %> <% elsif ff[1] == 'img' %>
<%= image_tag(post.send(wf[0]).url) %>
<% elsif ff[1] == 'text' %> <%#= post.send("#{ff[0]}[#{I18n.locale}]").html_safe %> - <%= post.send("#{ff[0]}")[I18n.locale].html_safe %> + <%= post.send("#{ff[0]}").html_safe %> <% elsif ff[1] == 'status' %> <% if post.is_top? %> <%= t(:top) %> @@ -67,14 +67,14 @@ <% @item.frontend_field.each do |ff| %> <% if ff[1] == 'title' %> - <%= 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) %> <% elsif ff[1] == 'date' %> <%= display_date(post.send(ff[0])) %> <% elsif ff[1] == 'category' %> - <%= post.send("#{post.class.to_s.underscore}_#{ff[0]}").i18n_variable[I18n.locale] rescue nil %> + <%= post.send("#{post.class.to_s.underscore}_#{ff[0]}").title rescue nil %> <% elsif ff[1] == 'text' %> <%#= post.send("#{ff[0]}[#{I18n.locale}]").html_safe %> - <%= post.send("#{ff[0]}")[I18n.locale].html_safe %> + <%= post.send("#{ff[0]}").html_safe %> <% elsif ff[1] == 'status' %> <% if post.is_top? %> <%= t(:top) %> @@ -109,14 +109,14 @@ <% @item.frontend_field.each do |ff| %> <% if ff[1] == 'title' %> - <%= link_to post.send("#{ff[0]}")[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.send("#{post.class.to_s.underscore}_category_id")) %> + <%= link_to post.send("#{ff[0]}"), panel_announcement_front_end_bulletin_path(post, :category_id => post.send("#{post.class.to_s.underscore}_category_id")) %> <% elsif ff[1] == 'date' %> <%= display_date(post.send(ff[0])) %> <% elsif ff[1] == 'category' %> - <%= post.send("#{post.class.to_s.underscore}_#{ff[0]}").i18n_variable[I18n.locale] rescue nil %> + <%= post.send("#{post.class.to_s.underscore}_#{ff[0]}").title rescue nil %> <% elsif ff[1] == 'text' %> <%#= post.send("#{ff[0]}[#{I18n.locale}]").html_safe %> - <%= post.send("#{ff[0]}")[I18n.locale].html_safe %> + <%= post.send("#{ff[0]}").html_safe %> <% elsif ff[1] == 'status' %> <% if post.is_top? %> <%= t(:top) %> @@ -153,14 +153,14 @@ <% @item.frontend_field.each do |ff| %> <% if ff[1] == 'title' %> - <%= link_to post.send("#{ff[0]}")[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.send("#{post.class.to_s.underscore}_category_id")) %> + <%= link_to post.send("#{ff[0]}"), panel_announcement_front_end_bulletin_path(post, :category_id => post.send("#{post.class.to_s.underscore}_category_id")) %> <% elsif ff[1] == 'date' %> <%= display_date(post.send(ff[0])) %> <% elsif ff[1] == 'category' %> - <%= post.send("#{post.class.to_s.underscore}_#{ff[0]}").i18n_variable[I18n.locale] rescue nil %> + <%= post.send("#{post.class.to_s.underscore}_#{ff[0]}").title rescue nil %> <% elsif ff[1] == 'text' %> <%#= post.send("#{ff[0]}[#{I18n.locale}]").html_safe %> - <%= post.send("#{ff[0]}")[I18n.locale].html_safe %> + <%= post.send("#{ff[0]}").html_safe %> <% elsif ff[1] == 'status' %> <% if post.is_top? %> <%= t(:top) %> @@ -195,14 +195,14 @@ <% @item.frontend_field.each do |ff| %> <% if ff[1] == 'title' %> - <%= link_to post.send("#{ff[0]}")[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.send("#{post.class.to_s.underscore}_category_id")) %> + <%= link_to post.send("#{ff[0]}"), panel_announcement_front_end_bulletin_path(post, :category_id => post.send("#{post.class.to_s.underscore}_category_id")) %> <% elsif ff[1] == 'date' %> <%= display_date(post.send(ff[0])) %> <% elsif ff[1] == 'category' %> - <%= post.send("#{post.class.to_s.underscore}_#{ff[0]}").i18n_variable[I18n.locale] rescue nil %> + <%= post.send("#{post.class.to_s.underscore}_#{ff[0]}").title rescue nil %> <% elsif ff[1] == 'text' %> <%#= post.send("#{ff[0]}[#{I18n.locale}]").html_safe %> - <%= post.send("#{ff[0]}")[I18n.locale].html_safe %> + <%= post.send("#{ff[0]}").html_safe %> <% elsif ff[1] == 'status' %> <% if post.is_top? %> <%= t(:top) %>