From 5d871dccbee115691ef109dfc857123503869a0e Mon Sep 17 00:00:00 2001 From: Ritave Date: Wed, 2 Nov 2016 12:58:59 +0100 Subject: Abillity to promote project labels to group labels Fixes #24021 --- app/views/shared/_label.html.haml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/views/shared/_label.html.haml') diff --git a/app/views/shared/_label.html.haml b/app/views/shared/_label.html.haml index f11f4471a9d..0bee8ddbd90 100644 --- a/app/views/shared/_label.html.haml +++ b/app/views/shared/_label.html.haml @@ -66,6 +66,10 @@ %a.js-subscribe-button{ data: { url: toggle_subscription_group_label_path(label.group, label) } } Group level + - if label.is_a?(ProjectLabel) && label.project.group && can?(current_user, :admin_group, label.project.group) + = link_to promote_namespace_project_label_path(label.project.namespace, label.project, label), title: "Promote to Group Label", class: 'btn btn-transparent btn-action', data: {confirm: "Promoting this label will make this label available to all projects inside this group. Existing project labels with the same name will be merged. Are you sure?", toggle: "tooltip"}, method: :post do + %span.sr-only Promote to Group + = icon('level-up') - if can?(current_user, :admin_label, label) = link_to edit_label_path(label), title: "Edit", class: 'btn btn-transparent btn-action', data: {toggle: "tooltip"} do %span.sr-only Edit -- cgit v1.2.1