diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-08-17 12:06:31 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-08-17 12:06:31 +0300 |
commit | ee33b3e6e84bb566e84062e70d45c6d84ace4ee7 (patch) | |
tree | 1bb221eb39dcf82de003099a5571c3f0d86b8360 /app/views/projects/repositories | |
parent | 75df5f6c73670def1912150c6f3390ffdfadb17a (diff) |
Use partials for downloading artifacts button
Diffstat (limited to 'app/views/projects/repositories')
-rw-r--r-- | app/views/projects/repositories/_download_archive.html.haml | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/app/views/projects/repositories/_download_archive.html.haml b/app/views/projects/repositories/_download_archive.html.haml index c0a5909d3a6..4f40696a190 100644 --- a/app/views/projects/repositories/_download_archive.html.haml +++ b/app/views/projects/repositories/_download_archive.html.haml @@ -25,17 +25,4 @@ = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'tar'), rel: 'nofollow' do %i.fa.fa-download %span Download tar - - pipeline = @project.pipelines.latest_successful_for(ref) - - if pipeline - - artifacts = pipeline.builds.latest.with_artifacts - - if artifacts.any? - %li.dropdown-header Artifacts - - unless pipeline.latest? - - latest_pipeline = @project.pipeline_for(ref) - %li - .unclickable= ci_status_for_statuseable(latest_pipeline) - %li.dropdown-header Previous Artifacts - - artifacts.each do |job| - %li - = link_to latest_succeeded_namespace_project_artifacts_path(@project.namespace, @project, ref, 'download', job: job.name), rel: 'nofollow' do - %span Download '#{job.name}' + = render 'projects/buttons/artifacts', project: @project, ref: ref |