X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a94e15cab04a19dcbb02f2e95335e337c8e55036..9816d2cf5f88d19e4e492c1e965874e5a5b3055c:/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..26e71c8d5d 100644
--- a/apps/workbench/app/views/collections/_show_files.html.erb
+++ b/apps/workbench/app/views/collections/_show_files.html.erb
@@ -73,17 +73,16 @@ function unselect_all_files() {
<%= raw(human_readable_bytes_html(size)) %>
- <% disable_search = (Rails.configuration.filename_suffixes_with_view_icon.include? file_path.split('.')[-1]) ? false : true %>
<%= link_to(raw(''),
link_params.merge(disposition: 'inline'),
- {title: "View #{file_path}", class: "btn btn-info btn-sm", disabled: disable_search}) %>
+ {title: "View #{file_path}", class: "btn btn-info btn-sm", disabled: !preview_allowed_for(file_path)}) %>
<%= link_to(raw(''),
link_params.merge(disposition: 'attachment'),
{title: "Download #{file_path}", class: "btn btn-info btn-sm"}) %>
- <% if !defined? no_checkboxes or !no_checkboxes %>
+ <% if (!defined? no_checkboxes or !no_checkboxes) and current_user %>
<%= check_box_tag 'uuids[]', "#{@object.uuid}/#{file_path}", false, {
:class => "persistent-selection",
:friendly_type => "File",
@@ -91,6 +90,7 @@ function unselect_all_files() {
:href => url_for(controller: 'collections', action: 'show_file',
uuid: @object.portable_data_hash, file: file_path),
:title => "Include #{file_path} in your selections",
+ :id => "#{@object.uuid}_file_#{index}",
} %>
<% end %>