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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
0bd52500
Commit
0bd52500
authored
Oct 13, 2016
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move sidebar build class into helper
parent
87222e27
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
app/helpers/builds_helper.rb
app/helpers/builds_helper.rb
+7
-0
app/views/projects/builds/_sidebar.html.haml
app/views/projects/builds/_sidebar.html.haml
+2
-2
app/views/projects/ci/builds/_build.html.haml
app/views/projects/ci/builds/_build.html.haml
+1
-1
No files found.
app/helpers/builds_helper.rb
0 → 100644
View file @
0bd52500
module
BuildsHelper
def
sidebar_build_class
(
build
,
current_build
)
build_class
=
''
build_class
+=
' active'
if
build
==
current_build
build_class
+=
' retried'
if
build
.
retried?
end
end
app/views/projects/builds/_sidebar.html.haml
View file @
0bd52500
...
...
@@ -126,7 +126,7 @@
.builds-container
-
statuses
.
each
do
|
build_status
|
-
builds
.
select
{
|
build
|
build
.
status
==
build_status
}.
each
do
|
build
|
.build-job
{
class:
(
'active'
if
build
==
@build
;
'retried'
if
build
.
retried?
),
data:
{
stage:
build
.
stage
}}
.build-job
{
class:
sidebar_build_class
(
build
,
@build
),
data:
{
stage:
build
.
stage
}}
=
link_to
namespace_project_build_path
(
@project
.
namespace
,
@project
,
build
)
do
=
icon
(
'arrow-right'
)
=
ci_icon_for_status
(
build
.
status
)
...
...
@@ -136,4 +136,4 @@
-
else
=
build
.
id
-
if
build
.
retried?
%i
.fa.fa-refresh.has-tooltip
{
data:
{
container:
'body'
,
placement:
'bottom'
},
title:
'
This b
uild was retried'
}
%i
.fa.fa-refresh.has-tooltip
{
data:
{
container:
'body'
,
placement:
'bottom'
},
title:
'
B
uild was retried'
}
app/views/projects/ci/builds/_build.html.haml
View file @
0bd52500
...
...
@@ -37,7 +37,7 @@
=
icon
(
'warning'
,
class:
'text-warning has-tooltip'
,
title:
'Build is stuck. Check runners.'
)
-
if
defined?
(
retried
)
&&
retried
=
icon
(
'refresh'
,
class:
'text-warning has-tooltip'
,
title:
'Build was retried
.
'
)
=
icon
(
'refresh'
,
class:
'text-warning has-tooltip'
,
title:
'Build was retried'
)
.label-container
-
if
build
.
tags
.
any?
...
...
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