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:
Jean-Philippe Lang 2009-12-24 16:14:15 +00:00
parent 6ea202f808
commit 24fde6f109
1 changed files with 4 additions and 1 deletions

View File

@ -47,8 +47,11 @@ module UsersHelper
def user_settings_tabs
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}
]
if Group.all.any?
tabs.insert 1, {:name => 'groups', :partial => 'users/groups', :label => :label_group_plural}
end
tabs
end
end