X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/90af4cd87e9525481bd0bc8120a18ebc27c9a459..0eb72b526bf8bbb011551ecf019f604e17a534f1:/apps/workbench/app/views/collections/_show_files.html.erb diff --git a/apps/workbench/app/views/collections/_show_files.html.erb b/apps/workbench/app/views/collections/_show_files.html.erb index 383ec64c0a..96ddf95b3c 100644 --- a/apps/workbench/app/views/collections/_show_files.html.erb +++ b/apps/workbench/app/views/collections/_show_files.html.erb @@ -1,12 +1,6 @@ - +SPDX-License-Identifier: AGPL-3.0 %> <% preview_selectable_container = '' @@ -19,6 +13,8 @@ function unselect_all_files() { end %> +<% object = @object unless object %> +
<% if Collection.creatable? and (!defined? no_checkboxes or !no_checkboxes) %>
@@ -29,17 +25,27 @@ 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', 'data-toggle' => 'dropdown' %>
  • + <% if object.editable? %> +
  • <%= link_to "Remove selected files", '#', + method: :post, + 'data-href' => url_for(controller: 'collections', action: :remove_selected_files), + 'data-selection-param-name' => 'selection[]', + 'data-selection-action' => 'remove-selected-files', + 'data-toggle' => 'dropdown', + 'class' => 'btn-remove-selected-files' + %>
  • + <% end %>
    - - + +
    @@ -49,11 +55,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 %> -
    + <% if object.editable? %> + <%= render_editable_attribute object, 'filename', filename, {'data-value' => file_path, 'data-toggle' => 'manual', 'selection_name' => 'rename-file-path:'+file_path}, {tiptitle: 'Edit name or directory or both for this file', btnclass: 'collection-file-control'} %> + + <% else %> + <%= filename %> + <% end %> + <% end %>