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
d39e314c
Commit
d39e314c
authored
Sep 12, 2016
by
Katarzyna Kobierska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve build_path name and admin variable
parent
b902a963
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
14 deletions
+13
-14
app/views/admin/builds/index.html.haml
app/views/admin/builds/index.html.haml
+2
-2
app/views/projects/builds/_table.html.haml
app/views/projects/builds/_table.html.haml
+4
-5
app/views/projects/builds/index.html.haml
app/views/projects/builds/index.html.haml
+2
-2
app/views/projects/ci/builds/_build.html.haml
app/views/projects/ci/builds/_build.html.haml
+1
-1
app/views/shared/builds/_tabs.html.haml
app/views/shared/builds/_tabs.html.haml
+4
-4
No files found.
app/views/admin/builds/index.html.haml
View file @
d39e314c
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
%div
{
class:
container_class
}
%div
{
class:
container_class
}
.top-area
.top-area
-
build_path
=
->
(
scope
)
{
admin_builds_path
(
scope:
scope
)
}
-
build_path
_proc
=
->
(
scope
)
{
admin_builds_path
(
scope:
scope
)
}
=
render
"shared/builds/tabs"
,
build_path
:
build_path
,
all_builds:
@all_builds
,
scope:
@scope
=
render
"shared/builds/tabs"
,
build_path
_proc:
build_path_proc
,
all_builds:
@all_builds
,
scope:
@scope
.nav-controls
.nav-controls
-
if
@all_builds
.
running_or_pending
.
any?
-
if
@all_builds
.
running_or_pending
.
any?
...
...
app/views/projects/builds/_table.html.haml
View file @
d39e314c
-
admin
=
false
unless
admin
-
admin
=
false
unless
defined?
(
admin
)
-
if
builds
.
blank?
-
if
builds
.
blank?
%li
%li
.nothing-here-block
No builds to show
.nothing-here-block
No builds to show
...
@@ -15,13 +16,11 @@
...
@@ -15,13 +16,11 @@
%th
Stage
%th
Stage
%th
Name
%th
Name
%th
%th
%th
%th
Coverage
-
if
!
admin
&&
project
.
build_coverage_enabled?
Coverage
%th
%th
-
if
admin
-
if
admin
=
render
partial:
"projects/ci/builds/build"
,
collection:
builds
,
as: :build
,
locals:
{
commit_sha:
true
,
ref:
true
,
stage:
true
,
allow_retry:
true
,
runner:
true
,
admin:
true
}
=
render
partial:
"projects/ci/builds/build"
,
collection:
builds
,
as: :build
,
locals:
{
commit_sha:
true
,
ref:
true
,
stage:
true
,
allow_retry:
true
,
runner:
true
,
coverage:
true
,
admin:
true
}
-
else
-
else
=
render
partial:
"projects/ci/builds/build"
,
collection:
builds
,
as: :build
,
locals:
{
commit_sha:
true
,
ref:
true
,
stage:
true
,
allow_retry:
true
,
coverage:
project
.
build_coverage_enabled?
}
=
render
partial:
"projects/ci/builds/build"
,
collection:
builds
,
as: :build
,
locals:
{
commit_sha:
true
,
ref:
true
,
stage:
true
,
allow_retry:
true
,
coverage:
project
.
build_coverage_enabled?
}
...
...
app/views/projects/builds/index.html.haml
View file @
d39e314c
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
%div
{
class:
container_class
}
%div
{
class:
container_class
}
.top-area
.top-area
-
build_path
=
->
(
scope
)
{
project_builds_path
(
@project
,
scope:
scope
)
}
-
build_path
_proc
=
->
(
scope
)
{
project_builds_path
(
@project
,
scope:
scope
)
}
=
render
"shared/builds/tabs"
,
build_path
:
build_path
,
all_builds:
@all_builds
,
scope:
@scope
=
render
"shared/builds/tabs"
,
build_path
_proc:
build_path_proc
,
all_builds:
@all_builds
,
scope:
@scope
.nav-controls
.nav-controls
-
if
can?
(
current_user
,
:update_build
,
@project
)
-
if
can?
(
current_user
,
:update_build
,
@project
)
...
...
app/views/projects/ci/builds/_build.html.haml
View file @
d39e314c
-
admin
=
false
unless
admin
-
admin
=
false
unless
defined?
(
admin
)
%tr
.build.commit
%tr
.build.commit
%td
.status
%td
.status
...
...
app/views/shared/builds/_tabs.html.haml
View file @
d39e314c
%ul
.nav-links
%ul
.nav-links
%li
{
class:
(
'active'
if
scope
.
nil?
)}
%li
{
class:
(
'active'
if
scope
.
nil?
)}
=
link_to
build_path
.
call
(
nil
)
do
=
link_to
build_path
_proc
.
call
(
nil
)
do
All
All
%span
.badge.js-totalbuilds-count
%span
.badge.js-totalbuilds-count
=
number_with_delimiter
(
all_builds
.
count
(
:id
))
=
number_with_delimiter
(
all_builds
.
count
(
:id
))
%li
{
class:
(
'active'
if
scope
==
'pending'
)}
%li
{
class:
(
'active'
if
scope
==
'pending'
)}
=
link_to
build_path
.
call
(
'pending'
)
do
=
link_to
build_path
_proc
.
call
(
'pending'
)
do
Pending
Pending
%span
.badge
%span
.badge
=
number_with_delimiter
(
all_builds
.
pending
.
count
(
:id
))
=
number_with_delimiter
(
all_builds
.
pending
.
count
(
:id
))
%li
{
class:
(
'active'
if
scope
==
'running'
)}
%li
{
class:
(
'active'
if
scope
==
'running'
)}
=
link_to
build_path
.
call
(
'running'
)
do
=
link_to
build_path
_proc
.
call
(
'running'
)
do
Running
Running
%span
.badge
%span
.badge
=
number_with_delimiter
(
all_builds
.
running
.
count
(
:id
))
=
number_with_delimiter
(
all_builds
.
running
.
count
(
:id
))
%li
{
class:
(
'active'
if
scope
==
'finished'
)}
%li
{
class:
(
'active'
if
scope
==
'finished'
)}
=
link_to
build_path
.
call
(
'finished'
)
do
=
link_to
build_path
_proc
.
call
(
'finished'
)
do
Finished
Finished
%span
.badge
%span
.badge
=
number_with_delimiter
(
all_builds
.
finished
.
count
(
:id
))
=
number_with_delimiter
(
all_builds
.
finished
.
count
(
:id
))
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