Hide "Groups" tab on user form if no group exist.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3237 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
6ea202f808
commit
24fde6f109
|
@ -47,8 +47,11 @@ module UsersHelper
|
||||||
|
|
||||||
def user_settings_tabs
|
def user_settings_tabs
|
||||||
tabs = [{:name => 'general', :partial => 'users/general', :label => :label_general},
|
tabs = [{:name => 'general', :partial => 'users/general', :label => :label_general},
|
||||||
{:name => 'groups', :partial => 'users/groups', :label => :label_group_plural},
|
|
||||||
{:name => 'memberships', :partial => 'users/memberships', :label => :label_project_plural}
|
{:name => 'memberships', :partial => 'users/memberships', :label => :label_project_plural}
|
||||||
]
|
]
|
||||||
|
if Group.all.any?
|
||||||
|
tabs.insert 1, {:name => 'groups', :partial => 'users/groups', :label => :label_group_plural}
|
||||||
|
end
|
||||||
|
tabs
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue