2017-03-13 12:00:07 -04:00
|
|
|
- pipeline = local_assigns.fetch(:pipeline) { project.pipelines.latest_successful_for(ref) }
|
|
|
|
|
2016-08-24 07:09:10 -04:00
|
|
|
- if !project.empty_repo? && can?(current_user, :download_code, project)
|
2017-01-19 14:20:01 -05:00
|
|
|
.project-action-button.dropdown.inline>
|
2017-06-09 09:08:39 -04:00
|
|
|
%button.btn.has-tooltip{ title: s_('DownloadSource|Download'), 'data-toggle' => 'dropdown', 'aria-label' => s_('DownloadSource|Download') }
|
2016-12-05 13:55:57 -05:00
|
|
|
= icon('download')
|
|
|
|
= icon("caret-down")
|
2017-06-07 16:13:44 -04:00
|
|
|
%span.sr-only= _('Select Archive Format')
|
2016-12-05 13:55:57 -05:00
|
|
|
%ul.dropdown-menu.dropdown-menu-align-right{ role: 'menu' }
|
2017-06-07 16:13:44 -04:00
|
|
|
%li.dropdown-header
|
|
|
|
#{ _('Source code') }
|
2016-12-05 13:55:57 -05:00
|
|
|
%li
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to archive_project_repository_path(project, ref: ref, format: 'zip'), rel: 'nofollow', download: '' do
|
2016-12-05 13:55:57 -05:00
|
|
|
%i.fa.fa-download
|
2017-06-07 16:13:44 -04:00
|
|
|
%span= _('Download zip')
|
2016-12-05 13:55:57 -05:00
|
|
|
%li
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to archive_project_repository_path(project, ref: ref, format: 'tar.gz'), rel: 'nofollow', download: '' do
|
2016-12-05 13:55:57 -05:00
|
|
|
%i.fa.fa-download
|
2017-06-07 16:13:44 -04:00
|
|
|
%span= _('Download tar.gz')
|
2016-12-05 13:55:57 -05:00
|
|
|
%li
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to archive_project_repository_path(project, ref: ref, format: 'tar.bz2'), rel: 'nofollow', download: '' do
|
2016-12-05 13:55:57 -05:00
|
|
|
%i.fa.fa-download
|
2017-06-07 16:13:44 -04:00
|
|
|
%span= _('Download tar.bz2')
|
2016-12-05 13:55:57 -05:00
|
|
|
%li
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to archive_project_repository_path(project, ref: ref, format: 'tar'), rel: 'nofollow', download: '' do
|
2016-12-05 13:55:57 -05:00
|
|
|
%i.fa.fa-download
|
2017-06-07 16:13:44 -04:00
|
|
|
%span= _('Download tar')
|
2016-08-24 07:09:10 -04:00
|
|
|
|
2016-12-05 13:55:57 -05:00
|
|
|
- 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
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to latest_succeeded_project_artifacts_path(project, "#{ref}/download", job: job.name), rel: 'nofollow', download: '' do
|
2016-12-05 13:55:57 -05:00
|
|
|
%i.fa.fa-download
|
2017-06-07 16:13:44 -04:00
|
|
|
%span
|
|
|
|
#{ s_('DownloadArtifacts|Download') } '#{job.name}'
|