Manage Uploaded Files
Allow alternate sort-orders (by filename, by date). Restrict to files in the given Web.
This commit is contained in:
parent
1d3f7007c6
commit
b74d298196
4 changed files with 28 additions and 14 deletions
|
@ -54,7 +54,16 @@ class WikiController < ApplicationController
|
|||
end
|
||||
|
||||
def file_list
|
||||
@web.file_list
|
||||
sort_order = params['sort_order'] || 'file_name'
|
||||
case sort_order
|
||||
when 'file_name'
|
||||
@alt_sort_order = 'created_at'
|
||||
@alt_sort_name = 'date'
|
||||
else
|
||||
@alt_sort_order = 'file_name'
|
||||
@alt_sort_name = 'filename'
|
||||
end
|
||||
@file_list = @web.file_list(sort_order)
|
||||
end
|
||||
|
||||
def export_html
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue