Commit c96e037d authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix double borders around the CI status

parent ea7d062f
......@@ -12,9 +12,13 @@ module CiStatusHelper
ci_label_for_status(ci_commit.status)
end
def ci_status_with_icon(status)
content_tag :span, class: "ci-status ci-#{status}" do
ci_icon_for_status(status) + ' '.html_safe + ci_label_for_status(status)
def ci_status_with_icon(status, target = nil)
content = 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
......
%tr.build
%td.status
- 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)
= ci_status_with_icon(build.status, namespace_project_build_url(build.project.namespace, build.project, build))
- else
= ci_status_with_icon(build.status)
......
%tr.generic_commit_status
%td.status
- 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)
= ci_status_with_icon(generic_commit_status.status, generic_commit_status.target_url)
- else
= ci_status_with_icon(generic_commit_status.status)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment