20259: Add documentation for banner and tooltip features
[arvados.git] / apps / workbench / app / views / pipeline_instances / _show_tab_buttons.html.erb
index 32485f5173939ee89bfef3e122a0f191e38446fe..ae9e3c791cd537da9dc4a62ada51ad768f855115 100644 (file)
@@ -1,7 +1,13 @@
+<%# Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: AGPL-3.0 %>
+
+<% if current_user.andand.is_active %>
   <% if @object.state.in? ['Complete', 'Failed', 'Cancelled', 'Paused'] %>
 
   <%= link_to(copy_pipeline_instance_path('id' => @object.uuid, 'script' => "use_latest", "components" => "use_latest", "pipeline_instance[state]" => "RunningOnServer"),
-      class: 'btn btn-primary', title: 'Re-run with latest options',
+      class: 'btn btn-primary',
+      title: 'Re-run with latest options',
       #data: {toggle: :tooltip, placement: :top}, title: 'Re-run',
       method: :post,
       ) do %>
     <% end %>
   <% else %>
     <% if @object.state.in? ['RunningOnClient', 'RunningOnServer'] %>
-      <%= link_to(url_for('pipeline_instance[state]' => 'Paused'),
+      <%= link_to(cancel_pipeline_instance_path,
           class: 'btn btn-primary run-pipeline-button',
           title: 'Pause this pipeline',
-          method: :patch
+          data: {confirm: 'All unfinished child jobs will be canceled, even if they are being used in another job or pipeline. Are you sure you want to pause this pipeline?'},
+          method: :post
           ) do %>
         <i class="fa fa-fw fa-pause"></i> Pause
       <% end %>
@@ -42,3 +49,4 @@
       <% end %>
     <% end %>
   <% end %>
+<% end %>