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
e81ed371
Commit
e81ed371
authored
Aug 10, 2016
by
Katarzyna Kobierska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change the way paths are generated
parent
516b2a12
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
15 deletions
+9
-15
app/controllers/admin/builds_controller.rb
app/controllers/admin/builds_controller.rb
+0
-2
app/controllers/projects/builds_controller.rb
app/controllers/projects/builds_controller.rb
+0
-2
app/views/admin/builds/index.html.haml
app/views/admin/builds/index.html.haml
+2
-3
app/views/projects/builds/_tabs.html.haml
app/views/projects/builds/_tabs.html.haml
+5
-5
app/views/projects/builds/index.html.haml
app/views/projects/builds/index.html.haml
+2
-3
No files found.
app/controllers/admin/builds_controller.rb
View file @
e81ed371
...
...
@@ -5,8 +5,6 @@ class Admin::BuildsController < Admin::ApplicationController
@builds
=
@all_builds
.
order
(
'created_at DESC'
)
@builds
=
case
@scope
when
'all'
@builds
when
'pending'
@builds
.
pending
.
reverse_order
when
'running'
...
...
app/controllers/projects/builds_controller.rb
View file @
e81ed371
...
...
@@ -10,8 +10,6 @@ class Projects::BuildsController < Projects::ApplicationController
@builds
=
@all_builds
.
order
(
'created_at DESC'
)
@builds
=
case
@scope
when
'all'
@builds
when
'pending'
@builds
.
pending
.
reverse_order
when
'running'
...
...
app/views/admin/builds/index.html.haml
View file @
e81ed371
...
...
@@ -4,9 +4,8 @@
%div
{
class:
container_class
}
.top-area
-
scopes
=
[
:all
,
:pending
,
:running
,
:finished
]
-
paths
=
scopes
.
zip
(
scopes
.
map
{
|
scope
|
admin_builds_path
(
scope:
scope
)
}).
to_h
=
render
"projects/builds/builds"
,
paths:
paths
-
build_path
=
->
(
scope
)
{
admin_builds_path
(
scope:
scope
)
}
=
render
"projects/builds/tabs"
,
build_path:
build_path
.nav-controls
-
if
@all_builds
.
running_or_pending
.
any?
...
...
app/views/projects/builds/_
build
s.html.haml
→
app/views/projects/builds/_
tab
s.html.haml
View file @
e81ed371
%ul
.nav-links
%li
{
class:
(
'active'
if
@scope
.
nil?
||
@scope
==
'all'
)}
=
link_to
paths
[
:al
l
]
do
%li
{
class:
(
'active'
if
@scope
.
nil?
)}
=
link_to
build_path
[
ni
l
]
do
All
%span
.badge.js-totalbuilds-count
=
number_with_delimiter
(
@all_builds
.
count
(
:id
))
%li
{
class:
(
'active'
if
@scope
==
'pending'
)}
=
link_to
paths
[
:pending
]
do
=
link_to
build_path
[
:pending
]
do
Pending
%span
.badge
=
number_with_delimiter
(
@all_builds
.
pending
.
count
(
:id
))
%li
{
class:
(
'active'
if
@scope
==
'running'
)}
=
link_to
paths
[
:running
]
do
=
link_to
build_path
[
:running
]
do
Running
%span
.badge
=
number_with_delimiter
(
@all_builds
.
running
.
count
(
:id
))
%li
{
class:
(
'active'
if
@scope
==
'finished'
)}
=
link_to
paths
[
:finished
]
do
=
link_to
build_path
[
:finished
]
do
Finished
%span
.badge
=
number_with_delimiter
(
@all_builds
.
finished
.
count
(
:id
))
app/views/projects/builds/index.html.haml
View file @
e81ed371
...
...
@@ -4,9 +4,8 @@
%div
{
class:
container_class
}
.top-area
-
scopes
=
[
:all
,
:pending
,
:running
,
:finished
]
-
paths
=
scopes
.
zip
(
scopes
.
map
{
|
scope
|
project_builds_path
(
@project
,
scope:
scope
)
}).
to_h
=
render
"builds"
,
paths:
paths
-
build_path
=
->
(
scope
)
{
project_builds_path
(
@project
,
scope:
scope
)
}
=
render
"tabs"
,
build_path:
build_path
.nav-controls
-
if
can?
(
current_user
,
:update_build
,
@project
)
...
...
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