8784: Fix test for latest firefox.
[arvados.git] / apps / workbench / app / views / collections / _index_tbody.html.erb
1 <% @objects.each do |c| %>
2
3 <tr class="collection" data-object-uuid="<%= c.uuid %>">
4   <td>
5     <%=
6        friendly_name = c.friendly_link_name
7        @collection_info[c.uuid][:tag_links].each do |tag_link|
8          friendly_name += raw(" <span class='label label-info'>#{tag_link.name}</span>")
9        end
10        render partial: "selection_checkbox", locals: {
11          object: c,
12          friendly_name: friendly_name
13        }
14     %>
15
16     <%= render :partial => "show_object_button", :locals => {object: c, size: 'xs'} %>
17   </td>
18   <td>
19     <%= c.uuid %>
20   </td>
21   <td>
22     <% i = 0 %>
23     <% while i < 3 and i < c.files.length %>
24       <% file = c.files[i] %>
25       <% file_path = "#{file[0]}/#{file[1]}" %>
26       <%= 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 />
27       <% i += 1 %>
28     <% end %>
29     <% if i < c.files.length %>
30       &vellip;
31     <% end %>
32   </td>
33   <td>
34     <%= c.created_at.to_s if c.created_at %>
35   </td>
36   <td class="add-tag-button">
37     <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>
38     <span class="removable-tag-container">
39     <% if @collection_info[c.uuid] %>
40       <% @collection_info[c.uuid][:tag_links].each do |tag_link| %>
41         <span class="label label-info removable-tag" data-tag-link-uuid="<%= tag_link.uuid %>"><%= tag_link.name %>
42           <% if tag_link.owner_uuid == current_user.andand.uuid %>
43           &nbsp;<a title="Delete tag"><i class="glyphicon glyphicon-trash"></i></a>
44           <% end %>
45         </span>&nbsp;
46       <% end %>
47     <% end %>
48     </span>
49   </td>
50 </tr>
51
52 <% end %>