2753: Move Workbench object list rendering to application_helper.
[arvados.git] / apps / workbench / app / views / pipeline_instances / _show_components.html.erb
index 3fae559f0aed3bec71b24dac1778700bdb3c6b8c..61a4ca177d370ae7036b0395c74e445774fbbe44 100644 (file)
@@ -6,7 +6,7 @@
 
 <%= content_for :content_top do %>
   <h2>
-    <%= render_editable_attribute @object, 'name', nil, { 'data-emptytext' => 'Unnamed pipeline', 'data-mode' => 'inline' } %>
+    <%= render_editable_attribute @object, 'name', nil, { 'data-emptytext' => 'Unnamed pipeline' } %>
   </h2>
   <% if template %>
   <h4>
         script, version
       </th><th>
         progress
-        <%= link_to '(refresh)', request.fullpath, class: 'refresh hide', remote: true, method: 'get' %>
+        <%# format:'js' here helps browsers avoid using the cached js
+        content in html context (e.g., duplicate tab -> see
+        javascript) %>
+        <%= link_to '(refresh)', {format:'js'}, class: 'refresh hide', remote: true, method: 'get' %>
       </th><th>
       </th><th>
         output
@@ -100,7 +103,7 @@ setInterval(function(){$('a.refresh').click()}, 15000);
     <% end %>
   <% end %>
 
-  <% if @object.state == 'New' %>
+  <% if @object.state.in? ['New', 'Ready'] %>
     <%= render partial: 'show_components_editable', locals: {editable: true} %>
   <% else %>
     <%= render partial: 'show_components_editable', locals: {editable: false} %>