annotate .svn/pristine/65/65e02704959a4eede1859ab38db94f171c07d983.svn-base @ 1433:cfa80f738847 bibliography_testing

Fixed assertion error message.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Tue, 08 Oct 2013 17:29:47 +0100
parents 038ba2d95de8
children
rev   line source
Chris@1296 1 <div class="contextual">
Chris@1296 2 <%= link_to(l(:label_attachment_new), new_project_file_path(@project), :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @project) %>
Chris@1296 3 </div>
Chris@1296 4
Chris@1296 5 <h2><%=l(:label_attachment_plural)%></h2>
Chris@1296 6
Chris@1296 7 <% delete_allowed = User.current.allowed_to?(:manage_files, @project) %>
Chris@1296 8
Chris@1296 9 <table class="list files">
Chris@1296 10 <thead><tr>
Chris@1296 11 <%= sort_header_tag('filename', :caption => l(:field_filename)) %>
Chris@1296 12 <%= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc') %>
Chris@1296 13 <%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc') %>
Chris@1296 14 <%= sort_header_tag('downloads', :caption => l(:label_downloads_abbr), :default_order => 'desc') %>
Chris@1296 15 <th>MD5</th>
Chris@1296 16 <th></th>
Chris@1296 17 </tr></thead>
Chris@1296 18 <tbody>
Chris@1296 19 <% @containers.each do |container| %>
Chris@1296 20 <% next if container.attachments.empty? -%>
Chris@1296 21 <% if container.is_a?(Version) -%>
Chris@1296 22 <tr>
Chris@1296 23 <th colspan="6" align="left">
Chris@1296 24 <%= link_to(h(container), {:controller => 'versions', :action => 'show', :id => container}, :class => "icon icon-package") %>
Chris@1296 25 </th>
Chris@1296 26 </tr>
Chris@1296 27 <% end -%>
Chris@1296 28 <% container.attachments.each do |file| %>
Chris@1296 29 <tr class="file <%= cycle("odd", "even") %>">
Chris@1296 30 <td class="filename"><%= link_to_attachment file, :download => true, :title => file.description %></td>
Chris@1296 31 <td class="created_on"><%= format_time(file.created_on) %></td>
Chris@1296 32 <td class="filesize"><%= number_to_human_size(file.filesize) %></td>
Chris@1296 33 <td class="downloads"><%= file.downloads %></td>
Chris@1296 34 <td class="digest"><%= file.digest %></td>
Chris@1296 35 <td align="center">
Chris@1296 36 <%= link_to(image_tag('delete.png'), attachment_path(file),
Chris@1296 37 :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
Chris@1296 38 </td>
Chris@1296 39 </tr>
Chris@1296 40 <% end
Chris@1296 41 reset_cycle %>
Chris@1296 42 <% end %>
Chris@1296 43 </tbody>
Chris@1296 44 </table>
Chris@1296 45
Chris@1296 46 <% html_title(l(:label_attachment_plural)) -%>