Advertise filters param in discovery doc.
[arvados.git] / apps / workbench / app / views / collections / _index_tbody.html.erb
1 <% @collections.each do |c| %>
2
3 <tr class="collection" data-object-uuid="<%= c.uuid %>">
4   <td>
5     <%= link_to_if_arvados_object c.uuid %>
6   </td>
7   <td>
8     <% i = 0 %>
9     <% while i < 3 and i < c.files.length %>
10       <% file = c.files[i] %>
11       <% file_path = "#{file[0]}/#{file[1]}" %>
12       <%= link_to file[1], {controller: 'collections', action: 'show_file', uuid: c.uuid, file: file_path, size: file[2], disposition: 'inline'}, {title: 'View in browser'} %><br />
13       <% i += 1 %>
14     <% end %>
15     <% if i < c.files.length %>
16       &vellip;
17     <% end %>
18   </td>
19   <td><%= link_to_if_arvados_object c.owner_uuid, friendly_name: true %></td>
20   <td>
21     <%= raw(distance_of_time_in_words(c.created_at, Time.now).sub('about ','~').sub(' ','&nbsp;')) if c.created_at %>
22   </td>
23   <td>
24     <% if @collection_info[c.uuid][:wanted_by_me] %>
25       <span class="label label-info">2&times;</span>
26     <% elsif @collection_info[c.uuid][:wanted] %>
27       <span class="label">2&times;</span>
28     <% else %>
29       <span class="label">cache</span>
30     <% end %>
31   </td>
32   <td class="add-tag-button">
33     <a class="btn btn-xs btn-info add-tag-button pull-right" data-remote-href="<%= url_for(controller: 'links', action: 'create') %>" data-remote-method="post"><i class="glyphicon glyphicon-plus"></i>&nbsp;Add</a>
34     <span class="removable-tag-container">
35     <% if @collection_info[c.uuid] %>
36       <% @collection_info[c.uuid][:tag_links].each do |tag_link| %>
37         <span class="label label-info removable-tag" data-tag-link-uuid="<%= tag_link.uuid %>"><%= tag_link.name %>
38           <% if tag_link.owner_uuid == current_user.uuid %>
39           &nbsp;<a title="Delete tag"><i class="glyphicon glyphicon-trash"></i></a>
40           <% end %>
41         </span>&nbsp;
42       <% end %>
43     <% end %>
44     </span>
45   </td>
46 </tr>
47
48 <% end %>