summaryrefslogtreecommitdiff
path: root/app/views/projects/tags/_tag.html.haml
blob: 55e45a5e9542f027189eb79df2f3f2673bcb11bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
- commit = @repository.commit(tag.dereferenced_target)
- release = @releases.find { |release| release.tag == tag.name }
%li.flex-row
  .row-main-content.str-truncated
    = icon('tag')
    = link_to tag.name, project_tag_path(@project, tag.name), class: 'item-title ref-name prepend-left-4'

    - if protected_tag?(@project, tag)
      %span.label.label-success.prepend-left-4
        = s_('TagsPage|protected')

    - if tag.message.present?
       
      = strip_gpg_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 && release.description.present?
      .description.prepend-top-default
        .wiki
          = markdown_field(release, :description)

  .row-fixed-content.controls
    = render 'projects/buttons/download', project: @project, ref: tag.name, pipeline: @tags_pipelines[tag.name]

    - if can?(current_user, :push_code, @project)
      = link_to edit_project_tag_release_path(@project, tag.name), class: 'btn has-tooltip', title: s_('TagsPage|Edit release notes'), data: { container: "body" } do
        = icon("pencil")

    - 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")