Commit 68a0ba94 authored by Patrick Bajao's avatar Patrick Bajao

Add download_links partial to DRY up a bit

parent 71ec6a4d
......@@ -10,28 +10,12 @@
%ul.dropdown-menu.dropdown-menu-right{ role: 'menu' }
%li.dropdown-bold-header= _('Download source code')
%li.dropdown-menu-content
%ul
%li.d-inline-block.m-0.p-0
= link_to 'zip', project_archive_path(project, id: tree_join(ref, archive_prefix), format: 'zip'), rel: 'nofollow', download: '', class: 'btn btn-primary btn-xs'
%li.d-inline-block.m-0.p-0
= link_to 'tar.gz', project_archive_path(project, id: tree_join(ref, archive_prefix), format: 'tar.gz'), rel: 'nofollow', download: '', class: 'btn btn-xs'
%li.d-inline-block.m-0.p-0
= link_to 'tar.bz2', project_archive_path(project, id: tree_join(ref, archive_prefix), format: 'tar.bz2'), rel: 'nofollow', download: '', class: 'btn btn-xs'
%li.d-inline-block.m-0.p-0
= link_to 'tar', project_archive_path(project, id: tree_join(ref, archive_prefix), format: 'tar'), rel: 'nofollow', download: '', class: 'btn btn-xs'
= render 'projects/buttons/download_links', project: project, ref: ref, archive_prefix: archive_prefix, path: nil
- if directory?
%li.separator
%li.dropdown-bold-header= _('Download this directory')
%li.dropdown-menu-content
%ul
%li.d-inline-block.m-0.p-0
= link_to 'zip', project_archive_path(project, id: tree_join(ref, archive_prefix), path: @path, format: 'zip'), rel: 'nofollow', download: '', class: 'btn btn-primary btn-xs'
%li.d-inline-block.m-0.p-0
= link_to 'tar.gz', project_archive_path(project, id: tree_join(ref, archive_prefix), path: @path, format: 'tar.gz'), rel: 'nofollow', download: '', class: 'btn btn-xs'
%li.d-inline-block.m-0.p-0
= link_to 'tar.bz2', project_archive_path(project, id: tree_join(ref, archive_prefix), path: @path, format: 'tar.bz2'), rel: 'nofollow', download: '', class: 'btn btn-xs'
%li.d-inline-block.m-0.p-0
= link_to 'tar', project_archive_path(project, id: tree_join(ref, archive_prefix), path: @path, format: 'tar'), rel: 'nofollow', download: '', class: 'btn btn-xs'
= render 'projects/buttons/download_links', project: project, ref: ref, archive_prefix: archive_prefix, path: @path
- if pipeline && pipeline.latest_builds_with_artifacts.any?
%li.separator
%li.dropdown-bold-header= _('Download artifacts')
......
%ul
%li.d-inline-block.m-0.p-0
= link_to 'zip', project_archive_path(project, id: tree_join(ref, archive_prefix), path: path, format: 'zip'), rel: 'nofollow', download: '', class: 'btn btn-primary btn-xs'
%li.d-inline-block.m-0.p-0
= link_to 'tar.gz', project_archive_path(project, id: tree_join(ref, archive_prefix), path: path, format: 'tar.gz'), rel: 'nofollow', download: '', class: 'btn btn-xs'
%li.d-inline-block.m-0.p-0
= link_to 'tar.bz2', project_archive_path(project, id: tree_join(ref, archive_prefix), path: path, format: 'tar.bz2'), rel: 'nofollow', download: '', class: 'btn btn-xs'
%li.d-inline-block.m-0.p-0
= link_to 'tar', project_archive_path(project, id: tree_join(ref, archive_prefix), path: path, format: 'tar'), rel: 'nofollow', download: '', class: 'btn btn-xs'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment