Fix attribute_field_helper and comment admin in I18n

This commit is contained in:
chris committed 2012-11-06 17:51:42 +08:00
1 parent 12f5d93e1a
commit 43d969a72b
4 files changed
+445 -445

No files matched your search

+2 -2
View File
@@ -7,12 +7,12 @@ module AdminHelper
# Check if the current_user is manager in current module app
def is_manager?
@module_app.is_manager?(current_or_guest_user) || is_admin?
(@module_app.is_manager?(current_or_guest_user) rescue nil) || is_admin?
end
# Check if the current_user is sub manager in current module app
def is_sub_manager?
@module_app.is_sub_manager?(current_or_guest_user)|| is_admin?
(@module_app.is_sub_manager?(current_or_guest_user) rescue nil) || is_admin?
end
def is_admin?
+1 -1
View File
@@ -163,7 +163,7 @@ protected
result << "</div>"
result << "<ul class='nav nav-pills'>"
VALID_LOCALES.each do |key|
result << content_tag(:li,link_to(t(:_locale, :locale => key),"#tab"+id.to_s+"_#{key}",:data=>{:toggle=>"tab"}),:class=>(key == I18n.locale.to_s ? "active" : nil))
result << content_tag(:li,link_to(I18n.t(:_locale, :locale => key),"#tab"+id.to_s+"_#{key}",:data=>{:toggle=>"tab"}),:class=>(key == I18n.locale.to_s ? "active" : nil))
end
result << "</ul>"
result << "</div>"