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