Add 'apps/arv-web/' from commit 'f9732ad8460d013c2f28363655d0d1b91894dca5'
[arvados.git] / apps / workbench / app / views / projects / _show_contents_rows.html.erb
1 <% get_objects_and_names.each do |object, name_link| %>
2   <% name_object = (object.respond_to?(:name) || !name_link) ? object : name_link %>
3   <tr class="filterable"
4       data-object-uuid="<%= name_object.uuid %>"
5       data-kind="<%= object.kind %>"
6       data-object-created-at="<%= object.created_at %>"
7       >
8     <td>
9       <div style="width:1em; display:inline-block;">
10         <%= render partial: 'selection_checkbox', locals: {object: name_object, friendly_name: ((name_object.name rescue '') || '')} %>
11       </div>
12     </td>
13
14     <td>
15       <% if @object.editable? %>
16         <%= 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 %>
17           <i class="fa fa-fw fa-trash-o"></i>
18         <% end %>
19       <% else %>
20         <i class="fa fa-fw"></i><%# placeholder %>
21       <% end %>
22     </td>
23
24     <td>
25       <%= render :partial => "show_object_button", :locals => {object: object, size: 'sm', name_link: name_link} %>
26     </td>
27
28     <td>
29       <%= render_editable_attribute (name_link || object), 'name', nil, {tiptitle: 'rename'} %>
30     </td>
31
32     <td class="arv-description-in-table">
33       <%= render_controller_partial(
34           'show_object_description_cell.html',
35           controller_name: object.controller_name,
36           locals: {object: object})
37           %>
38     </td>
39   </tr>
40 <% end %>