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 ...@@ -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
......
%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)
......
%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)
......
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