Commit 506ac78d authored by Scott Hampton's avatar Scott Hampton

Adding tooltip placement

Adding the ability to position the tooltip of the status icon.
parent 725dfc77
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
- size = local_assigns.fetch(:size, 16) - size = local_assigns.fetch(:size, 16)
- link = local_assigns.fetch(:link, true) - link = local_assigns.fetch(:link, true)
- title = local_assigns.fetch(:title, "Pipeline: #{status.label}") - title = local_assigns.fetch(:title, "Pipeline: #{status.label}")
- tooltip_placement = local_assigns.fetch(:tooltip_placement, "left")
- css_classes = "ci-status-link ci-status-icon ci-status-icon-#{status.group} #{'has-tooltip' if title.present?}" - css_classes = "ci-status-link ci-status-icon ci-status-icon-#{status.group} #{'has-tooltip' if title.present?}"
- if link && status.has_details? - if link && status.has_details?
= link_to status.details_path, class: css_classes, title: title, data: { html: title.present? } do = link_to status.details_path, class: css_classes, title: title, data: { html: title.present?, placement: tooltip_placement } do
= sprite_icon(status.icon, size: size) = sprite_icon(status.icon, size: size)
- else - else
%span{ class: css_classes, title: title, data: { html: title.present? } } %span{ class: css_classes, title: title, data: { html: title.present?, placement: tooltip_placement } }
= sprite_icon(status.icon, size: size) = sprite_icon(status.icon, size: size)
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
= merge_request.to_reference = merge_request.to_reference
%span.mr-ci-status.flex-md-grow-1.justify-content-end.d-flex.ml-md-2 %span.mr-ci-status.flex-md-grow-1.justify-content-end.d-flex.ml-md-2
- if merge_request.can_read_pipeline? - if merge_request.can_read_pipeline?
= render 'ci/status/icon', status: merge_request.head_pipeline.detailed_status(current_user), link: true = render 'ci/status/icon', status: merge_request.head_pipeline.detailed_status(current_user), link: true, tooltip_placement: 'bottom'
- elsif has_any_head_pipeline - elsif has_any_head_pipeline
= icon('blank fw') = icon('blank fw')
......
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