9701: Merge branch '9463-change-arvput-use-collection-class' into 9701-collection...
[arvados.git] / apps / workbench / app / views / container_requests / _show_inputs.html.erb
1 <% n_inputs = cwl_inputs_required(@object, get_cwl_inputs(@object.mounts[:"/var/lib/cwl/workflow.json"][:content]), [:mounts, :"/var/lib/cwl/cwl.input.json", :content]) %>
2
3 <% content_for :pi_input_form do %>
4 <form role="form" style="width:60%">
5   <div class="form-group">
6     <% workflow = @object.mounts[:"/var/lib/cwl/workflow.json"][:content] %>
7     <% inputs = get_cwl_inputs(workflow) %>
8     <% inputs.each do |input| %>
9       <label for="#input-<%= cwl_shortname(input[:id]) %>">
10         <%= input[:label] || cwl_shortname(input[:id]) %>
11       </label>
12       <div>
13         <p class="form-control-static">
14           <%= render_cwl_input @object, input, [:mounts, :"/var/lib/cwl/cwl.input.json", :content] %>
15         </p>
16       </div>
17       <p class="help-block">
18         <%= input[:doc] %>
19       </p>
20     <% end %>
21   </div>
22 </form>
23 <% end %>
24
25 <% if n_inputs == 0 %>
26   <p><i>This workflow does not need any further inputs specified.  Click the "Run" button at the bottom of the page to start the workflow.</i></p>
27 <% else %>
28   <p><i>Provide <%= n_inputs > 1 ? 'values' : 'a value' %> for the following <%= n_inputs > 1 ? 'parameters' : 'parameter' %>, then click the "Run" button to start the workflow.</i></p>
29 <% end %>
30
31 <% if @object.editable? %>
32   <%= content_for :pi_input_form %>
33   <%= link_to(url_for('container_request[state]' => 'Committed'),
34         class: 'btn btn-primary run-pipeline-button',
35         method: :patch
36         ) do %>
37     Run <i class="fa fa-fw fa-play"></i>
38   <% end %>
39 <% end %>
40
41 <%= render_unreadable_inputs_present %>