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
e998d6fb
Commit
e998d6fb
authored
Dec 14, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify graph status badge partial and require locals
parent
acc4b73c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
_graph_badge.html.haml
app/views/ci/status/_graph_badge.html.haml
+11
-11
No files found.
app/views/ci/status/_graph_badge.html.haml
View file @
e998d6fb
-# Renders the graph node with both the status icon, status name and action icon
-
detailed_status
=
subject
.
detailed_status
(
current_user
)
-
details_path
=
detailed_status
.
details_path
if
detailed_status
.
has_details?
-
klass
=
"ci-status-icon ci-status-icon-
#{
detailed_
status
}
"
-
subject
=
local_assigns
.
fetch
(
:subject
)
-
status
=
subject
.
detailed_status
(
current_user
)
-
klass
=
"ci-status-icon ci-status-icon-
#{
status
}
"
-
if
details_path
=
link_to
details_path
,
data:
{
toggle:
'tooltip'
,
title:
"
#{
subject
.
name
}
-
#{
detailed_
status
}
"
}
do
%span
{
class:
klass
}=
custom_icon
(
detailed_
status
.
icon
)
-
if
status
.
has_details?
=
link_to
status
.
details_path
,
data:
{
toggle:
'tooltip'
,
title:
"
#{
subject
.
name
}
-
#{
status
}
"
}
do
%span
{
class:
klass
}=
custom_icon
(
status
.
icon
)
.ci-status-text
=
subject
.
name
-
else
%span
{
class:
klass
}=
custom_icon
(
detailed_
status
.
icon
)
%span
{
class:
klass
}=
custom_icon
(
status
.
icon
)
.ci-status-text
=
subject
.
name
-
if
detailed_
status
.
has_action?
=
link_to
detailed_status
.
action_path
,
method:
detailed_
status
.
action_method
,
title:
"
#{
subject
.
name
}
:
#{
detailed_
status
.
action_title
}
"
,
class:
'ci-action-icon-container'
do
-
if
status
.
has_action?
=
link_to
status
.
action_path
,
method:
status
.
action_method
,
title:
"
#{
subject
.
name
}
:
#{
status
.
action_title
}
"
,
class:
'ci-action-icon-container'
do
%i
.ci-action-icon-wrapper
=
icon
(
detailed_status
.
action_icon
,
class:
detailed_
status
.
action_class
)
=
icon
(
status
.
action_icon
,
class:
status
.
action_class
)
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