Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / views / container_requests / _extra_tab_line_buttons.html.erb
index b698c938a1d0f846779de8ba6801ae59ca9c0529..7a9d68d983f8701083d5dfd1ab34b1d26065fd48 100644 (file)
@@ -9,40 +9,19 @@ SPDX-License-Identifier: AGPL-3.0 %>
   }
 </script>
 
-  <%= link_to raw('<i class="fa fa-fw fa-play"></i> Re-run...'),
-      "#",
-      {class: 'btn btn-sm btn-primary', 'data-toggle' => 'modal',
-       'data-target' => '#clone-and-edit-modal-window',
-       title: 'This will make a copy and take you there. You can then make any needed changes and run it'}  %>
-
-<div id="clone-and-edit-modal-window" class="modal fade" role="dialog"
-     aria-labelledby="myModalLabel" aria-hidden="true">
-  <div class="modal-dialog">
-    <div class="modal-content">
-
-    <%= form_tag copy_container_request_path do |f| %>
-
-      <div class="modal-header">
-        <button type="button" class="close" onClick="reset_form_cr_reuse()" data-dismiss="modal" aria-hidden="true">&times;</button>
-        <div>
-          <div class="col-sm-6"> <h4 class="modal-title">Re-run container request</h4> </div>
-        </div>
-        <br/>
-      </div>
-
-      <div class="modal-body">
-              <%= check_box_tag(:use_existing, "true", false) %>
-              <%= label_tag(:use_existing, "Enable container reuse") %>
-      </div>
-
-      <div class="modal-footer">
-        <button class="btn btn-default" onClick="reset_form_cr_reuse()" data-dismiss="modal" aria-hidden="true">Cancel</button>
-        <button type="submit" class="btn btn-primary" name="container_request[state]" value="Uncommitted">Copy and edit inputs</button>
-      </div>
-
-    </div>
+    <%= link_to(choose_projects_path(id: "run-workflow-button",
+                                     title: 'Choose project',
+                                     editable: true,
+                                     action_name: 'Choose',
+                                     action_href: copy_container_request_path,
+                                     action_method: 'post',
+                                     action_data: {'selection_param' => 'work_unit[owner_uuid]',
+                                                   'work_unit[template_uuid]' => @object.uuid,
+                                                   'success' => 'redirect-to-created-object'
+                                                  }.to_json),
+          { class: "btn btn-primary btn-sm", title: "Run #{@object.name}", remote: true }
+          ) do %>
+      <i class="fa fa-fw fa-play"></i> Re-run...
     <% end %>
-  </div>
-</div>
 
 <% end %>