BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
f86a5077
Commit
f86a5077
authored
Aug 16, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename to latest_succeeded, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5142#note_13908017
parent
11f840bf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
7 deletions
+8
-7
artifacts_controller.rb
app/controllers/projects/artifacts_controller.rb
+1
-1
_branch.html.haml
app/views/projects/branches/_branch.html.haml
+1
-1
_download.html.haml
app/views/projects/buttons/_download.html.haml
+1
-1
_download.html.haml
app/views/projects/tags/_download.html.haml
+1
-1
routes.rb
config/routes.rb
+4
-3
No files found.
app/controllers/projects/artifacts_controller.rb
View file @
f86a5077
...
...
@@ -34,7 +34,7 @@ class Projects::ArtifactsController < Projects::ApplicationController
redirect_to
namespace_project_build_path
(
project
.
namespace
,
project
,
build
)
end
def
search
def
latest_succeeded
path
=
params
[
:path
]
if
%w[download browse file]
.
include?
(
path
)
...
...
app/views/projects/branches/_branch.html.haml
View file @
f86a5077
...
...
@@ -46,7 +46,7 @@
%li
.dropdown-header
Previous Artifacts
-
artifacts
.
each
do
|
job
|
%li
=
link_to
search
_namespace_project_artifacts_path
(
@project
.
namespace
,
@project
,
branch
.
name
,
'download'
,
job:
job
.
name
),
rel:
'nofollow'
do
=
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
)
...
...
app/views/projects/buttons/_download.html.haml
View file @
f86a5077
...
...
@@ -26,5 +26,5 @@
%li
.dropdown-header
Previous Artifacts
-
artifacts
.
each
do
|
job
|
%li
=
link_to
search
_namespace_project_artifacts_path
(
@project
.
namespace
,
@project
,
@ref
,
'download'
,
job:
job
.
name
),
rel:
'nofollow'
do
=
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 @
f86a5077
...
...
@@ -24,5 +24,5 @@
%li
.dropdown-header
Previous Artifacts
-
artifacts
.
each
do
|
job
|
%li
=
link_to
search
_namespace_project_artifacts_path
(
project
.
namespace
,
project
,
ref
,
'download'
,
job:
job
.
name
),
rel:
'nofollow'
do
=
link_to
latest_succeeded
_namespace_project_artifacts_path
(
project
.
namespace
,
project
,
ref
,
'download'
,
job:
job
.
name
),
rel:
'nofollow'
do
%span
Download '
#{
job
.
name
}
'
config/routes.rb
View file @
f86a5077
...
...
@@ -765,9 +765,10 @@ Rails.application.routes.draw do
resources
:artifacts
,
only:
[]
do
collection
do
get
:search
,
path:
':ref_name/*path'
,
format:
false
,
constraints:
{
ref_name:
/.+/
}
# could have /
get
:latest_succeeded
,
path:
':ref_name/*path'
,
format:
false
,
constraints:
{
ref_name:
/.+/
}
# could have /
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