Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / views / application / _show_advanced_metadata.html.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5 <% outgoing = Link.where(tail_uuid: @object.uuid) %>
6 <% incoming = Link.where(head_uuid: @object.uuid) %>
7
8 <%
9   preload_uuids = []
10   preload_head_uuids = []
11   outgoing.results.each do |link|
12     preload_uuids << link.uuid
13     preload_uuids << link.head_uuid
14     preload_head_uuids << link.head_uuid
15   end
16   preload_collections_for_objects preload_uuids
17   preload_links_for_objects preload_head_uuids
18 %>
19
20 <% if (outgoing | incoming).any? %>
21 <table class="table topalign">
22   <colgroup>
23     <col width="20%" />
24     <col width="10%" />
25     <col width="10%" />
26     <col width="20%" />
27     <col width="20%" />
28     <col width="20%" />
29   </colgroup>
30   <thead>
31     <tr>
32       <th></th>
33       <th>link_class</th>
34       <th>name</th>
35       <th>tail</th>
36       <th>head</th>
37       <th>properties</th>
38     </tr>
39   </thead>
40   <tbody>
41     <% (outgoing | incoming).each do |link| %>
42       <tr>
43         <td>
44           <%= render partial: 'show_object_button', locals: { object: link, size: 'xs' } %>
45           <span class="arvados-uuid"><%= link.uuid %></span>
46         </td>
47         <td><%= link.link_class %></td>
48         <td><%= link.name %></td>
49         <td><%= link.tail_uuid == object.uuid ? 'this' : (render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "tail_uuid", attrvalue: link.tail_uuid, editable: false }) %></td>
50         <td><%= link.head_uuid == object.uuid ? 'this' : (render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "head_uuid", attrvalue: link.head_uuid, editable: false }) %></td>
51         <td><%= render partial: 'application/arvados_attr_value', locals: { obj: link, attr: "properties", attrvalue: link.properties, editable: false } %></td>
52       </tr>
53     <% end %>
54   </tbody>
55 </table>
56 <% else %>
57 <span class="deemphasize">
58   (No metadata links found)
59 </span>
60 <% end %>