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
Tatuya Kamada
gitlab-ce
Commits
ee33b3e6
Commit
ee33b3e6
authored
Aug 17, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use partials for downloading artifacts button
parent
75df5f6c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
63 deletions
+26
-63
app/views/projects/branches/_branch.html.haml
app/views/projects/branches/_branch.html.haml
+9
-21
app/views/projects/buttons/_artifacts.html.haml
app/views/projects/buttons/_artifacts.html.haml
+14
-0
app/views/projects/buttons/_download.html.haml
app/views/projects/buttons/_download.html.haml
+1
-14
app/views/projects/repositories/_download_archive.html.haml
app/views/projects/repositories/_download_archive.html.haml
+1
-14
app/views/projects/tags/_download.html.haml
app/views/projects/tags/_download.html.haml
+1
-14
No files found.
app/views/projects/branches/_branch.html.haml
View file @
ee33b3e6
...
@@ -27,27 +27,15 @@
...
@@ -27,27 +27,15 @@
=
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
=
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
Compare
-
pipeline
=
@project
.
pipelines
.
latest_successful_for
(
branch
.
name
)
-
if
@project
.
latest_successful_builds_for
(
branch
.
name
).
any?
-
if
pipeline
.dropdown.inline.artifacts-btn
-
artifacts
=
pipeline
.
builds
.
latest
.
with_artifacts
%a
.btn.dropdown-toggle
{
'data-toggle'
=>
'dropdown'
}
-
if
artifacts
.
any?
=
icon
(
'download'
)
.dropdown.inline.artifacts-btn
%span
.caret
%a
.btn.dropdown-toggle
{
'data-toggle'
=>
'dropdown'
}
%span
.sr-only
=
icon
(
'download'
)
Select Archive Format
%span
.caret
%ul
.dropdown-menu.dropdown-menu-align-right
{
role:
'menu'
}
%span
.sr-only
=
render
'projects/buttons/artifacts'
,
project:
@project
,
ref:
branch
.
name
Select Archive Format
%ul
.dropdown-menu.dropdown-menu-align-right
{
role:
'menu'
}
%li
.dropdown-header
Artifacts
-
unless
pipeline
.
latest?
-
latest_pipeline
=
@project
.
pipeline_for
(
branch
.
name
)
%li
.unclickable
=
ci_status_for_statuseable
(
latest_pipeline
)
%li
.dropdown-header
Previous Artifacts
-
artifacts
.
each
do
|
job
|
%li
=
link_to
latest_succeeded_namespace_project_artifacts_path
(
@project
.
namespace
,
@project
,
branch
.
name
,
'download'
,
job:
job
.
name
),
rel:
'nofollow'
do
%span
Download '
#{
job
.
name
}
'
-
if
can_remove_branch?
(
@project
,
branch
.
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
=
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
...
...
app/views/projects/buttons/_artifacts.html.haml
0 → 100644
View file @
ee33b3e6
-
pipeline
=
project
.
pipelines
.
latest_successful_for
(
ref
)
-
if
pipeline
-
artifacts
=
pipeline
.
builds
.
latest
.
with_artifacts
-
if
artifacts
.
any?
%li
.dropdown-header
Artifacts
-
unless
pipeline
.
latest?
-
latest_pipeline
=
project
.
pipeline_for
(
ref
)
%li
.unclickable
=
ci_status_for_statuseable
(
latest_pipeline
)
%li
.dropdown-header
Previous Artifacts
-
artifacts
.
each
do
|
job
|
%li
=
link_to
latest_succeeded_namespace_project_artifacts_path
(
project
.
namespace
,
project
,
ref
,
'download'
,
job:
job
.
name
),
rel:
'nofollow'
do
%span
Download '
#{
job
.
name
}
'
app/views/projects/buttons/_download.html.haml
View file @
ee33b3e6
...
@@ -14,17 +14,4 @@
...
@@ -14,17 +14,4 @@
%li
%li
=
link_to
archive_namespace_project_repository_path
(
@project
.
namespace
,
@project
,
ref:
@ref
,
format:
'tar.gz'
),
rel:
'nofollow'
do
=
link_to
archive_namespace_project_repository_path
(
@project
.
namespace
,
@project
,
ref:
@ref
,
format:
'tar.gz'
),
rel:
'nofollow'
do
%span
Download tar.gz
%span
Download tar.gz
-
pipeline
=
@project
.
pipelines
.
latest_successful_for
(
@ref
)
=
render
'projects/buttons/artifacts'
,
project:
@project
,
ref:
@ref
-
if
pipeline
-
artifacts
=
pipeline
.
builds
.
latest
.
with_artifacts
-
if
artifacts
.
any?
%li
.dropdown-header
Artifacts
-
unless
pipeline
.
latest?
-
latest_pipeline
=
@project
.
pipeline_for
(
@ref
)
%li
.unclickable
=
ci_status_for_statuseable
(
latest_pipeline
)
%li
.dropdown-header
Previous Artifacts
-
artifacts
.
each
do
|
job
|
%li
=
link_to
latest_succeeded_namespace_project_artifacts_path
(
@project
.
namespace
,
@project
,
@ref
,
'download'
,
job:
job
.
name
),
rel:
'nofollow'
do
%span
Download '
#{
job
.
name
}
'
app/views/projects/repositories/_download_archive.html.haml
View file @
ee33b3e6
...
@@ -25,17 +25,4 @@
...
@@ -25,17 +25,4 @@
=
link_to
archive_namespace_project_repository_path
(
@project
.
namespace
,
@project
,
ref:
ref
,
format:
'tar'
),
rel:
'nofollow'
do
=
link_to
archive_namespace_project_repository_path
(
@project
.
namespace
,
@project
,
ref:
ref
,
format:
'tar'
),
rel:
'nofollow'
do
%i
.fa.fa-download
%i
.fa.fa-download
%span
Download tar
%span
Download tar
-
pipeline
=
@project
.
pipelines
.
latest_successful_for
(
ref
)
=
render
'projects/buttons/artifacts'
,
project:
@project
,
ref:
ref
-
if
pipeline
-
artifacts
=
pipeline
.
builds
.
latest
.
with_artifacts
-
if
artifacts
.
any?
%li
.dropdown-header
Artifacts
-
unless
pipeline
.
latest?
-
latest_pipeline
=
@project
.
pipeline_for
(
ref
)
%li
.unclickable
=
ci_status_for_statuseable
(
latest_pipeline
)
%li
.dropdown-header
Previous Artifacts
-
artifacts
.
each
do
|
job
|
%li
=
link_to
latest_succeeded_namespace_project_artifacts_path
(
@project
.
namespace
,
@project
,
ref
,
'download'
,
job:
job
.
name
),
rel:
'nofollow'
do
%span
Download '
#{
job
.
name
}
'
app/views/projects/tags/_download.html.haml
View file @
ee33b3e6
...
@@ -12,17 +12,4 @@
...
@@ -12,17 +12,4 @@
%li
%li
=
link_to
archive_namespace_project_repository_path
(
project
.
namespace
,
project
,
ref:
ref
,
format:
'tar.gz'
),
rel:
'nofollow'
do
=
link_to
archive_namespace_project_repository_path
(
project
.
namespace
,
project
,
ref:
ref
,
format:
'tar.gz'
),
rel:
'nofollow'
do
%span
Download tar.gz
%span
Download tar.gz
-
pipeline
=
project
.
pipelines
.
latest_successful_for
(
ref
)
=
render
'projects/buttons/artifacts'
,
project:
project
,
ref:
ref
-
if
pipeline
-
artifacts
=
pipeline
.
builds
.
latest
.
with_artifacts
-
if
artifacts
.
any?
%li
.dropdown-header
Artifacts
-
unless
pipeline
.
latest?
-
latest_pipeline
=
project
.
pipeline_for
(
ref
)
%li
.unclickable
=
ci_status_for_statuseable
(
latest_pipeline
)
%li
.dropdown-header
Previous Artifacts
-
artifacts
.
each
do
|
job
|
%li
=
link_to
latest_succeeded_namespace_project_artifacts_path
(
project
.
namespace
,
project
,
ref
,
'download'
,
job:
job
.
name
),
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