show.html.haml 2.1 KB
Newer Older
A
Annabel Dunstone 已提交
1
- @no_container = true
J
Jose Ivan Vargas 已提交
2
- add_to_breadcrumbs s_('TagsPage|Tags'), project_tags_path(@project)
3
- breadcrumb_title @tag.name
J
Jose Ivan Vargas 已提交
4
- page_title @tag.name, s_('TagsPage|Tags')
5

A
Annabel Dunstone 已提交
6
%div{ class: container_class }
A
Annabel Dunstone Gray 已提交
7 8 9
  .top-area.multi-line
    .nav-text
      .title
10 11 12
        %span.item-title.ref-name
          = icon('tag')
          = @tag.name
13
        - if protected_tag?(@project, @tag)
14
          %span.badge.badge-success
J
Jose Ivan Vargas 已提交
15
            = s_('TagsPage|protected')
A
Annabel Dunstone Gray 已提交
16 17 18
      - if @commit
        = render 'projects/branches/commit', commit: @commit, project: @project
      - else
J
Jose Ivan Vargas 已提交
19
        = s_("TagsPage|Can't find HEAD commit for this tag")
A
Annabel Dunstone Gray 已提交
20

21
    .nav-controls.controls-flex
A
Annabel Dunstone 已提交
22
      - if can?(current_user, :push_code, @project)
23
        = link_to edit_project_tag_release_path(@project, @tag.name), class: 'btn btn-edit controls-item has-tooltip', title: s_('TagsPage|Edit release notes') do
A
Annabel Dunstone 已提交
24
          = icon("pencil")
J
Jose Ivan Vargas 已提交
25
      = link_to project_tree_path(@project, @tag.name), class: 'btn controls-item has-tooltip', title: s_('TagsPage|Browse files') do
A
Annabel Dunstone 已提交
26
        = icon('files-o')
J
Jose Ivan Vargas 已提交
27
      = link_to project_commits_path(@project, @tag.name), class: 'btn controls-item has-tooltip', title: s_('TagsPage|Browse commits') do
A
Annabel Dunstone 已提交
28
        = icon('history')
29 30
      .btn-container.controls-item
        = render 'projects/buttons/download', project: @project, ref: @tag.name
31
      - if can?(current_user, :push_code, @project) && can?(current_user, :admin_project, @project)
32
        .btn-container.controls-item-full
J
Jose Ivan Vargas 已提交
33
          = link_to project_tag_path(@project, @tag.name), class: "btn btn-remove remove-row has-tooltip #{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 } } do
A
Annabel Dunstone 已提交
34
            %i.fa.fa-trash-o
35

A
Annabel Dunstone 已提交
36
    - if @tag.message.present?
37
      %pre.wrap
A
Annabel Dunstone 已提交
38
        = strip_gpg_signature(@tag.message)
D
Dmitriy Zaporozhets 已提交
39

A
Annabel Dunstone 已提交
40 41 42 43
  .append-bottom-default.prepend-top-default
    - if @release.description.present?
      .description
        .wiki
D
Douwe Maan 已提交
44
          = markdown_field(@release, :description)
A
Annabel Dunstone 已提交
45
    - else
J
Jose Ivan Vargas 已提交
46
      = s_('TagsPage|This tag has no release notes.')