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?
2018-05-09 12:01:36 +05:30
= link_to status.details_path, class: 'mini-pipeline-graph-dropdown-item', data: { toggle: 'tooltip', title: tooltip, html: true, container: 'body' } do
2018-03-17 18:26:18 +05:30
%span{ class: klass }= sprite_icon(status.icon)
2017-08-17 22:00:37 +05:30
%span.ci-build-text= subject.name
2018-05-09 12:01:36 +05:30
2017-08-17 22:00:37 +05:30
- else
2018-05-09 12:01:36 +05:30
.menu-item.mini-pipeline-graph-dropdown-item{ data: { toggle: 'tooltip', html: true, title: tooltip, container: 'body' } }
2018-03-17 18:26:18 +05:30
%span{ class: klass }= sprite_icon(status.icon)
2017-08-17 22:00:37 +05:30
%span.ci-build-text= subject.name
- if status.has_action?
2018-10-15 14:42:47 +05:30
= link_to status.action_path, class: "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}")