- <% if @object then @object.files.sort_by{|f|f[1]}.each do |file| %>
- <% file_path = "#{file[0]}/#{file[1]}" %>
- <tr>
- <td>
- <%= file[0] %>
- </td>
+ <% if @object then @object.files.sort_by{|f|[f[0],f[1]]}.each do |file| %>
+ <% file_path = CollectionsHelper::file_path file %>
+ <tr>
+ <td>
+ <%= check_box_tag 'uuids[]', @object.uuid+'/'+file_path, false, {
+ :class => 'persistent-selection',
+ :friendly_type => "File",
+ :friendly_name => "#{@object.uuid}/#{file_path}",
+ :href => "#{url_for controller: 'collections', action: 'show', id: @object.uuid }/#{file_path}",
+ :title => "Click to add this item to your selection list"
+ } %>
+ </td>
+ <td>
+ <%= file[0] %>
+ </td>