From 189495ad597e9b5b167bd47a1ef2b25393e39692 Mon Sep 17 00:00:00 2001 From: radhika Date: Tue, 28 Mar 2017 14:07:42 -0400 Subject: [PATCH] 3821: collection viewed from another object --- .../app/views/collections/_show_files.html.erb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/workbench/app/views/collections/_show_files.html.erb b/apps/workbench/app/views/collections/_show_files.html.erb index 37d9283dbd..b830347cc3 100644 --- a/apps/workbench/app/views/collections/_show_files.html.erb +++ b/apps/workbench/app/views/collections/_show_files.html.erb @@ -27,10 +27,10 @@ 'data-selection-action' => 'combine-collections', 'data-toggle' => 'dropdown' %> - <% if @object.editable? %> + <% if object.editable? %>
  • <%= link_to "Remove selected files", '#', method: :post, - 'data-href' => url_for(action: :remove_selected_files), + 'data-href' => url_for(controller: 'collections', action: :remove_selected_files), 'data-selection-param-name' => 'selection[]', 'data-selection-action' => 'remove-selected-files', 'data-toggle' => 'dropdown' @@ -96,15 +96,15 @@   <% end %> - <% if @object.editable? %> - <%= link_to({action: 'remove_selected_files', id: @object.uuid, selection: [object.portable_data_hash+'/'+file_path]}, method: :post, remote: true, data: {confirm: "Remove #{file_path}?", toggle: 'tooltip', placement: 'top'}, class: 'btn btn-sm btn-default btn-nodecorate', title: "Remove #{file_path}") do %> + <% if object.editable? %> + <%= link_to({controller: 'collections', action: 'remove_selected_files', id: object.uuid, selection: [object.portable_data_hash+'/'+file_path]}, method: :post, remote: true, data: {confirm: "Remove #{file_path}?", toggle: 'tooltip', placement: 'top'}, class: 'btn btn-sm btn-default btn-nodecorate', title: "Remove #{file_path}") do %> <% end %> <% end %> <% if CollectionsHelper::is_image(filename) %> - <% if @object.editable? %> - <%= render_editable_attribute @object, 'filename', filename, {'data-value' => file_path, 'data-toggle' => 'manual', 'selection_path' => 'rename-file-path:'+file_path} %> + <% if object.editable? %> + <%= render_editable_attribute object, 'filename', filename, {'data-value' => file_path, 'data-toggle' => 'manual', 'selection_path' => 'rename-file-path:'+file_path} %> <% else %> <%= filename %> <% end %> @@ -116,8 +116,8 @@ <% else %> - <% if @object.editable? %> - <%= render_editable_attribute @object, 'filename', filename, {'data-value' => file_path, 'data-toggle' => 'manual', 'selection_name' => 'rename-file-path:'+file_path} %> + <% if object.editable? %> + <%= render_editable_attribute object, 'filename', filename, {'data-value' => file_path, 'data-toggle' => 'manual', 'selection_name' => 'rename-file-path:'+file_path} %> <% else %> <%= filename %> <% end %> -- 2.30.2