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
68a0ba94
Commit
68a0ba94
authored
Apr 04, 2019
by
Patrick Bajao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add download_links partial to DRY up a bit
parent
71ec6a4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
18 deletions
+11
-18
app/views/projects/buttons/_download.html.haml
app/views/projects/buttons/_download.html.haml
+2
-18
app/views/projects/buttons/_download_links.html.haml
app/views/projects/buttons/_download_links.html.haml
+9
-0
No files found.
app/views/projects/buttons/_download.html.haml
View file @
68a0ba94
...
...
@@ -10,28 +10,12 @@
%ul
.dropdown-menu.dropdown-menu-right
{
role:
'menu'
}
%li
.dropdown-bold-header
=
_
(
'Download source code'
)
%li
.dropdown-menu-content
%ul
%li
.d-inline-block.m-0.p-0
=
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
.d-inline-block.m-0.p-0
=
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
.d-inline-block.m-0.p-0
=
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
.d-inline-block.m-0.p-0
=
link_to
'tar'
,
project_archive_path
(
project
,
id:
tree_join
(
ref
,
archive_prefix
),
format:
'tar'
),
rel:
'nofollow'
,
download:
''
,
class:
'btn btn-xs'
=
render
'projects/buttons/download_links'
,
project:
project
,
ref:
ref
,
archive_prefix:
archive_prefix
,
path:
nil
-
if
directory?
%li
.separator
%li
.dropdown-bold-header
=
_
(
'Download this directory'
)
%li
.dropdown-menu-content
%ul
%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'
%li
.d-inline-block.m-0.p-0
=
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
.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'
=
render
'projects/buttons/download_links'
,
project:
project
,
ref:
ref
,
archive_prefix:
archive_prefix
,
path:
@path
-
if
pipeline
&&
pipeline
.
latest_builds_with_artifacts
.
any?
%li
.separator
%li
.dropdown-bold-header
=
_
(
'Download artifacts'
)
...
...
app/views/projects/buttons/_download_links.html.haml
0 → 100644
View file @
68a0ba94
%ul
%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'
%li
.d-inline-block.m-0.p-0
=
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
.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'
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