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
203c9040
Commit
203c9040
authored
Dec 08, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add icon_with_name_and_action and use it everywhere
parent
7c698475
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
41 deletions
+19
-41
app/views/ci/status/_icon_with_name.html.haml
app/views/ci/status/_icon_with_name.html.haml
+11
-0
app/views/ci/status/_icon_with_name_and_action.html.haml
app/views/ci/status/_icon_with_name_and_action.html.haml
+8
-0
app/views/projects/ci/builds/_build_pipeline.html.haml
app/views/projects/ci/builds/_build_pipeline.html.haml
+0
-31
app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml
...commit_statuses/_generic_commit_status_pipeline.html.haml
+0
-10
No files found.
app/views/ci/status/_icon_with_name.html.haml
0 → 100644
View file @
203c9040
-
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
}
"
-
if
details_path
=
link_to
details_path
,
class:
klass
,
data:
{
toggle:
'tooltip'
,
title:
"
#{
subject
.
name
}
-
#{
detailed_status
}
"
}
do
%span
{
class:
klass
}=
custom_icon
(
detailed_status
.
icon
)
.ci-status-text
=
subject
.
name
-
else
%span
{
class:
klass
}=
custom_icon
(
detailed_status
.
icon
)
.ci-status-text
=
subject
.
name
app/views/ci/status/_icon_with_name_and_action.html.haml
0 → 100644
View file @
203c9040
=
render
"ci/status/icon_with_name"
,
subject:
subject
-
detailed_status
=
subject
.
detailed_status
(
current_user
)
-
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
%i
.ci-action-icon-wrapper
=
icon
(
detailed_status
.
action_icon
,
class:
detailed_status
.
action_class
)
app/views/projects/ci/builds/_build_pipeline.html.haml
deleted
100644 → 0
View file @
7c698475
-
is_playable
=
subject
.
playable?
&&
can?
(
current_user
,
:update_build
,
@project
)
-
can_cancel
=
subject
.
active?
&&
can?
(
current_user
,
:update_build
,
@project
)
-
can_retry
=
subject
.
retryable?
&&
can?
(
current_user
,
:update_build
,
@project
)
-
can_stop
=
subject
.
complete?
&&
subject
.
stops_environment?
&&
can?
(
current_user
,
:update_build
,
@project
)
-
if
can?
(
current_user
,
:read_build
,
@project
)
=
link_to
namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
),
data:
{
toggle:
'tooltip'
,
title:
"
#{
subject
.
name
}
-
#{
subject
.
status
}
"
,
container:
'.pipeline-graph'
,
placement:
'bottom'
}
do
%span
{
class:
"ci-status-icon ci-status-icon-#{subject.status}"
}
=
ci_icon_for_status
(
subject
.
status
)
.ci-status-text
=
subject
.
name
-
if
is_playable
=
link_to
play_namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
,
return_to:
request
.
original_url
),
method: :post
,
title:
"
#{
subject
.
name
}
- Play"
,
class:
'ci-action-icon-container'
do
%i
.ci-action-icon-wrapper
=
icon
(
'play'
,
class:
'ci-play-icon'
)
-
elsif
can_cancel
=
link_to
cancel_namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
,
return_to:
request
.
original_url
),
method: :post
,
title:
"
#{
subject
.
name
}
- Cancel"
,
class:
'ci-action-icon-container'
do
%i
.ci-action-icon-wrapper
=
icon
(
'ban'
)
-
elsif
can_retry
=
link_to
retry_namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
,
return_to:
request
.
original_url
),
method: :post
,
title:
"
#{
subject
.
name
}
- Retry"
,
class:
'ci-action-icon-container'
do
%i
.ci-action-icon-wrapper
=
icon
(
'refresh'
)
-
elsif
can_stop
=
link_to
play_namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
,
return_to:
request
.
original_url
),
method: :post
,
title:
"
#{
subject
.
name
}
- Stop"
,
class:
'ci-action-icon-container'
do
%i
.ci-action-icon-wrapper
=
icon
(
'stop'
)
-
else
%span
{
class:
"ci-status-icon ci-status-icon-#{subject.status}"
}
=
ci_icon_for_status
(
subject
.
status
)
app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml
deleted
100644 → 0
View file @
7c698475
%a
{
data:
{
toggle:
'tooltip'
,
title:
"#{subject.name} - #{subject.status}"
,
container:
'.pipeline-graph'
,
placement:
'bottom'
}
}
-
if
subject
.
target_url
=
link_to
subject
.
target_url
do
%span
{
class:
"ci-status-icon ci-status-icon-#{subject.status}"
}
=
ci_icon_for_status
(
subject
.
status
)
%span
.ci-status-text
=
subject
.
name
-
else
%span
{
class:
"ci-status-icon ci-status-icon-#{subject.status}"
}
=
ci_icon_for_status
(
subject
.
status
)
%span
.ci-status-text
=
subject
.
name
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