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
|
@ -47,8 +47,8 @@ class Web < ActiveRecord::Base
|
|||
WikiFile.find_by_file_name(file_name) != nil
|
||||
end
|
||||
|
||||
def file_list
|
||||
WikiFile.find(:all, :order => 'file_name')
|
||||
def file_list(sort_order = 'file_name')
|
||||
WikiFile.all(:order => sort_order, :conditions => ['web_id = ?', id])
|
||||
end
|
||||
|
||||
def description(file_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue