9587: cleanup trashed_items method
[arvados.git] / apps / workbench / app / views / trash_items / _show_trash_items.html.erb
index f069527a2cd0849905168da381066172218a6868..af4899047a902de7f897b0eeec85e6221aa1b0dc 100644 (file)
@@ -1,29 +1,52 @@
-<%= form_tag({}, {id: "trash_items"}) do |f| %>
-  <table id="trash-index" class="topalign table table-condensed table-fixedlayout">
-    <colgroup>
-      <col width="5%" />
-      <col width="15%" />
-      <col width="10%" />
-      <col width="10%" />
-      <col width="30%" />
-      <col width="25%" />
-      <col width="5%" />
-    </colgroup>
+<div class="container selection-action-container" style="width: 100%">
+  <div class="col-md-2 pull-left">
+    <div class="btn-group btn-group-sm">
+      <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Selection... <span class="caret"></span></button>
+      <ul class="dropdown-menu" role="menu">
+        <li><%= link_to "Un-trash selected items", '#',
+                method: :post,
+                remote: true,
+                'id' => 'untrash_selected_items',
+                'data-href' => untrash_items_trash_items_path,
+                'data-selection-param-name' => 'selection[]',
+                'data-selection-action' => 'untrash-selected-items',
+                'data-toggle' => 'dropdown'
+          %></li>
+      </ul>
+    </div>
+  </div>
+  <div class="col-md-4 pull-right">
+    <input type="text" class="form-control filterable-control recent-trash-items"
+           placeholder="Search trash"
+           data-filterable-target="#recent-trash-items"
+           value="<%= params[:search] %>" />
+  </div>
 
-    <thead>
-      <tr class="contain-align-left">
-        <th></th>
-        <th>Name</th>
-        <th>Created at</th>
-        <th>Trashed at</th>
-        <th>Contents</th>
-        <th>Tags</th>
-        <th></th>
-      </tr>
-    </thead>
+  <div>
+    <table id="trash-index" class="topalign table table-condensed table-fixedlayout">
+      <colgroup>
+        <col width="5%" />
+        <col width="20%" />
+        <col width="15%" />
+        <col width="15%" />
+        <col width="40%" />
+        <col width="5%" />
+      </colgroup>
 
-    <tbody data-infinite-scroller="#recent-trash-items" id="recent-trash-items"
-      data-infinite-content-href="<%= url_for partial: :trash_rows %>" >
-    </tbody>
-  </table>
-<% end %>
+      <thead>
+        <tr class="contain-align-left">
+          <th></th>
+          <th>Name</th>
+          <th>Created at</th>
+          <th>Trashed at</th>
+          <th>Contents</th>
+          <th></th>
+        </tr>
+      </thead>
+
+      <tbody data-infinite-scroller="#recent-trash-items" id="recent-trash-items"
+        data-infinite-content-href="<%= url_for partial: :trash_rows %>" >
+      </tbody>
+    </table>
+  </div>
+</div>