Merge branch '8784-dir-listings'
[arvados.git] / apps / workbench / app / views / collections / _show_tag_rows.html.erb
1 <%# Copyright (C) The Arvados Authors. All rights reserved.
2
3 SPDX-License-Identifier: AGPL-3.0 %>
4
5 <%
6   tags = object.properties
7 %>
8       <% if tags.andand.is_a?(Hash) %>
9         <% tags.each do |k, v| %>
10           <tr class="collection-tag-<%=k%>">
11             <td>
12               <% if object.editable? %>
13                 <i class="glyphicon glyphicon-remove collection-tag-remove hide" style="cursor: pointer;"></i>
14               <% end %>
15             </td>
16             <td class="collection-tag-field collection-tag-field-key">
17               <%= k %>
18             </td>
19             <td class="collection-tag-field collection-tag-field-value">
20               <%= v %>
21             </td>
22           </tr>
23         <% end %>
24       <% end %>
25
26       <% if @object.editable? %>
27         <!-- A hidden row to add new tag -->
28         <tr class="collection-tag-hidden hide">
29           <td>
30             <i class="glyphicon glyphicon-remove collection-tag-remove hide" style="cursor: pointer"></i>
31           </td>
32           <td class="collection-tag-field collection-tag-field-key"></td>
33           <td class="collection-tag-field collection-tag-field-value"></td>
34         </tr>
35       <% end %>