4205: add tooltips to pipeline instance tab line buttons
[arvados.git] / apps / workbench / app / views / pipeline_instances / _show_tab_buttons.html.erb
1   <% if @object.state.in? ['Complete', 'Failed', 'Cancelled', 'Paused'] %>
2
3   <%= link_to(copy_pipeline_instance_path('id' => @object.uuid, 'script' => "use_latest", "components" => "use_latest", "pipeline_instance[state]" => "RunningOnServer"),
4       class: 'btn btn-primary', title: 'Re-run with latest options',
5       #data: {toggle: :tooltip, placement: :top}, title: 'Re-run',
6       method: :post,
7       ) do %>
8     <i class="fa fa-fw fa-play"></i> Re-run with latest
9   <% end %>
10
11   <%= link_to raw('<i class="fa fa-fw fa-cogs"></i> Re-run options...'),
12       "#",
13       {class: 'btn btn-primary', 'data-toggle' =>  "modal",
14         'data-target' => '#clone-and-edit-modal-window',
15         title: 'Re-run with options'}  %>
16   <% end %>
17
18   <% if @object.state.in? ['New', 'Ready'] %>
19     <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
20         class: 'btn btn-primary run-pipeline-button',
21         title: 'Run this pipeline',
22         method: :patch
23         ) do %>
24       <i class="fa fa-fw fa-play"></i> Run
25     <% end %>
26   <% else %>
27     <% if @object.state.in? ['RunningOnClient', 'RunningOnServer'] %>
28       <%= link_to(url_for('pipeline_instance[state]' => 'Paused'),
29           class: 'btn btn-primary run-pipeline-button',
30           title: 'Pause this pipeline',
31           method: :patch
32           ) do %>
33         <i class="fa fa-fw fa-pause"></i> Pause
34       <% end %>
35     <% elsif @object.state == 'Paused' %>
36       <%= link_to(url_for('pipeline_instance[state]' => 'RunningOnServer'),
37           class: 'btn btn-primary run-pipeline-button',
38           title: 'Resume this pipeline',
39           method: :patch
40           ) do %>
41         <i class="fa fa-fw fa-play"></i> Resume
42       <% end %>
43     <% end %>
44   <% end %>