4036: when files in a collection are combined, create the new collection in the origi...
[arvados.git] / apps / workbench / app / views / collections / _show_recent.html.erb
index 21a815c40cc0b0cb7363263ae43c76fa36dcbed8..c958b290e8600c8b789b49ad21d06186873bd078 100644 (file)
@@ -1,17 +1,21 @@
-<% content_for :tab_line_buttons do %>
-<div class="pull-right" style="width: 30%">
-  <%= form_tag collections_path, method: 'get', remote: true, class: 'form-search' do %>
-  <div class="input-group">
-    <%= text_field_tag :search, params[:search], class: 'form-control', placeholder: 'Search collections' %>
-    <span class="input-group-btn">
-      <%= button_tag(class: 'btn btn-info') do %>
-      <span class="glyphicon glyphicon-search"></span>
-      <% end %>
-    </span>
-  </div>  
-  <% end %>
-</div>
-<% end %>
+<div class="selection-action-container" style="padding-left: 1em">
+  <div class="row">
+    <div class="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 "Create new collection with selected collections", '#',
+                  'data-href' => combine_selected_path,
+                  'data-selection-param-name' => 'selection[]',
+                  'data-selection-action' => 'combine-collections',
+                  'method' => 'post',
+                  'data-toggle' => 'dropdown'
+            %></li>
+        </ul>
+      </div>
+    </div>
+  </div>
+  <p/>
 
 <%= render partial: "paging", locals: {results: @collections, object: @object} %>
 
 
 <table id="collections-index" class="topalign table table-condensed table-fixedlayout"> <!-- table-fixed-header-row -->
   <colgroup>
-    <col width="8%" />
     <col width="10%" />
-    <col width="34%" />
-    <col width="11%" />
-    <col width="12%" />
-    <col width="29%" />
+    <col width="10%" />
+    <col width="40%" />
+    <col width="10%" />
+    <col width="30%" />
   </colgroup>
   <thead>
     <tr class="contain-align-left">
@@ -34,7 +37,6 @@
       <th>uuid</th>
       <th>contents</th>
       <th>created at</th>
-      <th>storage</th>
       <th>tags</th>
     </tr>
   </thead>
@@ -55,3 +57,5 @@ $(document).on('click', 'form[data-remote] input[type=submit]', function() {
   return true;
 });
 <% end %>
+
+</div>