46 lines
2.0 KiB
Plaintext
46 lines
2.0 KiB
Plaintext
- 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! gl-align-items-flex-start!" }
|
|
.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)
|
|
= gl_badge_tag s_('TagsPage|protected'), variant: :success, size: :sm, class: 'gl-ml-2'
|
|
|
|
- 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!'
|
|
|
|
- if tag.message.present?
|
|
%pre.wrap
|
|
= strip_signature(tag.message)
|
|
|
|
.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', css_class: 'gl-icon')
|
|
= render 'projects/buttons/remove_tag', project: @project, tag: tag
|