X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/436d545670d3637dcd96b429e538b995ee98a49b..1c6464fc1b6e3cde61b64fc07308a3934966fe74:/apps/workbench/app/views/collections/show_file_links.html.erb
diff --git a/apps/workbench/app/views/collections/show_file_links.html.erb b/apps/workbench/app/views/collections/show_file_links.html.erb
index 78d75b1f79..a82d2556e7 100644
--- a/apps/workbench/app/views/collections/show_file_links.html.erb
+++ b/apps/workbench/app/views/collections/show_file_links.html.erb
@@ -1,3 +1,7 @@
+<%# Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: AGPL-3.0 %>
+
<% coll_name = "Collection #{@object.uuid}" %>
@@ -6,7 +10,7 @@
- <%= coll_name %> / <%= Rails.configuration.site_name %>
+ <%= coll_name %> / <%= Rails.configuration.Workbench.SiteName %>
@@ -38,15 +42,17 @@ Arvados. You can download individual files listed below. To download
the entire collection with wget, try:
$ wget --mirror --no-parent --no-host --cut-dirs=3 <%=
- url_for(link_opts.merge(action: 'show_file_links', only_path: false))
+ url_for(link_opts.merge(action: 'show_file_links', only_path: false,
+ trailing_slash: true))
%>
File Listing
-<% if @object.andand.files_tree.andand.any? %>
+<% file_tree = @object.andand.files_tree %>
+<% if file_tree.andand.any? %>
- <% dirstack = [@object.files_tree.first.first] %>
- <% @object.files_tree.each_with_index do |(dirname, filename, size), index| %>
+ <% dirstack = [file_tree.first.first] %>
+ <% file_tree.take(10000).each_with_index do |(dirname, filename, size), index| %>
<% file_path = CollectionsHelper::file_path([dirname, filename]) %>
<% while dirstack.any? and (dirstack.last != dirname) %>
<% dirstack.pop %>
@@ -58,9 +64,7 @@ the entire collection with wget, try:
<% else %>
<%= link_to(filename,
- {controller: 'collections', action: 'show_file',
- uuid: @object.uuid, file: file_path,
- reader_token: params[:reader_token]},
+ link_opts.merge(file: file_path),
{title: "Download #{file_path}"}) %>
<% end %>