summaryrefslogtreecommitdiff
path: root/app/views/shared/_label.html.haml
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-01-31 13:35:26 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-01-31 13:35:26 +0000
commit86af3ed55e5a446d1d10168e890ab06d70fe6cbf (patch)
tree7ad2171a282db119dd39bc35d64b49024d7f8d09 /app/views/shared/_label.html.haml
parent83711c784db6403234e7bc48b3a6dafef4c10465 (diff)
parent5d871dccbee115691ef109dfc857123503869a0e (diff)
downloadgitlab-ce-86af3ed55e5a446d1d10168e890ab06d70fe6cbf.tar.gz
Merge branch '24021-Migrate-Projects-Labels-to-Group-Labels' into 'master'27283-fix-wrong-label-hide-show-whitespace
Promote project labels to group labels Closes #24021 See merge request !7242
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 4bfdf94b913..ead9b84b991 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