summaryrefslogtreecommitdiff
path: root/app/views/shared/_label.html.haml
diff options
context:
space:
mode:
authorRitave <olaf.tomalka@gmail.com>2016-11-02 12:58:59 +0100
committerRitave <olaf.tomalka@gmail.com>2017-01-31 12:50:52 +0100
commit5d871dccbee115691ef109dfc857123503869a0e (patch)
tree11a6bab0f1b6b60f6eb789c9503347c6de253569 /app/views/shared/_label.html.haml
parentb525aff665f139cd12ac5a6df78d722427e759cc (diff)
downloadgitlab-ce-5d871dccbee115691ef109dfc857123503869a0e.tar.gz
Abillity to promote project labels to group labels
Fixes #24021
Diffstat (limited to 'app/views/shared/_label.html.haml')
-rw-r--r--app/views/shared/_label.html.haml4
1 files changed, 4 insertions, 0 deletions
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