5622: when there are too many collections matching a pdh, show only 20 of them.
[arvados.git] / apps / workbench / app / views / collections / hash_matches.html.erb
1 <%
2   message = "The following collections have this content:"
3   if @same_pdh.items_available > @same_pdh.results.size
4     message += ' (' + (@same_pdh.items_available - @same_pdh.results.size).to_s + ' more results are not shown)'
5   end
6 %>
7 <div class="row">
8   <div class="col-md-10 col-md-offset-1">
9     <div class="panel panel-info">
10       <div class="panel-heading">
11         <h3 class="panel-title"><%= params["uuid"] %></h3>
12       </div>
13       <div class="panel-body">
14         <p><i><%= message %></i></p>
15         <% @same_pdh.sort { |a,b| b.created_at <=> a.created_at }.each do |c| %>
16           <div class="row">
17             <div class="col-md-8">
18               <% owner = object_for_dataclass(Group, c.owner_uuid) || object_for_dataclass(User, c.owner_uuid) %>
19               <%= link_to_if_arvados_object owner, {:friendly_name => true} %> / <%= link_to_if_arvados_object c, {:friendly_name => true} %><br>
20             </div>
21             <div class="col-md-4">
22               <%= render_localized_date c.created_at %>
23             </div>
24           </div>
25         <% end %>
26       </div>
27     </div>
28   </div>
29 </div>