3349: Merge branch 'master' into 3349-install-docs
[arvados.git] / apps / workbench / app / views / pipeline_templates / _show_recent.html.erb
1 <%= render partial: "paging", locals: {results: @objects, object: @object} %>
2
3 <table class="table table-condensed arv-index">
4   <colgroup>
5     <col width="8%" />
6     <col width="10%" />
7     <col width="22%" />
8     <col width="45%" />
9     <col width="15%" />
10   </colgroup>
11   <thead>
12     <tr class="contain-align-left">
13       <th>
14       </th><th>
15       </th><th>
16         name
17       </th><th>
18         description/components
19       </th><th>
20         owner
21       </th>
22     </tr>
23   </thead>
24   <tbody>
25
26     <% @objects.sort_by { |ob| ob[:created_at] }.reverse.each do |ob| %>
27
28     <tr>
29       <td>
30         <%= button_to(choose_projects_path(id: "run-pipeline-button",
31                                      title: 'Choose project',
32                                      editable: true,
33                                      action_name: 'Choose',
34                                      action_href: pipeline_instances_path,
35                                      action_method: 'post',
36                                      action_data: {selection_param: 'pipeline_instance[owner_uuid]',
37                                                    'pipeline_instance[pipeline_template_uuid]' => ob.uuid,
38                                                    'success' => 'redirect-to-created-object'
39                                                   }.to_json),
40                 { class: "btn btn-default btn-xs", title: "Run #{ob.name}", remote: true, method: 'get' }
41             ) do %>
42                <i class="fa fa-fw fa-play"></i> Run
43               <% end %>
44       </td>
45       <td>
46         <%= render :partial => "show_object_button", :locals => {object: ob, size: 'xs'} %>
47       </td><td>
48         <%= render_editable_attribute ob, 'name' %>
49       </td><td>
50         <% if ob.respond_to?(:description) and ob.description %>
51           <%= ob.description %>
52           <br />
53         <% end %>
54         <% ob.components.collect { |k,v| k.to_s }.each do |k| %>
55           <span class="label label-default"><%= k %></span>
56         <% end %>
57       </td><td>
58         <%= link_to_if_arvados_object ob.owner_uuid, friendly_name: true %>
59       </td>
60     </tr>
61
62     <% end %>
63
64   </tbody>
65 </table>
66
67 <%= render partial: "paging", locals: {results: @objects, object: @object} %>