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
c96e037d
Commit
c96e037d
authored
Mar 15, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix double borders around the CI status
parent
ea7d062f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
app/helpers/ci_status_helper.rb
app/helpers/ci_status_helper.rb
+7
-3
app/views/projects/ci/builds/_build.html.haml
app/views/projects/ci/builds/_build.html.haml
+1
-2
app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml
.../generic_commit_statuses/_generic_commit_status.html.haml
+1
-2
No files found.
app/helpers/ci_status_helper.rb
View file @
c96e037d
...
@@ -12,9 +12,13 @@ module CiStatusHelper
...
@@ -12,9 +12,13 @@ module CiStatusHelper
ci_label_for_status
(
ci_commit
.
status
)
ci_label_for_status
(
ci_commit
.
status
)
end
end
def
ci_status_with_icon
(
status
)
def
ci_status_with_icon
(
status
,
target
=
nil
)
content_tag
:span
,
class:
"ci-status ci-
#{
status
}
"
do
content
=
ci_icon_for_status
(
status
)
+
' '
.
html_safe
+
ci_label_for_status
(
status
)
ci_icon_for_status
(
status
)
+
' '
.
html_safe
+
ci_label_for_status
(
status
)
clazz
=
"ci-status ci-
#{
status
}
"
if
target
link_to
content
,
target
,
class:
clazz
else
content_tag
:span
,
content
,
class:
clazz
end
end
end
end
...
...
app/views/projects/ci/builds/_build.html.haml
View file @
c96e037d
%tr
.build
%tr
.build
%td
.status
%td
.status
-
if
can?
(
current_user
,
:read_build
,
build
)
-
if
can?
(
current_user
,
:read_build
,
build
)
=
link_to
namespace_project_build_url
(
build
.
project
.
namespace
,
build
.
project
,
build
),
class:
"ci-status ci-
#{
build
.
status
}
"
do
=
ci_status_with_icon
(
build
.
status
,
namespace_project_build_url
(
build
.
project
.
namespace
,
build
.
project
,
build
))
=
ci_status_with_icon
(
build
.
status
)
-
else
-
else
=
ci_status_with_icon
(
build
.
status
)
=
ci_status_with_icon
(
build
.
status
)
...
...
app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml
View file @
c96e037d
%tr
.generic_commit_status
%tr
.generic_commit_status
%td
.status
%td
.status
-
if
can?
(
current_user
,
:read_commit_status
,
generic_commit_status
)
&&
generic_commit_status
.
target_url
-
if
can?
(
current_user
,
:read_commit_status
,
generic_commit_status
)
&&
generic_commit_status
.
target_url
=
link_to
generic_commit_status
.
target_url
,
class:
"ci-status ci-
#{
generic_commit_status
.
status
}
"
do
=
ci_status_with_icon
(
generic_commit_status
.
status
,
generic_commit_status
.
target_url
)
=
ci_status_with_icon
(
generic_commit_status
.
status
)
-
else
-
else
=
ci_status_with_icon
(
generic_commit_status
.
status
)
=
ci_status_with_icon
(
generic_commit_status
.
status
)
...
...
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