Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / app / views / trash_items / _show_trash_rows.html.erb
index 747f185573e84c8ae4e083441610c7cbe4951a47..dd451b6eac1af0ed657069836bea1e61eab86025 100644 (file)
@@ -1,32 +1,47 @@
+<%# Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: AGPL-3.0 %>
+
 <% @objects.each do |obj| %>
-    <tr data-object-uuid="<%= obj.uuid %>" data-kind="<%= obj.kind %>" >
+  <tr data-object-uuid="<%= obj.uuid %>" data-kind="<%= obj.kind %>" >
+    <td>
+      <% if obj.editable? and obj.is_trashed %>
+        <%= check_box_tag 'uuids[]', obj.uuid, false, :class => 'persistent-selection', style: 'cursor: pointer;' %>
+      <% end %>
+    </td>
+    <td>
+      <%= if !obj.name.blank? then obj.name else obj.uuid end %>
+    </td>
+    <% if obj.is_trashed %>
       <td>
-        <% if obj.editable? %>
-          <%= check_box_tag 'uuids[]', obj.uuid, false, :class => 'persistent-selection', style: 'cursor: pointer;' %>
-        <% end %>
-      </td>
-      <td>
-        <%= if !obj.name.blank? then obj.name else obj.uuid end %>
-      <td>
-        <%= render_localized_date(obj.trash_at) if obj.trash_at %>
-      <td>
-        <%= render_localized_date(obj.delete_at) if obj.delete_at %>
-      </td>
-      <td>
-        <%= link_to_if_arvados_object obj.owner_uuid, friendly_name: true %>
+        <%= link_to_if_arvados_object @owners[obj.owner_uuid], friendly_name: true %>
       </td>
+
       <td>
-        <% for i in (0..[2, obj.files.length-1].min) %>
-          <% file = obj.files[i] %>
-          <% file_path = "#{file[0]}/#{file[1]}" %>
-          <%= file_path %><br />
+        <% if obj.trash_at %>
+          <%= render_localized_date(obj.trash_at)  %>
         <% end %>
-        <% if obj.files.length > 3 %>
-          <%= "(#{obj.files.length-3} more files)" %>
+        <br />
+        <% if obj.delete_at %>
+          <%= render_localized_date(obj.delete_at) %>
         <% end %>
       </td>
-      <td>
-        <%= render partial: 'untrash_item', locals: {object:obj} %>
+    <% else %>
+      <td colspan="2" class="trash-project-msg">
+        <%= link_to_if_arvados_object @owners[obj.owner_uuid], friendly_name: true %>
+        <br>
+        This item is contained within a trashed project.
       </td>
-    </tr>
+    <% end %>
+    <td>
+      <%= obj.uuid %>
+      <% if defined? obj.portable_data_hash %>
+        <br /><%= obj.portable_data_hash %>
+      <% end %>
+    </td>
+    <td>
+      <%= render partial: 'untrash_item', locals: {object:obj} %>
+    </td>
+  </tr>
+
 <% end %>