diff options
author | Scott Hampton <shampton@gitlab.com> | 2019-02-26 14:10:24 -0700 |
---|---|---|
committer | Scott Hampton <shampton@gitlab.com> | 2019-02-26 14:10:24 -0700 |
commit | 40d15136352958206685197d4176f15781089849 (patch) | |
tree | a9f5dc43b3e13aaeb3ae9feca6833aa6e1eabbac /app/views/ci | |
parent | 2b51745394e8568cf91ce6ee95574f84fc38722e (diff) | |
download | gitlab-ce-40d15136352958206685197d4176f15781089849.tar.gz |
Adding ability to pass in path to status icon
Project passed a very specific details path. Also reverted a change.
Diffstat (limited to 'app/views/ci')
-rw-r--r-- | app/views/ci/status/_icon.html.haml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/views/ci/status/_icon.html.haml b/app/views/ci/status/_icon.html.haml index 1fcbd9e7545..f406eb4b5a3 100644 --- a/app/views/ci/status/_icon.html.haml +++ b/app/views/ci/status/_icon.html.haml @@ -3,8 +3,12 @@ - type = local_assigns.fetch(:type, 'pipeline') - title = local_assigns.fetch(:title, "#{type.titleize}: #{status.label}") - tooltip_placement = local_assigns.fetch(:tooltip_placement, "left") +- path = local_assigns.fetch(:path, status.has_details? ? status.details_path : nil) - css_classes = "ci-status-link ci-status-icon ci-status-icon-#{status.group} has-tooltip" - if status.has_details? - = link_to status.details_path, class: css_classes, title: title, data: { html: true, placement: tooltip_placement } do + = link_to path, class: css_classes, title: title, data: { html: true, placement: tooltip_placement } do + = sprite_icon(status.icon, size: size) +- else + %span{ class: css_classes, title: title, data: { html: true, placement: tooltip_placement } } = sprite_icon(status.icon, size: size) |