3490: Add "Create a pipeline template" button to projects page and provide "arv 3490-create-pipeline-template
authorPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 1 Oct 2014 17:52:45 +0000 (13:52 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 1 Oct 2014 17:52:45 +0000 (13:52 -0400)
edit" command line to edit pipeline template.

apps/workbench/app/views/pipeline_instances/_show_components_editable.html.erb
apps/workbench/app/views/projects/show.html.erb

index f6c9e85883487c611de38276ca8ee5dd579ca1d9..3b2cde8e84efccbe36de2e7764aa92c43dc0c39a 100644 (file)
@@ -1,3 +1,12 @@
+<% if @object.components.empty? %>
+  <p>This pipeline template is empty.</p>
+<% end %>
+
+<p>Edit this pipeline template at the command line with:</p>
+<pre>$ <code>arv edit <%= @object.uuid %> name components</code></pre>
+
+<% if @object.components.any? %>
+
 <table class="table pipeline-components-table" style="margin-top: -.1em">
   <colgroup>
     <col style="width: 20%" />
@@ -46,3 +55,4 @@
     <% end %>
   </tbody>
 </table>
+<% end %>
index cff8bbd9b0de079755d644d505ce6030c0401422..b4d5e9456d199cb588d348e314875c22ad963ff5 100644 (file)
@@ -27,6 +27,9 @@
          { class: "btn btn-primary btn-sm", remote: true, method: 'get' }) do %>
       <i class="fa fa-fw fa-gear"></i> Run a pipeline...
     <% end %>
+    <%= link_to pipeline_templates_path({'pipeline_template[owner_uuid]' => @object.uuid, 'options' => {'ensure_unique_name' => true}}), method: 'post', class: 'btn btn-sm btn-primary' do %>
+      <i class="fa fa-fw fa-plus"></i> Add a pipeline template
+    <% end %>
     <%= link_to projects_path({'project[owner_uuid]' => @object.uuid, 'options' => {'ensure_unique_name' => true}}), method: 'post', class: 'btn btn-sm btn-primary' do %>
       <i class="fa fa-fw fa-plus"></i>
       Add a subproject