-<table class="table table-condensed table-hover topalign">
- <thead>
- </thead>
- <tbody>
- <% @object.attributes_for_display.each do |attr, attrvalue| %>
- <% if attr == 'components' and attrvalue.is_a? Hash %>
-
- <tr class="info"><td><%= attr %></td><td>
- <table class="table">
- <% render_pipeline_jobs.each do |pj| %>
- <tr><% %w(index name result job_link script script_version progress_detail progress_bar output_link).each do |key| %>
- <td>
- <% if key == 'script_version' %>
- <%= pj[key.to_sym][0..6] rescue '' %>
- <% else %>
- <%= pj[key.to_sym] %>
- <% end %>
- </td>
- <% end %>
- </tr>
- <% end %>
- </table>
- </td></tr>
-
- <% else %>
- <%= render partial: 'application/arvados_object_attr', locals: { attr: attr, attrvalue: attrvalue } %>
+<% template = PipelineTemplate.find?(@object.pipeline_template_uuid) %>
+<%= content_for :content_top do %>
+ <div class="row">
+ <div class="col-sm-6">
+ <%= render partial: 'name_and_description' %>
+ </div>
+ <% if template %>
+ <div class="alert alert-info col-sm-6">
+ This pipeline was created from the template <%= link_to_if_arvados_object template, friendly_name: true %><br />
+ <% if template.modified_at && (template.modified_at > @object.created_at) %>
+ Note: This template has been modified since this instance was created.
+ <% end %>
+ </div>
<% end %>
+ </div>
+<% end %>
+
+<% content_for :tab_line_buttons do %>
+
+ <div id="pipeline-instance-tab-buttons"
+ class="pane-loaded arv-log-event-listener arv-refresh-on-state-change"
+ data-pane-content-url="<%= url_for(params.merge(tab_pane: "tab_buttons")) %>"
+ data-object-uuid="<%= @object.uuid %>"
+ >
+ <%= render partial: 'show_tab_buttons', locals: {object: @object}%>
+ </div>
+
+<% end %>
+
+<%= render partial: 'content', layout: 'content_layout', locals: {pane_list: controller.show_pane_list }%>
+
+<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_pipeline_instance_path do |f| %>
+
+ <div class="modal-header">
+ <button type="button" class="close" onClick="reset_form()" data-dismiss="modal" aria-hidden="true">×</button>
+ <div>
+ <div class="col-sm-6"> <h4 class="modal-title">Re-run pipeline</h4> </div>
+ </div>
+ <br/>
+ </div>
+
+ <div class="modal-body">
+ <%= radio_button_tag(:script, "use_latest", true) %>
+ <%= label_tag(:script_use_latest, "Use latest script versions") %>
+ <br>
+ <%= radio_button_tag(:script, "use_same") %>
+ <%= label_tag(:script_use_same, "Use same script versions as this run") %>
+ <br>
+ <% if template %>
+ <br>
+ <%= radio_button_tag(:components, "use_latest", true) %>
+ <%= label_tag(:components_use_latest, "Update components against template") %>
+ <br>
+ <%= radio_button_tag(:components, "use_same") %>
+ <%= label_tag(:components_use_same, "Use same components as this run") %>
+ <% end %>
+ </div>
+
+ <div class="modal-footer">
+ <button class="btn btn-default" onClick="reset_form()" data-dismiss="modal" aria-hidden="true">Cancel</button>
+ <button type="submit" class="btn btn-primary" name="pipeline_instance[state]" value="RunningOnServer">Run now</button>
+ <button type="submit" class="btn btn-primary" name="pipeline_instance[state]" value="New">Copy and edit inputs</button>
+ </div>
+
+ </div>
<% end %>
- </tbody>
-</table>
-<pre>
-<%= JSON.pretty_generate(@object.attributes) rescue nil %>
-</pre>
+ </div>
+</div>