Frontend feature to add items to locally-stored selection list that is session-persis...
[arvados.git] / apps / workbench / app / views / application / _show_recent.html.erb
index 9028c6abee4aeccf3530a500c68a86ac904105a6..ef4a8d1f041b5c91f00ea5e947059377c4aad185 100644 (file)
@@ -8,9 +8,12 @@
 
 <% attr_blacklist = ' created_at modified_at modified_by_user_uuid modified_by_client_uuid updated_at' %>
 
+<%= form_tag do |f| %>
+
 <table class="table table-condensed arv-index">
   <thead>
     <tr>
+      <th></th>
       <% @objects.first.attributes_for_display.each do |attr, attrvalue| %>
       <% next if attr_blacklist.index(" "+attr) %>
       <th class="arv-attr-<%= attr %>">
   <tbody>
     <% @objects.each do |object| %>
     <tr data-object-uuid="<%= object.uuid %>">
+      <td>
+        <%= render :partial => "selection_checkbox", :locals => {:object => object} %>
+      </td>
+
       <% object.attributes_for_display.each do |attr, attrvalue| %>
       <% next if attr_blacklist.index(" "+attr) %>
       <td class="arv-object-<%= object.class.to_s %> arv-attr-<%= attr %>">
       </td>
       <% end %>
       <td>
-        <% if object.editable? %>
-        <%= link_to({action: 'destroy', id: object.uuid}, method: :delete, remote: true, data: {confirm: "You are about to delete #{controller.model_class} #{object.uuid}.\n\nAre you sure?"}) do %>
-        <i class="glyphicon glyphicon-trash"></i>
-        <% end %>
-        <% end %>
+        <%= render partial: 'delete_object_button', locals: {object:object} %>
       </td>
     </tr>
     <% end %>
@@ -59,3 +62,5 @@
 </table>
 
 <% end %>
+
+<% end %>