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
Boxiang Sun
gitlab-ce
Commits
5fa6af05
Commit
5fa6af05
authored
Jul 18, 2016
by
Annabel Dunstone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add artifacts to view branch page download dropdown
parent
e00fb385
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
17 deletions
+14
-17
app/views/projects/repositories/_download_archive.html.haml
app/views/projects/repositories/_download_archive.html.haml
+13
-16
app/views/projects/tree/show.html.haml
app/views/projects/tree/show.html.haml
+1
-1
No files found.
app/views/projects/repositories/_download_archive.html.haml
View file @
5fa6af05
-
ref
=
ref
||
nil
-
btn_class
=
btn_class
||
''
-
split_button
=
split_button
||
false
-
if
split_button
==
true
%span
.btn-group
{
class:
btn_class
}
=
link_to
archive_namespace_project_repository_path
(
@project
.
namespace
,
@project
,
ref:
ref
,
format:
'zip'
),
class:
'btn col-xs-10'
,
rel:
'nofollow'
do
%i
.fa.fa-download
%span
Download zip
%a
.col-xs-2.btn.dropdown-toggle
{
'data-toggle'
=>
'dropdown'
}
%span
.btn-group
{
class:
btn_class
}
.dropdown.inline
%button
.btn
{
'data-toggle'
=>
'dropdown'
}
=
icon
(
'download'
)
%span
.caret
%span
.sr-only
Select Archive Format
%ul
.col-xs-10.dropdown-menu.dropdown-menu-align-right
{
role:
'menu'
}
%ul
.dropdown-menu.dropdown-menu-align-right
{
role:
'menu'
}
%li
.dropdown-header
Source code
%li
=
link_to
archive_namespace_project_repository_path
(
@project
.
namespace
,
@project
,
ref:
ref
,
format:
'zip'
),
rel:
'nofollow'
do
%i
.fa.fa-download
...
...
@@ -27,11 +25,10 @@
=
link_to
archive_namespace_project_repository_path
(
@project
.
namespace
,
@project
,
ref:
ref
,
format:
'tar'
),
rel:
'nofollow'
do
%i
.fa.fa-download
%span
Download tar
-
else
%span
.btn-group
{
class:
btn_class
}
=
link_to
archive_namespace_project_repository_path
(
@project
.
namespace
,
@project
,
ref:
ref
,
format:
'zip'
),
class:
'btn'
,
rel:
'nofollow'
do
%i
.fa.fa-download
%span
zip
=
link_to
archive_namespace_project_repository_path
(
@project
.
namespace
,
@project
,
ref:
ref
,
format:
'tar.gz'
),
class:
'btn'
,
rel:
'nofollow'
do
%i
.fa.fa-download
%span
tar.gz
-
artifacts
=
@project
.
latest_success_builds_for
(
@ref
)
-
if
artifacts
.
any?
%li
.dropdown-header
Artifacts
-
artifacts
.
each
do
|
job
|
%li
=
link_to
download_namespace_project_build_artifacts_path
(
@project
.
namespace
,
@project
,
job
),
rel:
'nofollow'
do
%span
Download '
#{
job
.
name
}
'
app/views/projects/tree/show.html.haml
View file @
5fa6af05
...
...
@@ -11,7 +11,7 @@
.tree-controls
=
render
'projects/find_file_link'
-
if
can?
current_user
,
:download_code
,
@project
=
render
'projects/repositories/download_archive'
,
ref:
@ref
,
btn_class:
'hidden-xs hidden-sm btn-grouped'
,
split_button:
true
=
render
'projects/repositories/download_archive'
,
ref:
@ref
,
btn_class:
'hidden-xs hidden-sm btn-grouped'
#tree-holder
.tree-holder.clearfix
.nav-block
...
...
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