Fix site_locale_default_head and active for current locale

This commit is contained in:
Christophe Vilayphiou committed 2012-05-07 00:53:52 +08:00
1 parent 51f87e7212
commit 48f8fbde7f
6 files changed
+24 -20

No files matched your search

-4
View File
@@ -1,7 +1,3 @@
module Admin::AdImagesHelper
def active_when_default_locale_eq locale
locale.to_sym == I18n.default_locale ? 'active': ''
end
end
+4 -6
View File
@@ -2,12 +2,6 @@ module ApplicationHelper
FLASH_NOTICE_KEYS = [:error, :notice, :warning]
def site_valid_locales_default_head
index = @site_valid_locales.rindex I18n.default_locale.to_s
shift_out = @site_valid_locales.shift(index)
@site_valid_locales += shift_out
end
def colorize_in_use_locale(locale)
@site_in_use_locales.include?(locale)? 'green' : 'red'
end
@@ -147,4 +141,8 @@ module ApplicationHelper
javascripts
end
def active_when_current_locale_eq(locale)
locale.to_sym == I18n.locale ? 'active': ''
end
end