Fix attribute_field_helper and comment admin in I18n
This commit is contained in:
1 parent
12f5d93e1a
commit
43d969a72b
4 files changed
+445
-445
No files matched your search
@@ -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?
|
||||
|
||||
@@ -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>"
|
||||
|
||||
Reference in new issue
Block a user