X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6d59f29ba37c608e4b01b27a2fa78bc065fdc2a6..b7f67c80916c2efa0c234ab5f4e92c24d47223c5:/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 15daaf7e2d..051fbf4f62 100644 --- a/apps/workbench/app/views/collections/_show_files.html.erb +++ b/apps/workbench/app/views/collections/_show_files.html.erb @@ -1,64 +1,91 @@ -<% content_for :css do %> -.file-list-inline-image { - width: 50%; - height: auto; -} -<% end %> +
- | path | -file | -size | -d/l | -
---|---|---|---|---|
- <% fp2 = file_path[2..-1] if file_path[0..1] == './' %> - <% fp2 ||= file_path %> -<%= check_box_tag 'uuids[]', @object.uuid+file_path, false, { - :class => 'persistent-selection', - :friendly_type => "File", - :friendly_name => "#{@object.uuid}/#{fp2}", - :href => "#{url_for controller: 'collections', action: 'show', id: @object.uuid }/#{file_path}" - } %> - | -- <%= file[0] %> - | +<% file_tree = @object.andand.files_tree %> +<% if file_tree.nil? or file_tree.empty? %> +- <%= link_to((if /\.(jpg|jpeg|gif|png|svg)$/i.match(file[1]) then - image_tag "#{url_for @object}/#{file_path}", class: "file-list-inline-image" - else - file[1] - end), - {controller: 'collections', action: 'show_file', uuid: @object.uuid, file: file_path, size: file[2], disposition: 'inline'}, - {title: file_path}) %> - | +- <%= raw(human_readable_bytes_html(file[2])) %> - | +<% content_for :footer_html do %> + +<% end %> -
-
- <%= link_to raw(''), {controller: 'collections', action: 'show_file', uuid: @object.uuid, file: file_path, size: file[2], disposition: 'attachment'}, {class: 'btn btn-info btn-sm', title: 'Download'} %>
-
- |
-