Commit bbfe1549 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'ci-fix-double-borders' into 'master'

Fix double borders around the CI status

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/14281
Introduced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2760#note_4238291

See merge request !3224
parents 6f50cef8 89e50a02
...@@ -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) klass = "ci-status ci-#{status}"
if target
link_to content, target, class: klass
else
content_tag :span, content, class: klass
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