[ARVADOS] updated: afbb0d02263fcfada3e8bb22870e94ae3faf9ceb

git at public.curoverse.com git at public.curoverse.com
Wed May 21 13:29:46 EDT 2014


Summary of changes:
 .../app/assets/stylesheets/collections.css.scss    |  46 +++++++++
 .../app/controllers/collections_controller.rb      |   7 +-
 apps/workbench/app/helpers/application_helper.rb   |   1 +
 apps/workbench/app/models/collection.rb            |  21 ++++
 .../app/views/collections/_show_files.html.erb     | 111 ++++++++++-----------
 .../app/views/collections/show_file_links.html.erb |  29 ++++--
 apps/workbench/test/unit/collection_test.rb        |  27 +++++
 .../test/unit/helpers/collections_helper_test.rb   |   8 ++
 services/api/test/fixtures/collections.yml         |  21 ++++
 services/keep/src/keep/keep.go                     |   5 +
 10 files changed, 205 insertions(+), 71 deletions(-)

       via  afbb0d02263fcfada3e8bb22870e94ae3faf9ceb (commit)
       via  b447941494f067a67c6898aff824e64216e43037 (commit)
       via  c6ebe2b48b0f1f655af4c170675049725c0c1c13 (commit)
       via  e1d71c83e17ba6d06e2442ed775f7efd4ea32d84 (commit)
       via  735a268880783acc77a2b99a5ac32c819c154ad9 (commit)
       via  46e29d7fbf2628a01cb31ff7117732293129fd65 (commit)
       via  ea4b289bea3baebde1d23bbf38ded4e8da7ff298 (commit)
       via  8cc0ba260202de5627af49691d259928ad7ffcc6 (commit)
       via  43f38dbf96127a4036be5e8b01f9e82d825ad949 (commit)
       via  4b6ae0c2b418fd3192b8248b3e8a614502c47060 (commit)
       via  e5b3a58e1106fe71d781995560f8b197dbaecbca (commit)
       via  e817beda3c9aefd99b1ce9b9c77cd2f346e14a01 (commit)
       via  fc16a366bf1061bfc2dc08ab1477c7febf8c3c5a (commit)
       via  9a86712b5b6ca3490739e5b75d809be4c853e9a3 (commit)
      from  0274800af0b90207c64b6982a5b78384c9f04bf5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit afbb0d02263fcfada3e8bb22870e94ae3faf9ceb
Author: Brett Smith <brett at curoverse.com>
Date:   Wed May 21 13:30:15 2014 -0400

    2764: Display Collection download files as a tree.

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 efc1d01..32119ba 100644
--- a/apps/workbench/app/views/collections/show_file_links.html.erb
+++ b/apps/workbench/app/views/collections/show_file_links.html.erb
@@ -37,14 +37,29 @@ the entire collection with wget, try:</p>
 
 <h2>File Listing</h2>
 
-<% if @object.andand.files.andand.any? %>
-  <ul>
-  <% @object.files.map { |spec|
-       CollectionsHelper::file_path(spec)
-     }.each do |path| %>
-    <li><%= link_to(path, link_opts.merge(file: path)) %></li>
+<% if @object.andand.files_tree.andand.any? %>
+  <ul id="collection_files" class="collection_files">
+  <% dirstack = [@object.files_tree.first.first] %>
+  <% @object.files_tree.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>
+    <% end %>
+    <li>
+    <% if size.nil?  # This is a subdirectory. %>
+      <% dirstack.push(File.join(dirname, filename)) %>
+      <%= 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]},
+                  {title: "Download #{file_path}"}) %>
+      </li>
+    <% end %>
   <% end %>
-  </ul>
+  <%= raw(dirstack.map { |_| "</ul>" }.join("</li>")) %>
 <% else %>
   <p>No files in this collection.</p>
 <% end %>

commit b447941494f067a67c6898aff824e64216e43037
Author: Brett Smith <brett at curoverse.com>
Date:   Wed May 21 13:30:05 2014 -0400

    2753: Properly close entire Collection file tree in Workbench.

diff --git a/apps/workbench/app/views/collections/_show_files.html.erb b/apps/workbench/app/views/collections/_show_files.html.erb
index 38c5d00..c5c1279 100644
--- a/apps/workbench/app/views/collections/_show_files.html.erb
+++ b/apps/workbench/app/views/collections/_show_files.html.erb
@@ -64,5 +64,5 @@
       </li>
     <% end  # if file or directory %>
   <% end  # file_tree.each %>
-  </ul>
+  <%= raw(dirstack.map { |_| "</ul>" }.join("</li>")) %>
 <% end  # if file_tree %>

commit c6ebe2b48b0f1f655af4c170675049725c0c1c13
Merge: 0274800 e1d71c8
Author: Brett Smith <brett at curoverse.com>
Date:   Wed May 21 13:15:12 2014 -0400

    Merge branch 'master' into 2764-wget-collections-wip


-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list