diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-12-12 13:28:02 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-12-12 13:28:02 +0100 |
commit | dc67554c08ac6cfe23809af9f086336ca9ca740e (patch) | |
tree | a1b19de9def76953bc1befaff1653eb768fba070 /app/views/ci | |
parent | 23f02681c036b150966ce4459410c94694167b34 (diff) | |
download | gitlab-ce-dc67554c08ac6cfe23809af9f086336ca9ca740e.tar.gz |
Improve detailed status badge partial
Diffstat (limited to 'app/views/ci')
-rw-r--r-- | app/views/ci/status/_badge.html.haml | 8 | ||||
-rw-r--r-- | app/views/ci/status/_icon_with_description.html.haml | 12 |
2 files changed, 8 insertions, 12 deletions
diff --git a/app/views/ci/status/_badge.html.haml b/app/views/ci/status/_badge.html.haml new file mode 100644 index 00000000000..b1b6e9c2b05 --- /dev/null +++ b/app/views/ci/status/_badge.html.haml @@ -0,0 +1,8 @@ +- if status.has_details? + = link_to status.details_path, class: "ci-status ci-#{status}" do + = custom_icon(status.icon) + = status.text +- else + %span{ class: "ci-status ci-#{status}" } + = custom_icon(status.icon) + = detailed_status.text diff --git a/app/views/ci/status/_icon_with_description.html.haml b/app/views/ci/status/_icon_with_description.html.haml deleted file mode 100644 index 34c923440d0..00000000000 --- a/app/views/ci/status/_icon_with_description.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -- detailed_status = subject.detailed_status(current_user) -- details_path = detailed_status.details_path if detailed_status.has_details? -- klass = "ci-status ci-#{detailed_status}" - -- if details_path - = link_to details_path, class: klass do - = custom_icon(detailed_status.icon) - = detailed_status.text -- else - %span{ class: klass } - = custom_icon(detailed_status.icon) - = detailed_status.text |