summaryrefslogtreecommitdiff
path: root/app/views/projects/tags
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-03 18:13:24 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-03 18:13:24 +0200
commitca7e4a948b7826bf17707996e30ad191ff3f2d58 (patch)
treedf318cd06a0f09ae5fda3132780f9987765355e6 /app/views/projects/tags
parent5ec0955919326fb6f5a4e46875f0f2143d246a1c (diff)
downloadgitlab-ce-ca7e4a948b7826bf17707996e30ad191ff3f2d58.tar.gz
Use new tags/branches from gitlab_git
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/projects/tags')
-rw-r--r--app/views/projects/tags/_tag.html.haml22
-rw-r--r--app/views/projects/tags/index.html.haml24
2 files changed, 23 insertions, 23 deletions
diff --git a/app/views/projects/tags/_tag.html.haml b/app/views/projects/tags/_tag.html.haml
new file mode 100644
index 00000000000..70dedcf9155
--- /dev/null
+++ b/app/views/projects/tags/_tag.html.haml
@@ -0,0 +1,22 @@
+- commit = @repository.commit(tag.target)
+%li
+ %h4
+ = link_to project_commits_path(@project, tag.name), class: "" do
+ %i.icon-tag
+ = tag.name
+ .pull-right
+ %small.cdark
+ %i.icon-calendar
+ #{time_ago_with_tooltip(commit.committed_date)}
+ %p.prepend-left-20
+ = link_to commit.short_id(8), project_commit_path(@project, commit), class: "monospace"
+ &ndash;
+ = 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
+ = render 'projects/repositories/download_archive', ref: tag.name, btn_class: 'grouped btn-group-small'
+ - if can?(current_user, :admin_project, @project)
+ = link_to project_tag_path(@project, tag.name), class: 'btn btn-small remove-row grouped', method: :delete, data: { confirm: 'Removed tag cannot be restored. Are you sure?'}, remote: true do
+ %i.icon-trash
+
diff --git a/app/views/projects/tags/index.html.haml b/app/views/projects/tags/index.html.haml
index c88e42a1073..2d53a5dd66a 100644
--- a/app/views/projects/tags/index.html.haml
+++ b/app/views/projects/tags/index.html.haml
@@ -13,29 +13,7 @@
- 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)}
- %p.prepend-left-20
- = link_to commit.short_id(8), project_commit_path(@project, commit), class: "monospace"
- &ndash;
- = 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
- = render 'projects/repositories/download_archive', ref: tag.name, btn_class: 'grouped btn-group-small'
- - if can?(current_user, :admin_project, @project)
- = link_to project_tag_path(@project, tag.name), class: 'btn btn-small remove-row grouped', method: :delete, data: { confirm: 'Removed tag cannot be restored. Are you sure?'}, remote: true do
- %i.icon-trash
+ = render 'tag', tag: tag
= paginate @tags, theme: 'gitlab'