2019-02-25 13:25:00 -05:00
|
|
|
- status = local_assigns.fetch(:status)
|
|
|
|
- size = local_assigns.fetch(:size, 16)
|
2019-02-26 12:59:41 -05:00
|
|
|
- type = local_assigns.fetch(:type, 'pipeline')
|
2019-02-25 13:25:00 -05:00
|
|
|
- tooltip_placement = local_assigns.fetch(:tooltip_placement, "left")
|
2019-02-26 16:10:24 -05:00
|
|
|
- path = local_assigns.fetch(:path, status.has_details? ? status.details_path : nil)
|
2019-02-26 12:59:41 -05:00
|
|
|
- css_classes = "ci-status-link ci-status-icon ci-status-icon-#{status.group} has-tooltip"
|
2019-02-27 11:21:42 -05:00
|
|
|
- title = s_("PipelineStatusTooltip|Pipeline: %{ci_status}") % {ci_status: status.label}
|
|
|
|
- if type == 'commit'
|
|
|
|
- title = s_("PipelineStatusTooltip|Commit: %{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)
|