46 lines
1.9 KiB
Text
46 lines
1.9 KiB
Text
- commit = @repository.commit(tag.dereferenced_target)
|
|
- release = @releases.find { |release| release.tag == tag.name }
|
|
- commit_status = @tag_pipeline_statuses[tag.name] unless @tag_pipeline_statuses.nil?
|
|
|
|
%li.flex-row.js-tag-list{ class: "gl-white-space-normal!" }
|
|
.row-main-content
|
|
= sprite_icon('tag')
|
|
= link_to tag.name, project_tag_path(@project, tag.name), class: 'item-title ref-name'
|
|
|
|
- if protected_tag?(@project, tag)
|
|
%span.badge.badge-success.gl-ml-2
|
|
= s_('TagsPage|protected')
|
|
|
|
- if tag.message.present?
|
|
|
|
= strip_signature(tag.message)
|
|
|
|
- if commit
|
|
.block-truncated
|
|
= render 'projects/branches/commit', commit: commit, project: @project
|
|
- else
|
|
%p
|
|
= s_("TagsPage|Can't find HEAD commit for this tag")
|
|
|
|
- if release
|
|
.text-secondary
|
|
= sprite_icon("rocket", size: 12)
|
|
= _("Release")
|
|
= link_to release.name, project_releases_path(@project, anchor: release.tag), class: 'gl-text-blue-600!'
|
|
|
|
.row-fixed-content.controls.flex-row
|
|
- if tag.has_signature?
|
|
= render partial: 'projects/commit/signature', object: tag.signature
|
|
|
|
- if commit_status
|
|
= render 'ci/status/icon', size: 24, status: commit_status, option_css_classes: 'gl-display-inline-flex gl-vertical-align-middle gl-mr-5'
|
|
- elsif @tag_pipeline_statuses && @tag_pipeline_statuses.any?
|
|
.gl-display-inline-flex.gl-vertical-align-middle.gl-mr-5
|
|
%svg.s24
|
|
|
|
= render 'projects/buttons/download', project: @project, ref: tag.name, pipeline: @tags_pipelines[tag.name]
|
|
|
|
- if can?(current_user, :admin_tag, @project)
|
|
= link_to edit_project_tag_release_path(@project, tag.name), class: 'btn gl-button btn-default btn-icon btn-edit has-tooltip', title: s_('TagsPage|Edit release notes'), data: { container: "body" } do
|
|
= sprite_icon("pencil")
|
|
= render 'projects/buttons/remove_tag', project: @project, tag: tag
|