Remove i18n_variable for controllers, helpers and models

This commit is contained in:
Christophe Vilayphiou committed 2012-07-26 05:07:32 +08:00
1 parent 94337a58d5
commit acb7fe0dea
16 files changed
+196 -103

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@ module Admin::AssetHelper
def show_all_fields(asset, field)
a = []
@site_valid_locales.each do |locale|
a << asset.send(field)[locale] rescue nil
a << asset.send("#{field}_translations")[locale] rescue nil
end
a.join(' - ')
end
+1 -1
View File
@@ -13,7 +13,7 @@ module Admin::ItemHelper
ret << "<li id='#{node.id}' class='#{no_nested}'>"
# ret << "<i class='icons-moves'></i>"
ret << "<div class='with_action'><i class='icons-moves'></i>"
ret << (link_to node.i18n_variable[I18n.locale], dest, :class => 'js_history')
ret << (link_to node.title, dest, :class => 'js_history')
ret << "<div class='quick-edit hide'>"
ret << (link_to t('admin.edit'), eval("edit_admin_#{node._type.downcase}_path(node)"), :class => 'js_history') if node._type.eql?('Page')
ret << (link_to t('admin.new_page'), new_admin_page_path(:parent_id => node.id), :class => 'new_page js_history') if node._type.eql?('Page')
+3 -3
View File
@@ -122,11 +122,11 @@ module ApplicationHelper
def page_title(page)
res = "<title>"
page_title = page.title ? page.title[I18n.locale] : page.i18n_variable[I18n.locale]
page_title = page.page_title ? page.page_title : page.title
if page.root? && @site.title
res << @site.title[I18n.locale]
res << @site.title
elsif @site.title && @site.title_always_on
res << @site.title[I18n.locale] + ' - ' + page_title
res << @site.title + ' - ' + page_title
else
res << page_title
end