debian-mirror-gitlab/app/views/projects/tags/_tag.html.haml

37 lines
1.7 KiB
Text
Raw Normal View History

2016-11-24 13:41:30 +05:30
- commit = @repository.commit(tag.dereferenced_target)
2015-11-26 14:37:03 +05:30
- release = @releases.find { |release| release.tag == tag.name }
2017-08-17 22:00:37 +05:30
%li.flex-row
.row-main-content.str-truncated
2018-03-17 18:26:18 +05:30
= icon('tag')
= link_to tag.name, project_tag_path(@project, tag.name), class: 'item-title ref-name prepend-left-4'
2017-08-17 22:00:37 +05:30
- if protected_tag?(@project, tag)
2018-11-08 19:23:39 +05:30
%span.badge.badge-success.prepend-left-4
2018-03-17 18:26:18 +05:30
= s_('TagsPage|protected')
2017-08-17 22:00:37 +05:30
2015-04-26 12:48:37 +05:30
- if tag.message.present?
 
= strip_gpg_signature(tag.message)
2015-11-26 14:37:03 +05:30
2017-08-17 22:00:37 +05:30
- if commit
.block-truncated
= render 'projects/branches/commit', commit: commit, project: @project
- else
%p
2018-03-17 18:26:18 +05:30
= s_("TagsPage|Can't find HEAD commit for this tag")
2017-08-17 22:00:37 +05:30
- if release && release.description.present?
.description.prepend-top-default
.wiki
= markdown_field(release, :description)
2014-09-02 18:07:02 +05:30
2018-03-17 18:26:18 +05:30
.row-fixed-content.controls.flex-row
2017-08-17 22:00:37 +05:30
= render 'projects/buttons/download', project: @project, ref: tag.name, pipeline: @tags_pipelines[tag.name]
2015-12-23 02:04:40 +05:30
2017-08-17 22:00:37 +05:30
- if can?(current_user, :push_code, @project)
2018-03-17 18:26:18 +05:30
= link_to edit_project_tag_release_path(@project, tag.name), class: 'btn has-tooltip', title: s_('TagsPage|Edit release notes'), data: { container: "body" } do
2017-08-17 22:00:37 +05:30
= icon("pencil")
2015-12-23 02:04:40 +05:30
2018-05-09 12:01:36 +05:30
- if can?(current_user, :admin_project, @project)
= link_to project_tag_path(@project, tag.name), class: "btn btn-remove remove-row has-tooltip prepend-left-10 #{protected_tag?(@project, tag) ? 'disabled' : ''}", title: s_('TagsPage|Delete tag'), method: :delete, data: { confirm: s_('TagsPage|Deleting the %{tag_name} tag cannot be undone. Are you sure?') % { tag_name: tag.name }, container: 'body' }, remote: true do
= icon("trash-o")