Make the dropdown match the design
Regenerate locale.pot as well
This commit is contained in:
parent
6766a0a144
commit
c0eb5cd7a2
|
|
@ -287,7 +287,7 @@
|
|||
list-style: none;
|
||||
padding: 0 1px;
|
||||
|
||||
a,
|
||||
a:not(.btn),
|
||||
button,
|
||||
.menu-item {
|
||||
@include dropdown-link;
|
||||
|
|
@ -351,6 +351,16 @@
|
|||
// Expects up to 3 digits on the badge
|
||||
margin-right: 40px;
|
||||
}
|
||||
|
||||
.dropdown-menu-content {
|
||||
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
|
||||
}
|
||||
|
||||
.inline-content {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.droplab-dropdown {
|
||||
|
|
|
|||
|
|
@ -9,44 +9,35 @@
|
|||
= sprite_icon("arrow-down")
|
||||
%ul.dropdown-menu.dropdown-menu-right{ role: 'menu' }
|
||||
- if directory?
|
||||
%li.dropdown-header
|
||||
#{ _('Directory') }
|
||||
%li
|
||||
= link_to project_archive_path(project, id: tree_join(ref, archive_prefix), path: @path, format: 'zip'), rel: 'nofollow', download: '' do
|
||||
%span= _('Download zip')
|
||||
%li
|
||||
= link_to project_archive_path(project, id: tree_join(ref, archive_prefix), path: @path, format: 'tar.gz'), rel: 'nofollow', download: '' do
|
||||
%span= _('Download tar.gz')
|
||||
%li
|
||||
= link_to project_archive_path(project, id: tree_join(ref, archive_prefix), path: @path, format: 'tar.bz2'), rel: 'nofollow', download: '' do
|
||||
%span= _('Download tar.bz2')
|
||||
%li
|
||||
= link_to project_archive_path(project, id: tree_join(ref, archive_prefix), path: @path, format: 'tar'), rel: 'nofollow', download: '' do
|
||||
%span= _('Download tar')
|
||||
%li.dropdown-header
|
||||
#{ _('Source code') }
|
||||
%li
|
||||
= link_to project_archive_path(project, id: tree_join(ref, archive_prefix), format: 'zip'), rel: 'nofollow', download: '' do
|
||||
%span= _('Download zip')
|
||||
%li
|
||||
= link_to project_archive_path(project, id: tree_join(ref, archive_prefix), format: 'tar.gz'), rel: 'nofollow', download: '' do
|
||||
%span= _('Download tar.gz')
|
||||
%li
|
||||
= link_to project_archive_path(project, id: tree_join(ref, archive_prefix), format: 'tar.bz2'), rel: 'nofollow', download: '' do
|
||||
%span= _('Download tar.bz2')
|
||||
%li
|
||||
= link_to project_archive_path(project, id: tree_join(ref, archive_prefix), format: 'tar'), rel: 'nofollow', download: '' do
|
||||
%span= _('Download tar')
|
||||
|
||||
%li.dropdown-bold-header= _('Download this directory')
|
||||
%li.dropdown-menu-content
|
||||
%ul
|
||||
%li.inline-content
|
||||
= 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.inline-content
|
||||
= 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.inline-content
|
||||
= 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.inline-content
|
||||
= link_to _('tar'), project_archive_path(project, id: tree_join(ref, archive_prefix), path: @path, format: 'tar'), rel: 'nofollow', download: '', class: 'btn btn-xs'
|
||||
%li.separator
|
||||
%li.dropdown-bold-header= _('Download source code')
|
||||
%li.dropdown-menu-content
|
||||
%ul
|
||||
%li.inline-content
|
||||
= 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.inline-content
|
||||
= 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.inline-content
|
||||
= 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.inline-content
|
||||
= link_to _('tar'), project_archive_path(project, id: tree_join(ref, archive_prefix), format: 'tar'), rel: 'nofollow', download: '', class: 'btn btn-xs'
|
||||
- if pipeline && pipeline.latest_builds_with_artifacts.any?
|
||||
%li.dropdown-header Artifacts
|
||||
%li.separator
|
||||
%li.dropdown-bold-header= _('Download artifacts')
|
||||
- unless pipeline.latest?
|
||||
- latest_pipeline = project.pipeline_for(ref)
|
||||
%li
|
||||
.unclickable= ci_status_for_statuseable(latest_pipeline)
|
||||
%li.dropdown-header Previous Artifacts
|
||||
%span.unclickable= ci_status_for_statuseable(project.pipeline_for(ref))
|
||||
%li.dropdown-header= _('Previous Artifacts')
|
||||
- pipeline.latest_builds_with_artifacts.each do |job|
|
||||
%li
|
||||
= link_to latest_succeeded_project_artifacts_path(project, "#{ref}/download", job: job.name), rel: 'nofollow', download: '' do
|
||||
%span
|
||||
#{s_('DownloadArtifacts|Download')} '#{job.name}'
|
||||
= link_to job.name, latest_succeeded_project_artifacts_path(project, "#{ref}/download", job: job.name), rel: 'nofollow', download: ''
|
||||
|
|
|
|||
|
|
@ -3004,19 +3004,10 @@ msgstr ""
|
|||
msgid "Download asset"
|
||||
msgstr ""
|
||||
|
||||
msgid "Download tar"
|
||||
msgid "Download source code"
|
||||
msgstr ""
|
||||
|
||||
msgid "Download tar.bz2"
|
||||
msgstr ""
|
||||
|
||||
msgid "Download tar.gz"
|
||||
msgstr ""
|
||||
|
||||
msgid "Download zip"
|
||||
msgstr ""
|
||||
|
||||
msgid "DownloadArtifacts|Download"
|
||||
msgid "Download this directory"
|
||||
msgstr ""
|
||||
|
||||
msgid "DownloadCommit|Email Patches"
|
||||
|
|
@ -6019,6 +6010,9 @@ msgstr ""
|
|||
msgid "Preview payload"
|
||||
msgstr ""
|
||||
|
||||
msgid "Previous Artifacts"
|
||||
msgstr ""
|
||||
|
||||
msgid "Prioritize"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -9989,6 +9983,15 @@ msgstr ""
|
|||
msgid "syntax is incorrect"
|
||||
msgstr ""
|
||||
|
||||
msgid "tar"
|
||||
msgstr ""
|
||||
|
||||
msgid "tar.bz2"
|
||||
msgstr ""
|
||||
|
||||
msgid "tar.gz"
|
||||
msgstr ""
|
||||
|
||||
msgid "this document"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -10023,3 +10026,6 @@ msgstr[1] ""
|
|||
|
||||
msgid "yaml invalid"
|
||||
msgstr ""
|
||||
|
||||
msgid "zip"
|
||||
msgstr ""
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ describe 'Download buttons in branches page' do
|
|||
it 'shows download artifacts button' do
|
||||
href = latest_succeeded_project_artifacts_path(project, 'binary-encoding/download', job: 'build')
|
||||
|
||||
expect(page).to have_link "Download '#{build.name}'", href: href
|
||||
expect(page).to have_link build.name, href: href
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ describe 'Projects > Files > Download buttons in files tree' do
|
|||
it 'shows download artifacts button' do
|
||||
href = latest_succeeded_project_artifacts_path(project, "#{project.default_branch}/download", job: 'build')
|
||||
|
||||
expect(page).to have_link "Download '#{build.name}'", href: href
|
||||
expect(page).to have_link build.name, href: href
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -35,11 +35,10 @@ describe 'Projects > Show > Download buttons' do
|
|||
it 'shows download artifacts button' do
|
||||
href = latest_succeeded_project_artifacts_path(project, "#{project.default_branch}/download", job: 'build')
|
||||
|
||||
expect(page).to have_link "Download '#{build.name}'", href: href
|
||||
expect(page).to have_link build.name, href: href
|
||||
end
|
||||
|
||||
it 'download links have download attribute' do
|
||||
expect(page).to have_selector('a', text: 'Download')
|
||||
page.all('a', text: 'Download').each do |link|
|
||||
expect(link[:download]).to eq ''
|
||||
end
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ describe 'Download buttons in tags page' do
|
|||
it 'shows download artifacts button' do
|
||||
href = latest_succeeded_project_artifacts_path(project, "#{tag}/download", job: 'build')
|
||||
|
||||
expect(page).to have_link "Download '#{build.name}'", href: href
|
||||
expect(page).to have_link build.name, href: href
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue