Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
c0eb5cd7
Commit
c0eb5cd7
authored
Apr 01, 2019
by
Patrick Bajao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the dropdown match the design
Regenerate locale.pot as well
parent
6766a0a1
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
54 deletions
+60
-54
app/assets/stylesheets/framework/dropdowns.scss
app/assets/stylesheets/framework/dropdowns.scss
+11
-1
app/views/projects/buttons/_download.html.haml
app/views/projects/buttons/_download.html.haml
+28
-37
locale/gitlab.pot
locale/gitlab.pot
+17
-11
spec/features/projects/branches/download_buttons_spec.rb
spec/features/projects/branches/download_buttons_spec.rb
+1
-1
spec/features/projects/files/download_buttons_spec.rb
spec/features/projects/files/download_buttons_spec.rb
+1
-1
spec/features/projects/show/download_buttons_spec.rb
spec/features/projects/show/download_buttons_spec.rb
+1
-2
spec/features/projects/tags/download_buttons_spec.rb
spec/features/projects/tags/download_buttons_spec.rb
+1
-1
No files found.
app/assets/stylesheets/framework/dropdowns.scss
View file @
c0eb5cd7
...
@@ -287,7 +287,7 @@
...
@@ -287,7 +287,7 @@
list-style
:
none
;
list-style
:
none
;
padding
:
0
1px
;
padding
:
0
1px
;
a
,
a
:not
(
.btn
)
,
button
,
button
,
.menu-item
{
.menu-item
{
@include
dropdown-link
;
@include
dropdown-link
;
...
@@ -351,6 +351,16 @@
...
@@ -351,6 +351,16 @@
// Expects up to 3 digits on the badge
// Expects up to 3 digits on the badge
margin-right
:
40px
;
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
{
.droplab-dropdown
{
...
...
app/views/projects/buttons/_download.html.haml
View file @
c0eb5cd7
...
@@ -9,44 +9,35 @@
...
@@ -9,44 +9,35 @@
=
sprite_icon
(
"arrow-down"
)
=
sprite_icon
(
"arrow-down"
)
%ul
.dropdown-menu.dropdown-menu-right
{
role:
'menu'
}
%ul
.dropdown-menu.dropdown-menu-right
{
role:
'menu'
}
-
if
directory?
-
if
directory?
%li
.dropdown-header
%li
.dropdown-bold-header
=
_
(
'Download this directory'
)
#{
_
(
'Directory'
)
}
%li
.dropdown-menu-content
%li
%ul
=
link_to
project_archive_path
(
project
,
id:
tree_join
(
ref
,
archive_prefix
),
path:
@path
,
format:
'zip'
),
rel:
'nofollow'
,
download:
''
do
%li
.inline-content
%span
=
_
(
'Download zip'
)
=
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
%li
.inline-content
=
link_to
project_archive_path
(
project
,
id:
tree_join
(
ref
,
archive_prefix
),
path:
@path
,
format:
'tar.gz'
),
rel:
'nofollow'
,
download:
''
do
=
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'
%span
=
_
(
'Download tar.gz'
)
%li
.inline-content
%li
=
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'
=
link_to
project_archive_path
(
project
,
id:
tree_join
(
ref
,
archive_prefix
),
path:
@path
,
format:
'tar.bz2'
),
rel:
'nofollow'
,
download:
''
do
%li
.inline-content
%span
=
_
(
'Download tar.bz2'
)
=
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
%li
.separator
=
link_to
project_archive_path
(
project
,
id:
tree_join
(
ref
,
archive_prefix
),
path:
@path
,
format:
'tar'
),
rel:
'nofollow'
,
download:
''
do
%li
.dropdown-bold-header
=
_
(
'Download source code'
)
%span
=
_
(
'Download tar'
)
%li
.dropdown-menu-content
%li
.dropdown-header
%ul
#{
_
(
'Source code'
)
}
%li
.inline-content
%li
=
link_to
_
(
'zip'
),
project_archive_path
(
project
,
id:
tree_join
(
ref
,
archive_prefix
),
format:
'zip'
),
rel:
'nofollow'
,
download:
''
,
class:
'btn btn-primary btn-xs'
=
link_to
project_archive_path
(
project
,
id:
tree_join
(
ref
,
archive_prefix
),
format:
'zip'
),
rel:
'nofollow'
,
download:
''
do
%li
.inline-content
%span
=
_
(
'Download zip'
)
=
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
%li
.inline-content
=
link_to
project_archive_path
(
project
,
id:
tree_join
(
ref
,
archive_prefix
),
format:
'tar.gz'
),
rel:
'nofollow'
,
download:
''
do
=
link_to
_
(
'tar.bz2'
),
project_archive_path
(
project
,
id:
tree_join
(
ref
,
archive_prefix
),
format:
'tar.bz2'
),
rel:
'nofollow'
,
download:
''
,
class:
'btn btn-xs'
%span
=
_
(
'Download tar.gz'
)
%li
.inline-content
%li
=
link_to
_
(
'tar'
),
project_archive_path
(
project
,
id:
tree_join
(
ref
,
archive_prefix
),
format:
'tar'
),
rel:
'nofollow'
,
download:
''
,
class:
'btn btn-xs'
=
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'
)
-
if
pipeline
&&
pipeline
.
latest_builds_with_artifacts
.
any?
-
if
pipeline
&&
pipeline
.
latest_builds_with_artifacts
.
any?
%li
.dropdown-header
Artifacts
%li
.separator
%li
.dropdown-bold-header
=
_
(
'Download artifacts'
)
-
unless
pipeline
.
latest?
-
unless
pipeline
.
latest?
-
latest_pipeline
=
project
.
pipeline_for
(
ref
)
%span
.unclickable
=
ci_status_for_statuseable
(
project
.
pipeline_for
(
ref
))
%li
%li
.dropdown-header
=
_
(
'Previous Artifacts'
)
.unclickable
=
ci_status_for_statuseable
(
latest_pipeline
)
%li
.dropdown-header
Previous Artifacts
-
pipeline
.
latest_builds_with_artifacts
.
each
do
|
job
|
-
pipeline
.
latest_builds_with_artifacts
.
each
do
|
job
|
%li
%li
=
link_to
latest_succeeded_project_artifacts_path
(
project
,
"
#{
ref
}
/download"
,
job:
job
.
name
),
rel:
'nofollow'
,
download:
''
do
=
link_to
job
.
name
,
latest_succeeded_project_artifacts_path
(
project
,
"
#{
ref
}
/download"
,
job:
job
.
name
),
rel:
'nofollow'
,
download:
''
%span
#{
s_
(
'DownloadArtifacts|Download'
)
}
'
#{
job
.
name
}
'
locale/gitlab.pot
View file @
c0eb5cd7
...
@@ -3004,19 +3004,10 @@ msgstr ""
...
@@ -3004,19 +3004,10 @@ msgstr ""
msgid "Download asset"
msgid "Download asset"
msgstr ""
msgstr ""
msgid "Download
tar
"
msgid "Download
source code
"
msgstr ""
msgstr ""
msgid "Download tar.bz2"
msgid "Download this directory"
msgstr ""
msgid "Download tar.gz"
msgstr ""
msgid "Download zip"
msgstr ""
msgid "DownloadArtifacts|Download"
msgstr ""
msgstr ""
msgid "DownloadCommit|Email Patches"
msgid "DownloadCommit|Email Patches"
...
@@ -6019,6 +6010,9 @@ msgstr ""
...
@@ -6019,6 +6010,9 @@ msgstr ""
msgid "Preview payload"
msgid "Preview payload"
msgstr ""
msgstr ""
msgid "Previous Artifacts"
msgstr ""
msgid "Prioritize"
msgid "Prioritize"
msgstr ""
msgstr ""
...
@@ -9989,6 +9983,15 @@ msgstr ""
...
@@ -9989,6 +9983,15 @@ msgstr ""
msgid "syntax is incorrect"
msgid "syntax is incorrect"
msgstr ""
msgstr ""
msgid "tar"
msgstr ""
msgid "tar.bz2"
msgstr ""
msgid "tar.gz"
msgstr ""
msgid "this document"
msgid "this document"
msgstr ""
msgstr ""
...
@@ -10023,3 +10026,6 @@ msgstr[1] ""
...
@@ -10023,3 +10026,6 @@ msgstr[1] ""
msgid "yaml invalid"
msgid "yaml invalid"
msgstr ""
msgstr ""
msgid "zip"
msgstr ""
spec/features/projects/branches/download_buttons_spec.rb
View file @
c0eb5cd7
...
@@ -35,7 +35,7 @@ describe 'Download buttons in branches page' do
...
@@ -35,7 +35,7 @@ describe 'Download buttons in branches page' do
it
'shows download artifacts button'
do
it
'shows download artifacts button'
do
href
=
latest_succeeded_project_artifacts_path
(
project
,
'binary-encoding/download'
,
job:
'build'
)
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
end
end
end
...
...
spec/features/projects/files/download_buttons_spec.rb
View file @
c0eb5cd7
...
@@ -30,7 +30,7 @@ describe 'Projects > Files > Download buttons in files tree' do
...
@@ -30,7 +30,7 @@ describe 'Projects > Files > Download buttons in files tree' do
it
'shows download artifacts button'
do
it
'shows download artifacts button'
do
href
=
latest_succeeded_project_artifacts_path
(
project
,
"
#{
project
.
default_branch
}
/download"
,
job:
'build'
)
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
end
end
end
spec/features/projects/show/download_buttons_spec.rb
View file @
c0eb5cd7
...
@@ -35,11 +35,10 @@ describe 'Projects > Show > Download buttons' do
...
@@ -35,11 +35,10 @@ describe 'Projects > Show > Download buttons' do
it
'shows download artifacts button'
do
it
'shows download artifacts button'
do
href
=
latest_succeeded_project_artifacts_path
(
project
,
"
#{
project
.
default_branch
}
/download"
,
job:
'build'
)
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
it
'download links have download attribute'
do
it
'download links have download attribute'
do
expect
(
page
).
to
have_selector
(
'a'
,
text:
'Download'
)
page
.
all
(
'a'
,
text:
'Download'
).
each
do
|
link
|
page
.
all
(
'a'
,
text:
'Download'
).
each
do
|
link
|
expect
(
link
[
:download
]).
to
eq
''
expect
(
link
[
:download
]).
to
eq
''
end
end
...
...
spec/features/projects/tags/download_buttons_spec.rb
View file @
c0eb5cd7
...
@@ -36,7 +36,7 @@ describe 'Download buttons in tags page' do
...
@@ -36,7 +36,7 @@ describe 'Download buttons in tags page' do
it
'shows download artifacts button'
do
it
'shows download artifacts button'
do
href
=
latest_succeeded_project_artifacts_path
(
project
,
"
#{
tag
}
/download"
,
job:
'build'
)
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
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment