Merge branch 'master' into 4878-rerun-job
[arvados.git] / apps / workbench / app / views / jobs / _rerun_job_with_options_popup.html.erb
index 6d92edd1ff76d30a9d44e0ba052b99b027720cb6..c25a4e289c2dcb1e1c6fc7d835d6615abe382296 100644 (file)
           <p> The inputs and parameters will be the same as the current job.
               Thus, the new job will not reflect any changes made to the pipeline that initiated this job. </p>
           <div style="padding-left: 1em">
-            <%= radio_button_tag(:use_script, "latest", true) %>
-            <%= label_tag(:script_use_latest, "Use latest script version") %>
-            <p style="padding-left: 1em"> Use the current commit indicated by '<%=job_info['supplied_script_version']%>' in the '<%=job_info['repository']%>' repository.</p>
-            <%= radio_button_tag(:use_script, "same") %>
+            <%= radio_button_tag(:script, "use_same", true) %>
             <%= label_tag(:script_use_same, "Use same script version as this run") %>
             <p style="padding-left: 1em"> Use the same script version as the current job.</p>
+            <% if !job_info['supplied_script_version'].nil? and
+                  !job_info['supplied_script_version'].empty? and
+                   job_info['supplied_script_version'] != job_info['script_version'] %>
+              <%= radio_button_tag(:script, "use_latest") %>
+              <%= label_tag(:script_use_latest, "Use latest script version") %>
+              <p style="padding-left: 1em"> Use the current commit indicated by '<%=job_info['supplied_script_version']%>' in the '<%=job_info['repository']%>' repository.</p>
+            <% end %>
+
             <input type="hidden" name="job_info" value="<%=job_info.to_json%>">
           </div>
         </div>