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
|
if ArchiveSortOrder.count == 0
|
||||||
ArchiveSortOrder.new('sort_order' => false).save
|
ArchiveSortOrder.new('sort_order' => false).save
|
||||||
end
|
end
|
||||||
if !params['order_asc'].nil?
|
if !(params['order_asc'].nil?)
|
||||||
if params['order_asc'] == 'true'
|
if params['order_asc'] == 'true'
|
||||||
ArchiveSortOrder.first.update_attributes('sort_order' => true)
|
ArchiveSortOrder.first.update_attributes('sort_order' => true)
|
||||||
elsif params['order_asc'] == 'false'
|
elsif params['order_asc'] == 'false'
|
||||||
ArchiveSortOrder.first.update_attributes('sort_order' => false)
|
ArchiveSortOrder.first.update_attributes('sort_order' => false)
|
||||||
end
|
end
|
||||||
else
|
|
||||||
ArchiveSortOrder.first.update_attributes('sort_order' => false)
|
|
||||||
end
|
end
|
||||||
@choose = ArchiveSortOrder.first['sort_order']
|
@choose = ArchiveSortOrder.first['sort_order']
|
||||||
@table_fields = [:status, :category, :title, :updated_at,:last_modified,"archive.downloaded_times"]
|
@table_fields = [:status, :category, :title, :updated_at,:last_modified,"archive.downloaded_times"]
|
||||||
|
|
Loading…
Reference in New Issue