From a9619cd9d563b5c434da6a11566517cacb410124 Mon Sep 17 00:00:00 2001 From: radhika Date: Thu, 11 Sep 2014 16:18:07 -0400 Subject: [PATCH] 3654: move the checkbox to the left of the row in collection show page. also, fixed a bug where the newly added selection dropdown shows up in the collection file chooser popup. --- .../views/collections/_show_files.html.erb | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/apps/workbench/app/views/collections/_show_files.html.erb b/apps/workbench/app/views/collections/_show_files.html.erb index 38c86e1d4a..020f16dd5a 100644 --- a/apps/workbench/app/views/collections/_show_files.html.erb +++ b/apps/workbench/app/views/collections/_show_files.html.erb @@ -1,4 +1,5 @@
+ <% if !defined? no_checkboxes or !no_checkboxes %>
@@ -16,6 +17,7 @@

+ <% end %> <% file_tree = @object.andand.files_tree %> <% if file_tree.nil? or file_tree.empty? %> @@ -41,17 +43,6 @@

<%= raw(human_readable_bytes_html(size)) %> - <% if !defined? no_checkboxes or !no_checkboxes %> - <%= check_box_tag 'uuids[]', "#{@object.uuid}/#{file_path}", false, { - :class => 'persistent-selection', - :friendly_type => "File", - :friendly_name => "#{@object.uuid}/#{file_path}", - :href => url_for(controller: 'collections', action: 'show_file', - uuid: @object.portable_data_hash, file: file_path), - :title => "Include #{file_path} in your selections", - } %> - <% end %> - <% if Rails.configuration.filename_suffixes_with_view_icon.include? file_path.split('.')[-1] %> <%= link_to(raw(''), link_params.merge(disposition: 'inline'), @@ -62,8 +53,20 @@ link_params.merge(disposition: 'attachment'), {title: "Download #{file_path}", class: "btn btn-info btn-sm"}) %>
+ +
+ <% if !defined? no_checkboxes or !no_checkboxes %> + <%= check_box_tag 'uuids[]', "#{@object.uuid}/#{file_path}", false, { + :class => 'persistent-selection', + :friendly_type => "File", + :friendly_name => "#{@object.uuid}/#{file_path}", + :href => url_for(controller: 'collections', action: 'show_file', + uuid: @object.portable_data_hash, file: file_path), + :title => "Include #{file_path} in your selections", + } %> + <% end %> <% if CollectionsHelper::is_image(filename) %> -
<%= filename %>
+ <%= filename %>
<%= link_to(image_tag("#{url_for @object}/#{file_path}"), @@ -71,7 +74,7 @@ {title: file_path}) %>
<% else %> -
<%= filename %>
+ <%= filename %>
<% end %> -- 2.30.2