Merge branch 'master' into 3153-auto-setup-user
[arvados.git] / apps / workbench / app / views / collections / index.html.erb
index 6fb506d1e8d92eae1da81cef400e11104b8877fb..061b05b474fa70309f7904c072b54a338d4769e4 100644 (file)
@@ -1,57 +1,14 @@
-<%#= render :partial => 'nav' %>
-
-<table class="topalign table table-bordered table-condensed table-fixedlayout table-smallcontent">
-  <colgroup>
-    <col width="10%" />
-    <col width="50%" />
-    <col width="16%" />
-    <col width="16%" />
-    <col width="8%" />
-  </colgroup>
-  <thead>
-    <tr class="contain-align-left">
-      <th>
-       uuid
-      </th><th>
-       contents
-      </th><th>
-       age
-      </th><th>
-       tags
-      </th><th>
-       storage
-      </th>
-    </tr>
-  </thead>
-  <tbody>
-
-    <% @collections.each do |c| %>
-
-    <tr class="collection">
-      <td>
-        <%= link_to_if_arvados_object c.uuid %>
-      </td><td>
-        <% c.files.each do |file| %>
-          <%= file[0] == '.' ? file[1] : "#{file[0]}/#{file[1]}" %>
-        <% end %>
-      </td><td>
-       <%= raw(distance_of_time_in_words(c.created_at, Time.now).sub('about ','~').sub(' ','&nbsp;')) if c.created_at %>
-      </td><td>
-        <% if @collection_info[c.uuid] %>
-          <%= @collection_info[c.uuid][:tags].uniq.join ', ' %>
-        <% end %>
-      </td><td>
-        <% if @collection_info[c.uuid][:wanted_by_me] %>
-        <span class="label label-info">2&times;</span>
-        <% elsif @collection_info[c.uuid][:wanted] %>
-        <span class="label">2&times;</span>
-        <% else %>
-        <span class="label">cache</span>
-        <% end %>
-      </td>
-    </tr>
-
-    <% end %>
-
-  </tbody>
-</table>
+<% content_for :tab_line_buttons do %>
+ <%= 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 %>
+<% end %>
+
+<%= render file: 'application/index.html.erb', locals: local_assigns %>