Add 'apps/arv-web/' from commit 'f9732ad8460d013c2f28363655d0d1b91894dca5'
[arvados.git] / apps / workbench / app / views / application / _show_recent.html.erb
1 <% if objects.empty? %>
2 <br/>
3 <p style="text-align: center">
4   No <%= controller.controller_name.humanize.downcase %> to display.
5 </p>
6
7 <% else %>
8
9 <% attr_blacklist = ' created_at modified_at modified_by_user_uuid modified_by_client_uuid updated_at owner_uuid group_class properties' %>
10
11 <%= render partial: "paging", locals: {results: objects, object: @object} %>
12
13 <%= form_tag do |f| %>
14
15 <table class="table table-condensed arv-index">
16   <thead>
17     <tr>
18       <% if objects.first and objects.first.class.goes_in_projects? %>
19         <th></th>
20       <% end %>
21       <th></th>
22       <% objects.first.attributes_for_display.each do |attr, attrvalue| %>
23       <% next if attr_blacklist.index(" "+attr) %>
24       <th class="arv-attr-<%= attr %>">
25         <%= controller.model_class.attribute_info[attr.to_sym].andand[:column_heading] or attr.sub /_uuid/, '' %>
26       </th>
27       <% end %>
28       <th>
29         <!-- a column for delete buttons -->
30       </th>
31     </tr>
32   </thead>
33
34   <tbody>
35     <% objects.each do |object| %>
36     <tr data-object-uuid="<%= object.uuid %>">
37       <% if objects.first.class.goes_in_projects? %>
38         <td>
39           <%= render :partial => "selection_checkbox", :locals => {:object => object} %>
40         </td>
41       <% end %>
42       <td>
43         <%= render :partial => "show_object_button", :locals => {object: object, size: 'xs'} %>
44       </td>
45
46       <% object.attributes_for_display.each do |attr, attrvalue| %>
47       <% next if attr_blacklist.index(" "+attr) %>
48       <td class="arv-object-<%= object.class.to_s %> arv-attr-<%= attr %>">
49         <% if attr == 'uuid' %>
50           <span class="arvados-uuid"><%= attrvalue %></span>
51         <% else %>
52           <%= link_to_if_arvados_object attrvalue, {referring_attr: attr, referring_object: object, with_class_name: true, friendly_name: true} %>
53         <% end %>
54       </td>
55       <% end %>
56       <td>
57         <%= render partial: 'delete_object_button', locals: {object:object} %>
58       </td>
59     </tr>
60     <% end %>
61   </tbody>
62
63   <tfoot>
64   </tfoot>
65 </table>
66
67 <% end %>
68
69 <%= render partial: "paging", locals: {results: objects, object: @object} %>
70
71 <% end %>