diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-02-06 00:10:58 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-02-06 00:10:58 +0000 |
commit | 68a419c8792798cfb09730c4ea52ac16e31c3fc9 (patch) | |
tree | 973e75c7941119c19f91107f96a674938daf18dd /app/helpers/groups_helper.rb | |
parent | 976413ad0f01c1c1f49227c2f5265bda4dc2e548 (diff) | |
download | gitlab-ce-68a419c8792798cfb09730c4ea52ac16e31c3fc9.tar.gz |
31885 - Ability to transfer a single group to another group
Diffstat (limited to 'app/helpers/groups_helper.rb')
-rw-r--r-- | app/helpers/groups_helper.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb index 676c1d1988b..09450eaa5b7 100644 --- a/app/helpers/groups_helper.rb +++ b/app/helpers/groups_helper.rb @@ -88,6 +88,19 @@ module GroupsHelper end end + def parent_group_options(current_group) + groups = current_user.owned_groups.sort_by(&:human_name).map do |group| + { id: group.id, text: group.human_name } + end + + groups.delete_if { |group| group[:id] == current_group.id } + groups.to_json + end + + def supports_nested_groups? + Group.supports_nested_groups? + end + private def group_title_link(group, hidable: false, show_avatar: false, for_dropdown: false) |