tweak example templates
[arvados.git] / apps / workbench / app / views / collections / index.html.erb
1 <%#= render :partial => 'nav' %>
2
3 <table class="topalign table table-bordered table-striped">
4   <thead>
5     <tr class="contain-align-left">
6       <th>
7         uuid
8       </th><th>
9         created
10       </th><th>
11         protected
12       </th><th>
13         groups
14       </th><th>
15         origin
16       </th>
17     </tr>
18   </thead>
19   <tbody>
20
21     <% @collection_info.sort_by { |k,c| c[:created_at].is_a?(Time) ? c[:created_at] : Time.now }.reverse.each do |uuid, c| %>
22
23     <tr class="collection">
24       <td>
25         <% if @collections.has_key? uuid %>
26         <%= link_to_if_arvados_object uuid %>
27         <% else %>
28         <%= uuid %>
29         <% end %>
30       </td><td>
31         <%= raw(distance_of_time_in_words(c[:created_at], Time.now).sub('about ','~').sub(' ','&nbsp;')) if c[:created_at] %>
32       </td><td>
33         <%= ('Y' if c[:wanted_by_me]) or ('y' if c[:wanted]) %>
34       </td><td>
35         <%= c[:groups].size if c[:groups] %>
36       </td><td>
37         <% if c[:origin] %>
38         <span class="deemphasize"><%= c[:origin].name %></span>
39         <%= c[:origin].head_uuid %>
40         <% end %>
41       </td>
42     </tr>
43
44     <% end %>
45
46   </tbody>
47 </table>