_graph_badge.html.haml 787 字节
Newer Older
F
Filipa Lacerda 已提交
1 2
-# Renders the graph node with both the status icon, status name and action icon

3 4
- subject = local_assigns.fetch(:subject)
- status = subject.detailed_status(current_user)
5
- klass = "ci-status-icon ci-status-icon-#{status.group}"
6

7
- if status.has_details?
F
Filipa Lacerda 已提交
8
  = link_to status.details_path, data: { toggle: 'tooltip', title: "#{subject.name} - #{status.label}" } do
9
    %span{ class: klass }= custom_icon(status.icon)
10 11
    .ci-status-text= subject.name
- else
12
  %span{ class: klass }= custom_icon(status.icon)
13 14
  .ci-status-text= subject.name

15 16
- if status.has_action?
  = link_to status.action_path, method: status.action_method,
F
Filipa Lacerda 已提交
17
    title: status.action_title, class: 'ci-action-icon-container' do
18
    %i.ci-action-icon-wrapper
19
      = icon(status.action_icon, class: status.action_class)