diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2018-02-17 03:11:36 +0300 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2018-03-02 01:10:03 +0300 |
commit | d5c001864964afb73efca0c6b592f8a1e4d152b9 (patch) | |
tree | c1859c340ae1f161a0ae6897ee4997c896a2a9fa /app/views/shared/_label.html.haml | |
parent | 5c4eace67f188da436b3b380a0125d053b29422a (diff) |
Added vue based promotion modals for labels and milestones
Diffstat (limited to 'app/views/shared/_label.html.haml')
-rw-r--r-- | app/views/shared/_label.html.haml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/views/shared/_label.html.haml b/app/views/shared/_label.html.haml index 8847d11f623..a7b85ac4469 100644 --- a/app/views/shared/_label.html.haml +++ b/app/views/shared/_label.html.haml @@ -48,8 +48,14 @@ .pull-right.hidden-xs.hidden-sm - if label.is_a?(ProjectLabel) && label.project.group && can?(current_user, :admin_label, label.project.group) - = link_to promote_project_label_path(label.project, label), title: "Promote to Group Label", class: 'btn btn-transparent btn-action', data: {confirm: "Promoting #{label.title} will make it available for all projects inside #{label.project.group.name}. Existing project labels with the same name will be merged. This action cannot be reversed.", toggle: "tooltip"}, method: :post do - %span.sr-only Promote to Group + %a.js-promote-project-label.btn.btn-transparent.btn-action.has-tooltip{ title: _('Promote to Group Label'), + data: { url: promote_project_label_path(label.project, label), + label_title: label.title, + label_color: label.color, + target: '#promote-label-modal', + container: 'body', + toggle: 'modal' }, + disabled: true } = sprite_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 |