rename foreign uuid attributes
[arvados.git] / apps / workbench / app / views / links / index.html.erb
1 <table class="table">
2   <thead>
3     <tr class="contain-align-left">
4       <th>
5         id
6       </th><th>
7         class
8       </th><th>
9         name
10       </th><th>
11         tail
12       </th><th>
13         head
14       </th><th>
15         properties
16       </th><th>
17       </th>
18     </tr>
19   </thead>
20   <tbody>
21
22     <% @objects.sort_by { |link| link[:created_at] }.each do |link| %>
23
24     <tr>
25       <td>
26         <%= link_to_if_arvados_object link %>
27       </td><td>
28         <%= render_editable_attribute link, 'link_class' %>
29       </td><td>
30         <%= render_editable_attribute link, 'name' %>
31       </td><td>
32         <%= render_editable_attribute link, 'tail_uuid' %>
33       </td><td>
34         <%= render_editable_attribute link, 'head_uuid' %>
35       </td><td>
36         <%= link.properties %>
37       </td>
38
39       <td>
40         <% if current_user and (current_user.is_admin or current_user.uuid == link.owner_uuid) %>
41         <%= link_to raw('<i class="icon-trash"></i>'), { action: 'destroy', id: link.uuid }, { confirm: 'Delete this link?', method: 'delete' } %>
42         <% end %>
43       </td>
44
45     </tr>
46
47     <% end %>
48     <% if @objects.count == 0 %>
49     <tr>
50       <td colspan="7">
51         (no links)
52       </td>
53     </tr>
54     <% end %>
55
56   </tbody>
57 </table>