diff options
author | Luke Bennett <lukeeeebennettplus@gmail.com> | 2018-06-27 01:50:43 +0100 |
---|---|---|
committer | Luke Bennett <lukeeeebennettplus@gmail.com> | 2018-06-27 01:50:43 +0100 |
commit | 5403bf6725e41178a04a2a522d1eaea8d85b6310 (patch) | |
tree | 49195702de2137ca12e062268b7d0fe39af266a4 | |
parent | 292cf668905a55e7b305c67b314cb039d2681a54 (diff) | |
download | gitlab-ce-48255-no-ui-element-to-edit-group-label.tar.gz |
Use correct conditional to show label edit and delete48255-no-ui-element-to-edit-group-label
-rw-r--r-- | app/views/shared/_label.html.haml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/views/shared/_label.html.haml b/app/views/shared/_label.html.haml index 5eec7b02b54..2afe697fc52 100644 --- a/app/views/shared/_label.html.haml +++ b/app/views/shared/_label.html.haml @@ -21,6 +21,7 @@ = sprite_icon('star-o') %button.label-action.remove-priority.btn.btn-transparent.has-tooltip{ title: _('Remove priority'), type: 'button', data: { placement: 'top' }, aria_label: _('Deprioritize label') } = sprite_icon('star') + - if can?(current_user, :admin_label, label) %li.inline = link_to edit_label_path(label), class: 'btn btn-transparent label-action', aria_label: 'Edit label' do = sprite_icon('pencil') @@ -42,9 +43,10 @@ container: 'body', toggle: 'modal' } } = _('Promote to group label') - %li - %span{ data: { toggle: 'modal', target: "#modal-delete-label-#{label.id}" } } - %button.text-danger.remove-row{ type: 'button' }= _('Delete') + - if can?(current_user, :admin_label, label) + %li + %span{ data: { toggle: 'modal', target: "#modal-delete-label-#{label.id}" } } + %button.text-danger.remove-row{ type: 'button' }= _('Delete') - if current_user %li.inline.label-subscription - if can_subscribe_to_label_in_different_levels?(label) |