X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9ff2df8cfa1f0798c22e4b3c6ef91d4677961295..84f5a47bad55d864af012cfdfe6e6baf8f63689d:/apps/workbench/app/views/trash_items/_show_trash_rows.html.erb diff --git a/apps/workbench/app/views/trash_items/_show_trash_rows.html.erb b/apps/workbench/app/views/trash_items/_show_trash_rows.html.erb index 7e01e3d0fe..6fc1676b85 100644 --- a/apps/workbench/app/views/trash_items/_show_trash_rows.html.erb +++ b/apps/workbench/app/views/trash_items/_show_trash_rows.html.erb @@ -1,25 +1,32 @@ -<% @objects.sort_by { |obj| obj.created_at }.reverse.each do |obj| %> +<%# Copyright (C) The Arvados Authors. All rights reserved. + +SPDX-License-Identifier: AGPL-3.0 %> + +<% @objects.each do |obj| %> - <%= check_box_tag 'uuids[]', obj.uuid, false, :class => 'persistent-selection' %> + <% if obj.editable? %> + <%= check_box_tag 'uuids[]', obj.uuid, false, :class => 'persistent-selection', style: 'cursor: pointer;' %> + <% end %> <%= if !obj.name.blank? then obj.name else obj.uuid end %> - <%= obj.created_at.to_s if obj.created_at %> + <%= render_localized_date(obj.trash_at) if obj.trash_at %> + + <%= render_localized_date(obj.delete_at) if obj.delete_at %> + - <%= obj.trash_at.to_s if obj.trash_at %> + <%= link_to_if_arvados_object obj.owner_uuid, friendly_name: true %> - <% i = 0 %> - <% while i < 5 and i < obj.files.length %> + <% for i in (0..[2, obj.files.length-1].min) %> <% file = obj.files[i] %> <% file_path = "#{file[0]}/#{file[1]}" %> <%= file_path %>
- <% i += 1 %> <% end %> - <% if i < obj.files.length %> - … + <% if obj.files.length > 3 %> + <%= "(#{obj.files.length-3} more files)" %> <% end %>