summaryrefslogtreecommitdiff
path: root/app/views/runners/_runner.html.haml
blob: fc78ffc4a993766e5634c83137635f0cd8a6f583 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
%li.runner{id: dom_id(runner)}
  %h4
    = runner_status_icon(runner)
    %span.monospace
      = link_to runner.short_sha, [@project, runner]
      - if @runners.include?(runner)
        %small
          =link_to edit_project_runner_path(@project, runner) do
            %i.fa.icon-edit.btn
          
    .pull-right
      - if @runners.include?(runner)
        - if runner.belongs_to_one_project?
          = link_to 'Remove runner', [@project, runner], data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-small'
        - else
          - runner_project = @project.runner_projects.find_by(runner_id: runner)
          = link_to 'Disable for this project', [@project, runner_project], data: { confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger btn-small'
      - elsif runner.specific?
        = form_for [@project, @project.runner_projects.new] do |f|
          = f.hidden_field :runner_id, value: runner.id
          = f.submit 'Enable for this project', class: 'btn btn-small'
  .pull-right
    %small.light
      \##{runner.id}
  - if runner.description.present?
    %p.runner-description
      = runner.description
  - if runner.tag_list.present?
    %p
      - runner.tag_list.each do |tag|
        %span.label.label-primary
          = tag