projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
11185: Addressed several requests:
[arvados.git]
/
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 de012c7bc91fb57f9f5894d7dd2074d05dc04e65..a829d8f274d211d617c83e4f29cd095fbc369e39 100644
(file)
--- a/
apps/workbench/app/views/collections/show_file_links.html.erb
+++ b/
apps/workbench/app/views/collections/show_file_links.html.erb
@@
-1,6
+1,6
@@
<!DOCTYPE html>
<html>
<!DOCTYPE html>
<html>
-<% coll_name =
(@object.name =~ /\S/) ? @object.name :
"Collection #{@object.uuid}" %>
+<% coll_name = "Collection #{@object.uuid}" %>
<% link_opts = {controller: 'collections', action: 'show_file',
uuid: @object.uuid, reader_token: params[:reader_token]} %>
<head>
<% link_opts = {controller: 'collections', action: 'show_file',
uuid: @object.uuid, reader_token: params[:reader_token]} %>
<head>
@@
-38,15
+38,17
@@
Arvados. You can download individual files listed below. To download
the entire collection with wget, try:</p>
<pre>$ wget --mirror --no-parent --no-host --cut-dirs=3 <%=
the entire collection with wget, try:</p>
<pre>$ 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))
%></pre>
<h2>File Listing</h2>
%></pre>
<h2>File Listing</h2>
-<% if @object.andand.files_tree.andand.any? %>
+<% file_tree = @object.andand.files_tree %>
+<% if file_tree.andand.any? %>
<ul id="collection_files" class="collection_files">
<ul id="collection_files" class="collection_files">
- <% 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 %></ul></li>
<% file_path = CollectionsHelper::file_path([dirname, filename]) %>
<% while dirstack.any? and (dirstack.last != dirname) %>
<% dirstack.pop %></ul></li>
@@
-58,9
+60,7
@@
the entire collection with wget, try:</p>
<ul class="collection_files">
<% else %>
<%= link_to(filename,
<ul class="collection_files">
<% 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}"}) %>
</li>
<% end %>
{title: "Download #{file_path}"}) %>
</li>
<% end %>