diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-03-15 14:26:15 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-03-15 14:29:02 +0100 |
commit | c96e037dcbe127c6525058a7884fc7c5f2708979 (patch) | |
tree | 674d6b5b4fc82de164bba3cb1b7a879c068e4e6a /app/helpers | |
parent | ea7d062fa60e3e622288237fc66a815348bbcf36 (diff) | |
download | gitlab-ce-c96e037dcbe127c6525058a7884fc7c5f2708979.tar.gz |
Fix double borders around the CI status
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/ci_status_helper.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index f20779f2fbb..391d74ebdbf 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -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 |