8784: Fix test for latest firefox.
[arvados.git] / apps / workbench / app / views / jobs / _show_job_buttons.html.erb
index 644da77425fe90bdc3c634c78d97e51099857cf1..b6c39df9a50c1e85ccc644a9f7de4e2a3d48d7f3 100644 (file)
@@ -1,29 +1,5 @@
-<% if @object.state != "Running" %>
-    <%= form_tag '/jobs', style: "display:inline; padding-left: 1em" do |f| %>
-      <% [:script, :script_version, :repository, :supplied_script_version, :nondeterministic].each do |d| %>
-        <%= hidden_field :job, d, :value => @object[d] %>
-      <% end %>
-      <% [:script_parameters, :runtime_constraints].each do |d| %>
-        <%= hidden_field :job, d, :value => JSON.dump(@object[d]) %>
-      <% end %>
-      <%= button_tag ({class: 'btn btn-sm btn-primary', id: "re-run-same-job-button",
-                       title: 'Re-run job using the same script version as this run'}) do %>
-        <i class="fa fa-fw fa-gear"></i> Re-run same version
-      <% end %>
-    <% end %>
-  <% if @object.respond_to? :supplied_script_version and !@object.supplied_script_version.nil? and !@object.supplied_script_version.empty? and @object.script_version != @object.supplied_script_version%>
-      <%= form_tag '/jobs', style: "display:inline" do |f| %>
-      <% [:script, :repository, :supplied_script_version, :nondeterministic].each do |d| %>
-        <%= hidden_field :job, d, :value => @object[d] %>
-      <% end %>
-      <%= hidden_field :job, :script_version, :value => @object[:supplied_script_version] %>
-      <% [:script_parameters, :runtime_constraints].each do |d| %>
-        <%= hidden_field :job, d, :value => JSON.dump(@object[d]) %>
-      <% end %>
-      <%= button_tag ({class: 'btn btn-sm btn-primary', id: "re-run-latest-job-button",
-                       title: 'Re-run job using the latest script version'}) do%>
-        <i class="fa fa-fw fa-gear"></i> Re-run latest version
-      <% end %>
-    <% end %>
-  <% end %>
+<% if @object.state != "Running" and Job.creatable? %>
+  <button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#jobRerunModal">
+    <i class="fa fa-fw fa-gear"></i> Re-run job...
+  </button>
 <% end %>