3654: move the checkbox to the left of the row in collection show page. also, fixed...
[arvados.git] / apps / workbench / app / views / collections / show.html.erb
index 183d6d38d6601b647082c0b227304eb70a20aba2..94b099a25c8c7256a3a63430080a0778d7f9d7c9 100644 (file)
@@ -2,7 +2,6 @@
   <%= link_to(
       choose_projects_path(
        title: 'Copy to project...',
-       my_root_selectable: true,
        action_name: 'Copy',
        action_href: actions_path,
        action_method: 'post',
@@ -22,7 +21,7 @@
     <div class="panel panel-info">
       <div class="panel-heading">
        <h3 class="panel-title">
-          <% if @object.uuid.match /[0-9a-f]{32}/ %>
+          <% if @name_link.nil? and @object.uuid.match /[0-9a-f]{32}/ %>
             Content hash <%= @object.portable_data_hash %>
           <% else %>
            <%= if @object.respond_to? :name
       </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 %>