Merge branch '12020-flaky-py-test'
[arvados.git] / apps / workbench / app / views / groups / _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: @groups, object: @object} %>
6
7 <table class="table table-hover">
8   <thead>
9     <tr class="contain-align-left">
10       <th>
11         Group
12       </th><th>
13         Owner
14       </th><th>
15         Incoming permissions
16       </th><th>
17         Outgoing permissions
18       </th><th>
19         <!-- column for delete buttons -->
20       </th>
21     </tr>
22   </thead>
23   <tbody>
24
25     <% @groups.sort_by { |g| g[:created_at] }.reverse.each do |g| %>
26
27     <tr>
28       <td>
29         <%= link_to_if_arvados_object g, friendly_name: true %>
30       </td><td>
31         <%= link_to_if_arvados_object g.owner_uuid, friendly_name: true %>
32       </td><td>
33         <%= @links_to.select { |x| x.head_uuid == g.uuid }.collect(&:tail_uuid).uniq.count %>
34       </td><td>
35         <%= @links_from.select { |x| x.tail_uuid == g.uuid }.collect(&:head_uuid).uniq.count %>
36       </td><td>
37         <%= render partial: 'delete_object_button', locals: {object:g} %>
38       </td>
39     </tr>
40
41     <% end %>
42
43   </tbody>
44 </table>
45
46 <%= render partial: "paging", locals: {results: @groups, object: @object} %>