9426: save "tags" as "properties" on collection, rather than as a field in properties.
[arvados.git] / apps / workbench / app / views / collections / _show_tag_rows.html.erb
1 <%
2   tags = object.properties
3 %>
4       <% if tags.andand.is_a?(Hash) %>
5         <% tags.each do |k, v| %>
6           <tr class="collection-tag-<%=k%>">
7             <td>
8               <% if object.editable? %>
9                 <i class="glyphicon glyphicon-remove collection-tag-remove hide" style="cursor: pointer;"></i>
10               <% end %>
11             </td>
12             <td class="collection-tag-field collection-tag-field-key">
13               <%= k %>
14             </td>
15             <td class="collection-tag-field collection-tag-field-value">
16               <%= v %>
17             </td>
18           </tr>
19         <% end %>
20       <% end %>
21
22       <% if @object.editable? %>
23         <!-- A hidden row to add new tag -->
24         <tr class="collection-tag-hidden hide">
25           <td>
26             <i class="glyphicon glyphicon-remove collection-tag-remove hide" style="cursor: pointer"></i>
27           </td>
28           <td class="collection-tag-field collection-tag-field-key"></td>
29           <td class="collection-tag-field collection-tag-field-value"></td>
30         </tr>
31       <% end %>