Merge remote-tracking branch 'origin/master' into 3504-clients-compatible-with-3036
[arvados.git] / apps / workbench / app / views / projects / _show_contents_rows.html.erb
index e1996a7f406f2700dbfb291b07cd1d7962d6164e..638fe14859b4b997fc228671d4e800ae49d6edf4 100644 (file)
 
     <td>
       <%= render_editable_attribute (name_link || object), 'name', nil, {tiptitle: 'rename'} %>
+      <br>
+      <span class="tags-span">
+    <span class="removable-tag-container">
+    <% links_for_object(object).select{|link|link.link_class=='tag'}.each do |tag_link| %>
+        <span class="label label-info" data-tag-link-uuid="<%= tag_link.uuid %>">
+          <%= link_to tag_link.name, controller: "links", filters: [["link_class", "=", "tag"], ["name", "=", tag_link.name]].to_json %>
+          <% if tag_link.owner_uuid == current_user.uuid or current_user.is_admin %>
+            <span class="removable-tag">
+              &nbsp;<a title="Delete tag"><i class="fa fa-fw fa-trash-o"></i></a>
+            </span>
+          <% end %>
+        </span>&nbsp;
+    <% end %>
+    </span>
+    <a class="btn btn-xs btn-info add-tag-button" data-remote-href="<%= url_for(controller: 'links', action: 'create') %>" data-remote-method="post"><i class="glyphicon glyphicon-plus"></i>&nbsp;Tag</a>
+    </span>
     </td>
 
     <td class="arv-description-in-table">