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 d3a2e98cc313e7564a6e6486de86dd9c7e96c705..638fe14859b4b997fc228671d4e800ae49d6edf4 100644 (file)
@@ -9,7 +9,9 @@
       <div style="width:1em; display:inline-block;">
         <%= render partial: 'selection_checkbox', locals: {object: name_object, friendly_name: ((name_object.name rescue '') || '')} %>
       </div>
+    </td>
 
+    <td>
       <% if @object.editable? %>
         <%= link_to({action: 'remove_item', id: @object.uuid, item_uuid: ((name_link && name_link.uuid) || object.uuid)}, method: :delete, remote: true, data: {confirm: "Remove #{object.class_for_display.downcase} #{name_object.name rescue object.uuid} from this project?", toggle: 'tooltip', placement: 'top'}, class: 'btn btn-sm btn-default btn-nodecorate', title: 'remove') do %>
           <i class="fa fa-fw fa-trash-o"></i>
       <% else %>
         <i class="fa fa-fw"></i><%# placeholder %>
       <% end %>
+    </td>
 
+    <td>
       <%= render :partial => "show_object_button", :locals => {object: object, size: 'sm', name_link: name_link} %>
+    </td>
 
+    <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">
       <%= render_controller_partial(
           'show_object_description_cell.html',