debian-mirror-gitlab/app/views/ci/status/_dropdown_graph_badge.html.haml

21 lines
1.1 KiB
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
-# Renders the content of each li in the dropdown
- subject = local_assigns.fetch(:subject)
- status = subject.detailed_status(current_user)
- klass = "ci-status-icon ci-status-icon-#{status.group}"
2018-05-09 12:01:36 +05:30
- tooltip = "#{subject.name} - #{status.status_tooltip}"
2017-08-17 22:00:37 +05:30
- if status.has_details?
2019-07-07 11:18:12 +05:30
= link_to status.details_path, class: 'mini-pipeline-graph-dropdown-item d-flex', data: { toggle: 'tooltip', title: tooltip, container: 'body' } do
2018-03-17 18:26:18 +05:30
%span{ class: klass }= sprite_icon(status.icon)
2021-01-03 14:25:43 +05:30
%span.gl-text-truncate.mw-70p.gl-pl-2= subject.name
2018-05-09 12:01:36 +05:30
2017-08-17 22:00:37 +05:30
- else
2019-07-07 11:18:12 +05:30
.menu-item.mini-pipeline-graph-dropdown-item.d-flex{ data: { toggle: 'tooltip', title: tooltip, container: 'body' } }
2018-03-17 18:26:18 +05:30
%span{ class: klass }= sprite_icon(status.icon)
2021-01-03 14:25:43 +05:30
%span.gl-text-truncate.mw-70p.gl-pl-2= subject.name
2017-08-17 22:00:37 +05:30
- if status.has_action?
2020-10-24 23:57:45 +05:30
= link_to status.action_path, class: "gl-button ci-action-icon-container ci-action-icon-wrapper js-ci-action-icon", method: status.action_method, data: { toggle: 'tooltip', title: status.action_title, container: 'body' } do
2018-03-17 18:26:18 +05:30
= sprite_icon(status.action_icon, css_class: "icon-action-#{status.action_icon}")