Commit e052d49a authored by Nick Thomas's avatar Nick Thomas

Fix styling issues with the download dropdown

parent 4d52131d
...@@ -287,7 +287,7 @@ ...@@ -287,7 +287,7 @@
list-style: none; list-style: none;
padding: 0 1px; padding: 0 1px;
a:not(.btn), a,
button, button,
.menu-item { .menu-item {
@include dropdown-link; @include dropdown-link;
......
...@@ -7,21 +7,22 @@ ...@@ -7,21 +7,22 @@
= sprite_icon('download') = sprite_icon('download')
%span.sr-only= _('Select Archive Format') %span.sr-only= _('Select Archive Format')
= sprite_icon("arrow-down") = sprite_icon("arrow-down")
%ul.dropdown-menu.dropdown-menu-right{ role: 'menu' } .dropdown-menu.dropdown-menu-right{ role: 'menu' }
%li.dropdown-bold-header= _('Download source code') %section
%li.dropdown-menu-content %h5.m-0.dropdown-bold-header= _('Download source code')
= render 'projects/buttons/download_links', project: project, ref: ref, archive_prefix: archive_prefix, path: nil .dropdown-menu-content
= render 'projects/buttons/download_links', project: project, ref: ref, archive_prefix: archive_prefix, path: nil
- if directory? && Feature.enabled?(:git_archive_path, default_enabled: true) - if directory? && Feature.enabled?(:git_archive_path, default_enabled: true)
%li.separator %section.border-top.pt-1.mt-1
%li.dropdown-bold-header= _('Download this directory') %h5.m-0.dropdown-bold-header= _('Download this directory')
%li.dropdown-menu-content .dropdown-menu-content
= render 'projects/buttons/download_links', project: project, ref: ref, archive_prefix: archive_prefix, path: @path = render 'projects/buttons/download_links', project: project, ref: ref, archive_prefix: archive_prefix, path: @path
- if pipeline && pipeline.latest_builds_with_artifacts.any? - if pipeline && pipeline.latest_builds_with_artifacts.any?
%li.separator %section.border-top.pt-1.mt-1
%li.dropdown-bold-header= _('Download artifacts') %h5.m-0.dropdown-bold-header= _('Download artifacts')
- unless pipeline.latest? - unless pipeline.latest?
%span.unclickable= ci_status_for_statuseable(project.pipeline_for(ref)) %span.unclickable= ci_status_for_statuseable(project.pipeline_for(ref))
%li.dropdown-header= _('Previous Artifacts') %h6.m-0.dropdown-header= _('Previous Artifacts')
- pipeline.latest_builds_with_artifacts.each do |job| %ul
%li - pipeline.latest_builds_with_artifacts.each do |job|
= link_to job.name, latest_succeeded_project_artifacts_path(project, "#{ref}/download", job: job.name), rel: 'nofollow', download: '' %li= link_to job.name, latest_succeeded_project_artifacts_path(project, "#{ref}/download", job: job.name), rel: 'nofollow', download: ''
%ul - formats = [['zip', 'btn-primary'], ['tar.gz'], ['tar.bz2'], ['tar']]
%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' .d-flex.justify-content-between
%li.d-inline-block.m-0.p-0 - formats.each do |(fmt, extra_class)|
= 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' = link_to fmt, project_archive_path(project, id: tree_join(ref, archive_prefix), path: path, format: fmt), rel: 'nofollow', download: '', class: "btn btn-xs #{extra_class}"
%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