dab1824679
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
37 lines
1.7 KiB
Text
37 lines
1.7 KiB
Text
- ref = ref || nil
|
|
- btn_class = btn_class || ''
|
|
- split_button = split_button || false
|
|
- if split_button == true
|
|
%span.btn-group{class: btn_class}
|
|
= link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), class: 'btn col-xs-10', rel: 'nofollow' do
|
|
%i.fa.fa-download
|
|
%span Download zip
|
|
%a.col-xs-2.btn.dropdown-toggle{ 'data-toggle' => 'dropdown' }
|
|
%span.caret
|
|
%span.sr-only
|
|
Select Archive Format
|
|
%ul.col-xs-10.dropdown-menu{ role: 'menu' }
|
|
%li
|
|
= link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), rel: 'nofollow' do
|
|
%i.fa.fa-download
|
|
%span Download zip
|
|
%li
|
|
= link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'tar.gz'), rel: 'nofollow' do
|
|
%i.fa.fa-download
|
|
%span Download tar.gz
|
|
%li
|
|
= link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'tar.bz2'), rel: 'nofollow' do
|
|
%i.fa.fa-download
|
|
%span Download tar.bz2
|
|
%li
|
|
= link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'tar'), rel: 'nofollow' do
|
|
%i.fa.fa-download
|
|
%span Download tar
|
|
- else
|
|
%span.btn-group{class: btn_class}
|
|
= link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), class: 'btn', rel: 'nofollow' do
|
|
%i.fa.fa-download
|
|
%span zip
|
|
= link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'tar.gz'), class: 'btn', rel: 'nofollow' do
|
|
%i.fa.fa-download
|
|
%span tar.gz
|