BigW Consortium Gitlab

Commit bbfe1549 by 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
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)
klass = "ci-status ci-#{status}"
if target
link_to content, target, class: klass
else
content_tag :span, content, class: klass
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