summaryrefslogtreecommitdiff
path: root/app/views/projects/tags/index.html.haml
blob: 21d4c5468509e723897b8466d82b7ccd626921c4 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
= render "projects/commits/head"

- if can? current_user, :push_code, @project
  .pull-right
    = link_to new_project_tag_path(@project), class: 'btn btn-create new-tag-btn' do
      %i.icon-add-sign
      New tag

%p
  Tags give ability to mark specific points in history as being important
%hr

- unless @tags.empty?
  %ul.bordered-list
    - @tags.each do |tag|
      - commit = Commit.new(Gitlab::Git::Commit.new(tag.commit))
      %li
        %h4
          = link_to project_commits_path(@project, tag.name), class: "" do
            %i.icon-tag
            = tag.name
          %small
            = truncate(tag.message || '', length: 70)
          .pull-right
            %small.cdark
              %i.icon-calendar
              #{time_ago_with_tooltip(commit.committed_date)} ago
        %p.prepend-left-20
          = link_to commit.short_id(8), project_commit_path(@project, commit), class: "monospace"
          –
          = link_to_gfm truncate(commit.title, length: 70), project_commit_path(@project, commit.id), class: "cdark"

          %span.pull-right
            - if can? current_user, :download_code, @project
              = link_to archive_project_repository_path(@project, ref: tag.name), class: 'btn grouped btn-small' do
                %i.icon-download-alt
                Download
            - if can?(current_user, :admin_project, @project)
              = link_to project_tag_path(@project, tag.name), class: 'btn btn-small remove-row', method: :delete, data: { confirm: 'Removed tag cannot be restored. Are you sure?'}, remote: true do
                %i.icon-trash

  = paginate @tags, theme: 'gitlab'

- else
  %h3.nothing_here_message
    Repository has no tags yet.
    %br
    %small
      Use git tag command to add a new one:
      %br
      %span.monospace git tag -a v1.4 -m 'version 1.4'