-<% 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", '#',
+ method: :post,
+ 'data-href' => combine_selected_path,
+ 'data-selection-param-name' => 'selection[]',
+ 'data-selection-action' => 'combine-collections',
+ 'data-toggle' => 'dropdown'
+ %></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ <p/>
+
+<%= render partial: "paging", locals: {results: @objects, object: @object} %>
<div style="padding-right: 1em">
-<table id="collections-index" class="topalign table table-condensed table-fixedlayout table-fixed-header-row">
+<%= form_tag do |f| %>
+
+<table id="collections-index" class="topalign table table-condensed table-fixedlayout"> <!-- table-fixed-header-row -->
<colgroup>
<col width="10%" />
- <col width="36%" />
- <col width="22%" />
- <col width="8%" />
- <col width="16%" />
- <col width="8%" />
+ <col width="10%" />
+ <col width="40%" />
+ <col width="10%" />
+ <col width="30%" />
</colgroup>
<thead>
<tr class="contain-align-left">
+ <th></th>
<th>uuid</th>
<th>contents</th>
- <th>owner</th>
- <th>age</th>
+ <th>created at</th>
<th>tags</th>
- <th>storage</th>
</tr>
</thead>
<tbody>
<%= render partial: 'index_tbody' %>
</tbody>
</table>
-</div>
-<% content_for :css do %>
-table.table-fixed-header-row {width: 100%;border-spacing: 0px;margin:0;}
-table.table-fixed-header-row thead {position:fixed; background: #fff;}
-table.table-fixed-header-row tbody {position:relative; top:1.5em;}
<% end %>
+
+</div>
+
+<%= render partial: "paging", locals: {results: @objects, object: @object} %>
+
<% content_for :footer_js do %>
$(document).on('click', 'form[data-remote] input[type=submit]', function() {
$('table#collections-index tbody').fadeTo(200, 0.3);
return true;
});
-HeaderRowFixer = function(selector) {
- settings = {
- tables: $(selector),
- thead: []
- };
-
- this.duplicateTheadTr = function() {
- $('>tbody', settings.tables).each(function(){
- $(this).prepend($('thead>tr', this).clone().css('opacity:0'));
- });
- }
- this.fixThead = function() {
- settings.tables.each(function() {
- var widths = [];
- $('> tbody > tr:eq(1) > td', this).each( function(i,v){
- widths.push($(v).width());
- });
- for(i=0;i<widths.length;i++) {
- $('thead th:eq('+i+')', this).width(widths[i]);
- }
- });
- }
-}
-$(function(){
- var fixer = new HeaderRowFixer('.table-fixed-header-row');
- fixer.fixThead();
- fixer.duplicateTheadTr();
- $(window).resize(function(){
- fixer.fixThead();
- });
-});
<% end %>
+
+</div>