diff options
author | Arinde Eniola <eniolaarinde1@gmail.com> | 2016-04-12 14:41:34 +0100 |
---|---|---|
committer | Arinde Eniola <eniolaarinde1@gmail.com> | 2016-04-12 14:41:34 +0100 |
commit | 050110c9c90d39ea9c128ac183c13a37250fd7a1 (patch) | |
tree | d123ba978842f53c8f5f42b1f71c842682e47c01 /app/helpers/namespaces_helper.rb | |
parent | e933a0b058cdddf0319bd2318cdf0af69fa141ed (diff) | |
download | gitlab-ce-050110c9c90d39ea9c128ac183c13a37250fd7a1.tar.gz |
hide help block when user is creating a new project inside a group
Diffstat (limited to 'app/helpers/namespaces_helper.rb')
-rw-r--r-- | app/helpers/namespaces_helper.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/helpers/namespaces_helper.rb b/app/helpers/namespaces_helper.rb index faba418c4db..94c6b548ecd 100644 --- a/app/helpers/namespaces_helper.rb +++ b/app/helpers/namespaces_helper.rb @@ -3,8 +3,16 @@ module NamespacesHelper groups = current_user.owned_groups + current_user.masters_groups users = [current_user.namespace] - group_opts = ["Groups", groups.sort_by(&:human_name).map {|g| [display_path ? g.path : g.human_name, g.id]} ] - users_opts = [ "Users", users.sort_by(&:human_name).map {|u| [display_path ? u.path : u.human_name, u.id]} ] + data_attr_group = { 'data-options-parent' => 'groups' } + data_attr_users = { 'data-options-parent' => 'users' } + + group_opts = [ + "Groups", groups.sort_by(&:human_name).map { |g| [display_path ? g.path : g.human_name, g.id, data_attr_group] } + ] + + users_opts = [ + "Users", users.sort_by(&:human_name).map { |u| [display_path ? u.path : u.human_name, u.id, data_attr_users] } + ] options = [] options << group_opts |