20259: Add documentation for banner and tooltip features
[arvados.git] / apps / workbench / app / views / container_requests / _show_inputs.html.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5 <%
6 n_inputs = if @object.mounts[:"/var/lib/cwl/workflow.json"] && @object.mounts[:"/var/lib/cwl/cwl.input.json"]
7              cwl_inputs_required(@object, get_cwl_inputs(@object.mounts[:"/var/lib/cwl/workflow.json"][:content]), [:mounts, :"/var/lib/cwl/cwl.input.json", :content])
8            else
9              0
10            end
11 %>
12
13 <% content_for :pi_input_form do %>
14 <form role="form" style="width:60%">
15   <div class="form-group">
16     <% workflow = @object.mounts[:"/var/lib/cwl/workflow.json"].andand[:content] %>
17     <% if workflow %>
18       <% inputs = get_cwl_inputs(workflow) %>
19       <% inputs.each do |input| %>
20         <div class="form-control-static">
21           <label for="#input-<%= cwl_shortname(input[:id]) %>">
22             <%= input[:label] || cwl_shortname(input[:id]) %>
23           </label>
24           <%= render_cwl_input @object, input, [:mounts, :"/var/lib/cwl/cwl.input.json", :content] %>
25           <p class="help-block">
26             <%= input[:doc] %>
27           </p>
28         </div>
29       <% end %>
30     <% end %>
31   </div>
32 </form>
33 <% end %>
34
35 <p style="margin-bottom: 2em"><b style="margin-right: 3em">Reuse past workflow steps if available?</b>  <%= render_editable_attribute(@object, :reuse_steps) %></p>
36
37 <% if n_inputs == 0 %>
38   <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>
39 <% else %>
40   <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>
41 <% end %>
42
43 <% if @object.editable? %>
44   <%= content_for :pi_input_form %>
45   <%= link_to(url_for('container_request[state]' => 'Committed'),
46         class: 'btn btn-primary run-pipeline-button',
47         method: :patch
48         ) do %>
49     Run <i class="fa fa-fw fa-play"></i>
50   <% end %>
51 <% end %>
52
53 <%= render_unreadable_inputs_present %>