2023-01-13 00:05:48 +05:30
|
|
|
- project = local_assigns.fetch(:project)
|
|
|
|
- ref = local_assigns.fetch(:ref)
|
2018-03-17 18:26:18 +05:30
|
|
|
- pipeline = local_assigns.fetch(:pipeline) { project.latest_successful_pipeline_for(ref) }
|
2017-08-17 22:00:37 +05:30
|
|
|
|
2016-09-29 09:46:39 +05:30
|
|
|
- if !project.empty_repo? && can?(current_user, :download_code, project)
|
2018-05-09 12:01:36 +05:30
|
|
|
- archive_prefix = "#{project.path}-#{ref.tr('/', '-')}"
|
2023-03-04 22:38:38 +05:30
|
|
|
.project-action-button.dropdown.gl-dropdown.inline>
|
2021-09-04 01:27:46 +05:30
|
|
|
%button.gl-button.btn.btn-default.dropdown-toggle.gl-dropdown-toggle.dropdown-icon-only.has-tooltip{ title: s_('DownloadSource|Download'), 'data-toggle' => 'dropdown', 'aria-label' => s_('DownloadSource|Download'), 'data-display' => 'static', data: { qa_selector: 'download_source_code_button' } }
|
|
|
|
= sprite_icon('download', css_class: 'gl-icon dropdown-icon')
|
2017-09-10 17:25:29 +05:30
|
|
|
%span.sr-only= _('Select Archive Format')
|
2021-09-04 01:27:46 +05:30
|
|
|
= sprite_icon('chevron-down', css_class: 'gl-icon dropdown-chevron')
|
2019-07-31 22:56:46 +05:30
|
|
|
.dropdown-menu.dropdown-menu-right{ role: 'menu' }
|
|
|
|
%section
|
|
|
|
%h5.m-0.dropdown-bold-header= _('Download source code')
|
|
|
|
.dropdown-menu-content
|
|
|
|
= render 'projects/buttons/download_links', project: project, ref: ref, archive_prefix: archive_prefix, path: nil
|
2020-07-28 23:09:34 +05:30
|
|
|
#js-directory-downloads{ data: { links: directory_download_links(project, ref, archive_prefix).to_json } }
|
2018-03-17 18:26:18 +05:30
|
|
|
- if pipeline && pipeline.latest_builds_with_artifacts.any?
|
2019-07-31 22:56:46 +05:30
|
|
|
%section.border-top.pt-1.mt-1
|
|
|
|
%h5.m-0.dropdown-bold-header= _('Download artifacts')
|
|
|
|
- unless pipeline.latest?
|
2020-11-24 15:15:51 +05:30
|
|
|
%span.unclickable= ci_status_for_statuseable(project.latest_pipeline(ref))
|
2019-07-31 22:56:46 +05:30
|
|
|
%h6.m-0.dropdown-header= _('Previous Artifacts')
|
|
|
|
%ul
|
|
|
|
- pipeline.latest_builds_with_artifacts.each do |job|
|
|
|
|
%li= link_to job.name, latest_succeeded_project_artifacts_path(project, "#{ref}/download", job: job.name), rel: 'nofollow', download: ''
|