_download_archive.html.haml 1.76 KB
Newer Older
1 2
- ref = ref || nil
- btn_class = btn_class || ''
3
- split_button = split_button || false
4 5
- if split_button == true
  %span.btn-group{class: btn_class}
6
    = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), class: 'btn col-xs-10', rel: 'nofollow' do
Sullivan SENECHAL's avatar
Sullivan SENECHAL committed
7
      %i.fa.fa-download
8
      %span Download zip
9
    %a.col-xs-2.btn.dropdown-toggle{ 'data-toggle' => 'dropdown' }
10 11 12
      %span.caret
      %span.sr-only
        Select Archive Format
13
    %ul.col-xs-10.dropdown-menu.dropdown-menu-align-right{ role: 'menu' }
14
      %li
Vinnie Okada's avatar
Vinnie Okada committed
15
        = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), rel: 'nofollow' do
Sullivan SENECHAL's avatar
Sullivan SENECHAL committed
16
          %i.fa.fa-download
17 18
          %span Download zip
      %li
Vinnie Okada's avatar
Vinnie Okada committed
19
        = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'tar.gz'), rel: 'nofollow' do
Sullivan SENECHAL's avatar
Sullivan SENECHAL committed
20
          %i.fa.fa-download
21 22
          %span Download tar.gz
      %li
Vinnie Okada's avatar
Vinnie Okada committed
23
        = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'tar.bz2'), rel: 'nofollow' do
Sullivan SENECHAL's avatar
Sullivan SENECHAL committed
24
          %i.fa.fa-download
25 26
          %span Download tar.bz2
      %li
Vinnie Okada's avatar
Vinnie Okada committed
27
        = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'tar'), rel: 'nofollow' do
Sullivan SENECHAL's avatar
Sullivan SENECHAL committed
28
          %i.fa.fa-download
29 30 31
          %span Download tar
- else
  %span.btn-group{class: btn_class}
Vinnie Okada's avatar
Vinnie Okada committed
32
    = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), class: 'btn', rel: 'nofollow' do
Sullivan SENECHAL's avatar
Sullivan SENECHAL committed
33
      %i.fa.fa-download
34
      %span zip
Vinnie Okada's avatar
Vinnie Okada committed
35
    = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'tar.gz'), class: 'btn', rel: 'nofollow' do
Sullivan SENECHAL's avatar
Sullivan SENECHAL committed
36
      %i.fa.fa-download
37
      %span tar.gz