Merge branch 'master' into 10576-cwl-keep-fetcher
[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                                                    'pipeline_instance[description]' => "Created at #{Time.now.localtime}" + (ob.name.andand.size.andand>0 ? " using the pipeline template *#{ob.name}*" : ""),
39                                                    'success' => 'redirect-to-created-object'
40                                                   }.to_json),
41                 { class: "btn btn-default btn-xs", title: "Run #{ob.name}", remote: true, method: :get }
42             ) do %>
43                <i class="fa fa-fw fa-play"></i> Run
44               <% end %>
45       </td>
46       <td>
47         <%= render :partial => "show_object_button", :locals => {object: ob, size: 'xs'} %>
48       </td><td>
49         <%= render_editable_attribute ob, 'name' %>
50       </td><td>
51         <% if ob.respond_to?(:description) and ob.description %>
52           <%= render_attribute_as_textile(ob, "description", ob.description, false) %>
53           <br />
54         <% end %>
55         <% ob.components.collect { |k,v| k.to_s }.each do |k| %>
56           <span class="label label-default"><%= k %></span>
57         <% end %>
58       </td><td>
59         <%= link_to_if_arvados_object ob.owner_uuid, friendly_name: true %>
60       </td>
61     </tr>
62
63     <% end %>
64
65   </tbody>
66 </table>
67
68 <%= render partial: "paging", locals: {results: @objects, object: @object} %>