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
8759770c
Commit
8759770c
authored
Sep 14, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-use as much of views as possible
parent
1ef8be76
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
58 deletions
+46
-58
app/views/projects/ci/builds/_build_pipeline.html.haml
app/views/projects/ci/builds/_build_pipeline.html.haml
+13
-14
app/views/projects/commit/_pipeline.html.haml
app/views/projects/commit/_pipeline.html.haml
+1
-7
app/views/projects/commit/_pipeline_grouped_status.html.haml
app/views/projects/commit/_pipeline_grouped_status.html.haml
+0
-27
app/views/projects/commit/_pipeline_stage.html.haml
app/views/projects/commit/_pipeline_stage.html.haml
+14
-0
app/views/projects/commit/_pipeline_status_group.html.haml
app/views/projects/commit/_pipeline_status_group.html.haml
+11
-0
app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml
...commit_statuses/_generic_commit_status_pipeline.html.haml
+7
-10
No files found.
app/views/projects/ci/builds/_build_pipeline.html.haml
View file @
8759770c
-
is_playable
=
subject
.
playable?
&&
can?
(
current_user
,
:update_build
,
@project
)
%li
.build
{
class:
(
"playable"
if
is_playable
)}
.curve
.build-content
-
if
is_playable
-
if
is_playable
=
link_to
play_namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Play'
do
=
render_status_with_link
(
'build'
,
'play'
)
.ci-status-text
=
subject
.
name
-
elsif
can?
(
current_user
,
:read_build
,
@project
)
-
elsif
can?
(
current_user
,
:read_build
,
@project
)
=
link_to
namespace_project_build_path
(
subject
.
project
.
namespace
,
subject
.
project
,
subject
)
do
=
render_status_with_link
(
'build'
,
subject
.
status
)
.ci-status-text
=
subject
.
name
-
else
-
else
=
render_status_with_link
(
'build'
,
subject
.
status
)
=
ci_icon_for_status
(
subject
.
status
)
app/views/projects/commit/_pipeline.html.haml
View file @
8759770c
...
...
@@ -39,13 +39,7 @@
=
stage
.
titleize
.builds-container
%ul
-
status_groups
=
statuses
.
group_by
(
&
:group_name
)
-
status_groups
.
each
do
|
group_name
,
grouped_statuses
|
-
if
grouped_statuses
.
one?
-
status
=
grouped_statuses
.
first
=
render
"projects/
#{
status
.
to_partial_path
}
_pipeline"
,
subject:
status
-
else
=
render
"projects/commit/pipeline_grouped_status"
,
name:
group_name
,
subject:
grouped_statuses
=
render
"projects/commit/pipeline_stage"
,
statuses:
statuses
-
if
pipeline
.
yaml_errors
.
present?
...
...
app/views/projects/commit/_pipeline_grouped_status.html.haml
deleted
100644 → 0
View file @
1ef8be76
%li
.build
.curve
.build-content
-
group_status
=
CommitStatus
.
where
(
id:
subject
).
status
=
render_status_with_link
(
'build'
,
group_status
)
.dropdown.inline
%button
.dropdown-menu-toggle
{
type:
'button'
,
data:
{
toggle:
'dropdown'
}}
%span
.ci-status-text
=
name
%span
.badge
=
subject
.
length
%ul
.dropdown-menu.grouped-pipeline-dropdown
.arrow
-
subject
.
each
do
|
status
|
-# = render "projects/#{status.to_partial_path}_pipeline", subject: status
-
is_playable
=
status
.
playable?
&&
can?
(
current_user
,
:update_build
,
@project
)
%li
-
if
is_playable
=
link_to
play_namespace_project_build_path
(
status
.
project
.
namespace
,
status
.
project
,
status
,
return_to:
request
.
original_url
),
method: :post
,
title:
'Play'
do
=
render_status_with_link
(
'build'
,
'play'
)
.ci-status-text
=
status
.
name
-
elsif
can?
(
current_user
,
:read_build
,
@project
)
=
link_to
namespace_project_build_path
(
status
.
project
.
namespace
,
status
.
project
,
status
)
do
=
render_status_with_link
(
'build'
,
status
.
status
)
.ci-status-text
=
status
.
name
-
else
=
render_status_with_link
(
'build'
,
status
.
status
)
=
ci_icon_for_status
(
status
.
status
)
app/views/projects/commit/_pipeline_stage.html.haml
0 → 100644
View file @
8759770c
-
status_groups
=
statuses
.
group_by
(
&
:group_name
)
-
status_groups
.
each
do
|
group_name
,
grouped_statuses
|
-
if
grouped_statuses
.
one?
-
status
=
grouped_statuses
.
first
-
is_playable
=
status
.
playable?
&&
can?
(
current_user
,
:update_build
,
@project
)
%li
.build
{
class:
(
"playable"
if
is_playable
)}
.curve
.build-content
=
render
"projects/
#{
status
.
to_partial_path
}
_pipeline"
,
subject:
status
-
else
%li
.build
.curve
.build-content
=
render
"projects/commit/pipeline_status_group"
,
name:
group_name
,
subject:
grouped_statuses
app/views/projects/commit/_pipeline_status_group.html.haml
0 → 100644
View file @
8759770c
-
group_status
=
CommitStatus
.
where
(
id:
subject
).
status
=
render_status_with_link
(
'build'
,
group_status
)
.dropdown.inline
%button
.dropdown-menu-toggle
{
type:
'button'
,
data:
{
toggle:
'dropdown'
}}
%span
.ci-status-text
=
name
%span
.badge
=
subject
.
length
%ul
.dropdown-menu.grouped-pipeline-dropdown
.arrow
-
subject
.
each
do
|
status
|
=
render
"projects/
#{
status
.
to_partial_path
}
_pipeline"
,
subject:
status
app/views/projects/generic_commit_statuses/_generic_commit_status_pipeline.html.haml
View file @
8759770c
%li
.build
.curve
.build-content
-
if
subject
.
target_url
-
if
subject
.
target_url
-
link_to
subject
.
target_url
do
=
render_status_with_link
(
'commit status'
,
subject
.
status
)
%span
.ci-status-text
=
subject
.
name
-
else
-
else
=
render_status_with_link
(
'commit 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