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
5c28f16a
Commit
5c28f16a
authored
Jul 17, 2016
by
Annabel Dunstone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add artifacts download button on project page and branches page
parent
faeaeda6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
2 deletions
+40
-2
app/assets/stylesheets/framework/lists.scss
app/assets/stylesheets/framework/lists.scss
+4
-0
app/views/projects/branches/_branch.html.haml
app/views/projects/branches/_branch.html.haml
+15
-0
app/views/projects/buttons/_download.html.haml
app/views/projects/buttons/_download.html.haml
+21
-2
No files found.
app/assets/stylesheets/framework/lists.scss
View file @
5c28f16a
...
...
@@ -157,6 +157,10 @@ ul.content-list {
margin-right
:
0
;
}
}
.artifacts-btn
{
margin-right
:
10px
;
}
}
// When dragging a list item
...
...
app/views/projects/branches/_branch.html.haml
View file @
5c28f16a
...
...
@@ -27,6 +27,21 @@
=
link_to
namespace_project_compare_index_path
(
@project
.
namespace
,
@project
,
from:
@repository
.
root_ref
,
to:
branch
.
name
),
class:
'btn btn-default'
,
method: :post
,
title:
"Compare"
do
Compare
-
artifacts
=
@project
.
builds_for
(
@repository
.
root_ref
).
latest
.
with_artifacts
-
if
artifacts
.
any?
.dropdown.inline.artifacts-btn
%a
.btn.dropdown-toggle
{
'data-toggle'
=>
'dropdown'
}
=
icon
(
'download'
)
%span
.caret
%span
.sr-only
Select Archive Format
%ul
.dropdown-menu.dropdown-menu-align-right
{
role:
'menu'
}
%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
}
'
-
if
can_remove_branch?
(
@project
,
branch
.
name
)
=
link_to
namespace_project_branch_path
(
@project
.
namespace
,
@project
,
branch
.
name
),
class:
'btn btn-remove remove-row has-tooltip'
,
title:
"Delete branch"
,
method: :delete
,
data:
{
confirm:
"Deleting the '
#{
branch
.
name
}
' branch cannot be undone. Are you sure?"
,
container:
'body'
},
remote:
true
do
=
icon
(
"trash-o"
)
...
...
app/views/projects/buttons/_download.html.haml
View file @
5c28f16a
-
unless
@project
.
empty_repo?
-
if
can?
current_user
,
:download_code
,
@project
=
link_to
archive_namespace_project_repository_path
(
@project
.
namespace
,
@project
,
ref:
@ref
,
format:
'zip'
),
class:
'btn has-tooltip'
,
data:
{
container:
"body"
},
rel:
'nofollow'
,
title:
"Download ZIP"
do
=
icon
(
'download'
)
.dropdown.inline.btn-group
%button
.btn
{
'data-toggle'
=>
'dropdown'
}
=
icon
(
'download'
)
%span
.caret
%span
.sr-only
Select Archive Format
%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
%span
Download zip
%li
=
link_to
archive_namespace_project_repository_path
(
@project
.
namespace
,
@project
,
ref:
@ref
,
format:
'tar.gz'
),
rel:
'nofollow'
do
%span
Download tar.gz
-
artifacts
=
@project
.
builds_for
(
@ref
).
latest
.
with_artifacts
-
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
}
'
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