Merge branch 'master' into 2257-inequality-conditions
[arvados.git] / apps / workbench / app / views / pipeline_templates / _show_components_template.html.erb
1 <table class="table pipeline-components-table" style="margin-top: -.1em">
2   <colgroup>
3     <col style="width: 15%" />
4     <col style="width: 20%" />
5     <col style="width: 20%" />
6     <col style="width: 45%" />
7   </colgroup>
8
9   <thead>
10     <tr>
11       <th>
12         component
13       </th><th>
14         script
15       </th><th>
16         parameter
17       </th><th>
18         value
19       </th>
20     </tr>
21   </thead>
22   <tbody>
23     <% order = PipelineTemplatesHelper::sort_components(template.components) %>
24     <% puts "order is #{order}" %>
25     <% order.each do |k| %>
26       <% template_value = template.components[k] %>
27       <% puts "#{k} #{template_value}" %>
28       <% if not template_value then next end %>
29     <tr>
30       <td><span class="label label-default"><%= k %></span></td>
31
32       <td><%= render_editable_subattribute obj, :components, [k, :script], template_value[:script] %></td>
33
34       <td>script version</td>
35
36       <td>
37         <%= render_editable_subattribute obj, :components, [k, :script_version], template_value[:script_version] %>
38       </td>
39     </tr>
40
41     <% if template_value[:script_parameters].length > 0 %>
42       <% template_value[:script_parameters].each do |p, tv| %>
43         <tr>
44           <td style="border-top: none"></td>
45           <td style="border-top: none"></td>
46           
47           <td class="property-edit-row"><%= p %></td>
48           <td class="property-edit-row"><%= render_editable_subattribute obj, :components, [k, :script_parameters, p.to_sym], tv %></td>
49       <% end %>
50       </tr>
51     <% end %>
52   <% end %>
53   </tbody>
54 </table>