2019-07-10 05:35:30 -04:00
|
|
|
- status = local_assigns.fetch(:status)
|
|
|
|
- size = local_assigns.fetch(:size, 16)
|
|
|
|
- tooltip_placement = local_assigns.fetch(:tooltip_placement, "left")
|
|
|
|
- path = local_assigns.fetch(:path, status.has_details? ? status.details_path : nil)
|
|
|
|
- option_css_classes = local_assigns.fetch(:option_css_classes, '')
|
|
|
|
- css_classes = "ci-status-link ci-status-icon ci-status-icon-#{status.group} has-tooltip #{option_css_classes}"
|
2019-02-27 11:21:42 -05:00
|
|
|
- title = s_("PipelineStatusTooltip|Pipeline: %{ci_status}") % {ci_status: status.label}
|
2019-02-19 15:27:53 -05:00
|
|
|
|
2019-02-26 17:26:01 -05:00
|
|
|
- if path
|
2019-02-27 14:59:53 -05:00
|
|
|
= link_to path, class: css_classes, title: title, data: { placement: tooltip_placement } do
|
2019-02-26 16:10:24 -05:00
|
|
|
= sprite_icon(status.icon, size: size)
|
|
|
|
- else
|
2019-02-27 14:59:53 -05:00
|
|
|
%span{ class: css_classes, title: title, data: { placement: tooltip_placement } }
|
2019-02-20 14:20:09 -05:00
|
|
|
= sprite_icon(status.icon, size: size)
|