summaryrefslogtreecommitdiff
path: root/app/views/projects/branches
diff options
context:
space:
mode:
authorAnnabel Dunstone <annabel.dunstone@gmail.com>2016-07-17 19:04:45 -0500
committerAnnabel Dunstone <annabel.dunstone@gmail.com>2016-07-17 19:04:45 -0500
commit5c28f16a01dd2c5f3e5b4e97d70ee3a9b0cdad3f (patch)
treeb28f2dbddb0b5ff4005c1b3ac7260db4de06f2da /app/views/projects/branches
parentfaeaeda60e5601914338899f6b23b677d37a2ab5 (diff)
downloadgitlab-ce-5c28f16a01dd2c5f3e5b4e97d70ee3a9b0cdad3f.tar.gz
Add artifacts download button on project page and branches page
Diffstat (limited to 'app/views/projects/branches')
-rw-r--r--app/views/projects/branches/_branch.html.haml15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml
index 4bd85061240..78b3de46f58 100644
--- a/app/views/projects/branches/_branch.html.haml
+++ b/app/views/projects/branches/_branch.html.haml
@@ -27,6 +27,21 @@
= link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: branch.name), class: 'btn btn-default', method: :post, title: "Compare" do
Compare
+ - artifacts = @project.builds_for(@repository.root_ref).latest.with_artifacts
+ - if artifacts.any?
+ .dropdown.inline.artifacts-btn
+ %a.btn.dropdown-toggle{ 'data-toggle' => 'dropdown' }
+ = icon('download')
+ %span.caret
+ %span.sr-only
+ Select Archive Format
+ %ul.dropdown-menu.dropdown-menu-align-right{ role: 'menu' }
+ %li.dropdown-header Artifacts
+ - artifacts.each do |job|
+ %li
+ = link_to download_namespace_project_build_artifacts_path(@project.namespace, @project, job), rel: 'nofollow' do
+ %span Download '#{job.name}'
+
- if can_remove_branch?(@project, branch.name)
= link_to namespace_project_branch_path(@project.namespace, @project, branch.name), class: 'btn btn-remove remove-row has-tooltip', title: "Delete branch", method: :delete, data: { confirm: "Deleting the '#{branch.name}' branch cannot be undone. Are you sure?", container: 'body' }, remote: true do
= icon("trash-o")