3342: Fixing outputs
[arvados.git] / apps / workbench / app / views / collections / show.html.erb
index cc19000725526059fb6ded363928b9cd4823195b..7d8ac4dacbad0a11ab95d3f63b1641a2300770f5 100644 (file)
       </div>
       <div class="panel-body">
         <img src="/favicon.ico" class="pull-right" alt="" style="opacity: 0.3"/>
-        <% if @object.uuid.match /[0-9a-f]{32}/ %>
+        <% if defined? @same_pdh %>
           <p>Found in collections:<p>
           <p>
-            <% cols = Collection.filter([["portable_data_hash", "=", @object.portable_data_hash]]).each do |c| %>
-              <%= link_to_if_arvados_object c.owner_uuid, {:friendly_name => true} %> / <%= link_to_if_arvados_object c, {:friendly_name => true} %><br>
+            <% @same_pdh.each do |c| %>
+              <%= link_to_if_arvados_object get_object(c.owner_uuid), {:friendly_name => true} %> / <%= link_to_if_arvados_object c, {:friendly_name => true} %><br>
             <% end %>
           </p>
         <% else %>