X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/10d3f91d4b5619172dd5d8fbf3e8aa863b673e2f..61dbc4445159c9140b0744bf5526ce0f71f4f374:/apps/workbench/app/views/collections/_show_files.html.erb?ds=sidebyside
diff --git a/apps/workbench/app/views/collections/_show_files.html.erb b/apps/workbench/app/views/collections/_show_files.html.erb
index 8dcef33bf2..a21a514c47 100644
--- a/apps/workbench/app/views/collections/_show_files.html.erb
+++ b/apps/workbench/app/views/collections/_show_files.html.erb
@@ -1,13 +1,3 @@
-
-
<%
preview_selectable_container = ''
preview_selectable = ''
@@ -19,6 +9,8 @@ function unselect_all_files() {
end
%>
+<% object = @object unless object %>
+
<% if Collection.creatable? and (!defined? no_checkboxes or !no_checkboxes) %>
@@ -29,7 +21,7 @@ function unselect_all_files() {
<%= link_to "Create new collection with selected files", '#',
method: :post,
'data-href' => combine_selected_path(
- action_data: {current_project_uuid: @object.owner_uuid}.to_json
+ action_data: {current_project_uuid: object.owner_uuid}.to_json
),
'data-selection-param-name' => 'selection[]',
'data-selection-action' => 'combine-collections',
@@ -38,8 +30,8 @@ function unselect_all_files() {
-
-
+
+
@@ -49,11 +41,11 @@ function unselect_all_files() {
<% end %>
- <% file_tree = @object.andand.files_tree %>
+ <% file_tree = object.andand.files_tree %>
<% if file_tree.nil? or file_tree.empty? %>
This collection is empty.
<% else %>
-
+
<% dirstack = [file_tree.first.first] %>
<% file_tree.take(10000).each_with_index do |(dirname, filename, size), index| %>
<% file_path = CollectionsHelper::file_path([dirname, filename]) %>
@@ -69,8 +61,8 @@ function unselect_all_files() {
<% end %>