##// END OF EJS Templates
Make the project files list sortable (#997)....
Jean-Philippe Lang -
r1315:fe74ab8c0644
parent child
Show More
@@ -204,7 +204,10 class ProjectsController < ApplicationController
204 204 end
205 205
206 206 def list_files
207 @versions = @project.versions.sort.reverse
207 sort_init "#{Attachment.table_name}.filename", "asc"
208 sort_update
209 @versions = @project.versions.find(:all, :include => :attachments, :order => sort_clause).sort.reverse
210 render :layout => !request.xhr?
208 211 end
209 212
210 213 # Show changelog for @project
@@ -9,10 +9,10
9 9 <table class="list">
10 10 <thead><tr>
11 11 <th><%=l(:field_version)%></th>
12 <th><%=l(:field_filename)%></th>
13 <th><%=l(:label_date)%></th>
14 <th><%=l(:field_filesize)%></th>
15 <th><%=l(:label_downloads_abbr)%></th>
12 <%= sort_header_tag("#{Attachment.table_name}.filename", :caption => l(:field_filename)) %>
13 <%= sort_header_tag("#{Attachment.table_name}.created_on", :caption => l(:label_date), :default_order => 'desc') %>
14 <%= sort_header_tag("#{Attachment.table_name}.filesize", :caption => l(:field_filesize), :default_order => 'desc') %>
15 <%= sort_header_tag("#{Attachment.table_name}.downloads", :caption => l(:label_downloads_abbr), :default_order => 'desc') %>
16 16 <th>MD5</th>
17 17 <% if delete_allowed %><th></th><% end %>
18 18 </tr></thead>
General Comments 0
You need to be logged in to leave comments. Login now