<%# Copyright (C) The Arvados Authors. All rights reserved. SPDX-License-Identifier: AGPL-3.0 %> <% get_objects_and_names.each do |object, name_link| %> <% name_object = (object.respond_to?(:name) || !name_link) ? object : name_link %>
<%= render partial: 'selection_checkbox', locals: {object: object, friendly_name: ((name_object.name rescue '') || '')} %>
<% 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 %> <% end %> <% else %> <%# placeholder %> <% end %> <%= render :partial => "show_object_button", :locals => {object: object, size: 'sm', name_link: name_link} %> <% if object.respond_to?(:work_unit) %> <% wu = object.work_unit object.name %> <%=wu.state_label%> <% end %> <% if object.respond_to?(:name) %> <%= render_editable_attribute (name_link || object), 'name', nil, {}, {tiptitle: 'rename'} %> <% end %> <%= render_controller_partial( 'show_object_description_cell.html', controller_name: object.controller_name, locals: {object: object}) %> <% end %>