From 7aff46a6515cfb7531eaad04495430b0487d8375 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Mon, 13 Jan 2014 11:49:06 -0500 Subject: [PATCH] Reworked Files tab of collection view a bit. --- .../app/views/collections/show.html.erb | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/apps/workbench/app/views/collections/show.html.erb b/apps/workbench/app/views/collections/show.html.erb index d525c7804c..057ced89fd 100644 --- a/apps/workbench/app/views/collections/show.html.erb +++ b/apps/workbench/app/views/collections/show.html.erb @@ -32,9 +32,13 @@ size -
path + + file + + + <% if @object then @object.files.sort_by{|f|f[1]}.each do |file| %> @@ -42,14 +46,17 @@ <%= raw(human_readable_bytes_html(file[2])) %> - -
+ + + <%= file[0] %> + + + <%= link_to file[1], {controller: 'collections', action: 'show_file', uuid: @object.uuid, file: file_path, size: file[2], disposition: 'inline'}, {title: 'View in browser'} %> + + +
<%= link_to raw(''), {controller: 'collections', action: 'show_file', uuid: @object.uuid, file: file_path, size: file[2], disposition: 'attachment'}, {class: 'label label-info', title: 'Download'} %> - <% if file_path.match /\.(txt|pdf|png|jpe?g|gif|tiff?|html?)$/i %> - <%= link_to raw(''), {controller: 'collections', action: 'show_file', uuid: @object.uuid, file: file_path, size: file[2], disposition: 'inline'}, {class: 'label label-info', title: 'View in browser'} %> - <% end %>
- <%= file_path %> <% end; end %> -- 2.30.2