diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-03-31 21:30:33 +0300 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-03-31 21:37:39 +0300 |
commit | 553cf9ea54ccb0736a8b44e2f3d047d0860aa71e (patch) | |
tree | 7f9927d2de82a81110d60ebc35eb6180f89b1635 /app/views/projects/tags/_tag.html.haml | |
parent | ab46353fd9c0c76c137bf828788ecbc34d0fe99a (diff) |
Added ‘protected’ label and disabled delete button for tags index/show
Diffstat (limited to 'app/views/projects/tags/_tag.html.haml')
-rw-r--r-- | app/views/projects/tags/_tag.html.haml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/views/projects/tags/_tag.html.haml b/app/views/projects/tags/_tag.html.haml index dffe908e85a..451e011a4b8 100644 --- a/app/views/projects/tags/_tag.html.haml +++ b/app/views/projects/tags/_tag.html.haml @@ -6,6 +6,11 @@ %span.item-title = icon('tag') = tag.name + + - if protected_tag?(@project, tag) + %span.label.label-success + protected + - if tag.message.present? = strip_gpg_signature(tag.message) @@ -30,5 +35,5 @@ = icon("pencil") - if can?(current_user, :admin_project, @project) - = link_to namespace_project_tag_path(@project.namespace, @project, tag.name), class: 'btn btn-remove remove-row has-tooltip', title: "Delete tag", method: :delete, data: { confirm: "Deleting the '#{tag.name}' tag cannot be undone. Are you sure?", container: 'body' }, remote: true do + = link_to namespace_project_tag_path(@project.namespace, @project, tag.name), class: "btn btn-remove remove-row has-tooltip #{protected_tag?(@project, tag) ? 'disabled' : ''}", title: "Delete tag", method: :delete, data: { confirm: "Deleting the '#{tag.name}' tag cannot be undone. Are you sure?", container: 'body' }, remote: true do = icon("trash-o") |