From e8e7c382217506929e018b8382d2b93ed0695ecf Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 28 Dec 2012 14:01:04 +0800 Subject: [PATCH] Changes for announcement widget style 1 and categories --- .../announcement/widget/bulletins/_index.html.erb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb index 79e52de9..410d35e2 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb @@ -17,8 +17,8 @@ <% @bulletins.each do |post| %> - <% @widget_fields.each do |wf| %> + <% @widget_fields.each do |wf| %> <% if wf[1] == 'title' %> @@ -26,7 +26,7 @@ <% elsif wf[1] == 'date' %> <%= display_date(post.send(wf[0])) %> <% elsif wf[1] == 'category' %> - <%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").i18n_variable[I18n.locale] rescue nil %> + <%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").title rescue nil %> <% elsif wf[1] == 'img' %>
<%= image_tag(post.send(wf[0]).url) %>
<% elsif wf[1] == 'text' %> @@ -49,8 +49,8 @@ <% end %>
- <% end %> + <% end %> @@ -76,7 +76,7 @@ <% elsif wf[1] == 'date' %> <%= display_date(post.send(wf[0])) %> <% elsif wf[1] == 'category' %> - <%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").i18n_variable[I18n.locale] rescue nil %> + <%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").title rescue nil %> <% elsif wf[1] == 'text' %> <%#= post.send("#{wf[0]}[#{I18n.locale}]").html_safe %> <%= post.send("#{wf[0]}").html_safe %> @@ -124,7 +124,7 @@ <% elsif wf[1] == 'date' %> <%= display_date(post.send(wf[0])) %> <% elsif wf[1] == 'category' %> - <%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").i18n_variable[I18n.locale] rescue nil %> + <%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").title rescue nil %> <% elsif wf[1] == 'text' %> <%#= post.send("#{wf[0]}[#{I18n.locale}]").html_safe %> <%= post.send("#{wf[0]}").html_safe %> @@ -174,7 +174,7 @@ <% elsif wf[1] == 'date' %> <%= display_date(post.send(wf[0])) %> <% elsif wf[1] == 'category' %> - <%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").i18n_variable[I18n.locale] rescue nil %> + <%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").title rescue nil %> <% elsif wf[1] == 'text' %> <%#= post.send("#{wf[0]}[#{I18n.locale}]").html_safe %> <%= post.send("#{wf[0]}").html_safe %> @@ -222,7 +222,7 @@ <% elsif wf[1] == 'date' %> <%= display_date(post.send(wf[0])) %> <% elsif wf[1] == 'category' %> - <%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").i18n_variable[I18n.locale] rescue nil %> + <%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").title rescue nil %> <% elsif wf[1] == 'text' %> <%#= post.send("#{wf[0]}[#{I18n.locale}]").html_safe %> <%= post.send("#{wf[0]}").html_safe %>