Update archive_files_controller.rb
This commit is contained in:
parent
432fda7f78
commit
2068cd41ef
|
@ -3,14 +3,12 @@ class Admin::ArchiveFilesController < OrbitAdminController
|
|||
if ArchiveSortOrder.count == 0
|
||||
ArchiveSortOrder.new('sort_order' => false).save
|
||||
end
|
||||
if !params['order_asc'].nil?
|
||||
if !(params['order_asc'].nil?)
|
||||
if params['order_asc'] == 'true'
|
||||
ArchiveSortOrder.first.update_attributes('sort_order' => true)
|
||||
elsif params['order_asc'] == 'false'
|
||||
ArchiveSortOrder.first.update_attributes('sort_order' => false)
|
||||
end
|
||||
else
|
||||
ArchiveSortOrder.first.update_attributes('sort_order' => false)
|
||||
end
|
||||
@choose = ArchiveSortOrder.first['sort_order']
|
||||
@table_fields = [:status, :category, :title, :updated_at,:last_modified,"archive.downloaded_times"]
|
||||
|
|
Loading…
Reference in New Issue