Remove I18n.locale for announcement front-end

Fix counter in back-end edit
This commit is contained in:
chris committed 2012-12-28 15:34:04 +08:00
1 parent 4d965d754b
commit 61b0f94c04
2 files changed
+16 -16

No files matched your search

@@ -23,16 +23,16 @@
<td>
<span class="<%= ff[1] %>">
<% 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' %>
<div class="img app-pic"><%= image_tag(post.send(wf[0]).url) %></div>
<% 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? %>
<span class="top"><%= t(:top) %></span>
@@ -67,14 +67,14 @@
<% @item.frontend_field.each do |ff| %>
<span class="<%= ff[1] %>">
<% 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? %>
<span class="top"><%= t(:top) %></span>
@@ -109,14 +109,14 @@
<% @item.frontend_field.each do |ff| %>
<span class="<%= ff[1] %>">
<% 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? %>
<span class="top"><%= t(:top) %></span>
@@ -153,14 +153,14 @@
<% @item.frontend_field.each do |ff| %>
<span class="<%= ff[1] %>">
<% 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? %>
<span class="top"><%= t(:top) %></span>
@@ -195,14 +195,14 @@
<% @item.frontend_field.each do |ff| %>
<span class="<%= ff[1] %>">
<% 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? %>
<span class="top"><%= t(:top) %></span>