Update archives_controller.rb
This commit is contained in:
parent
afe7d44fae
commit
925d25d124
|
@ -6,10 +6,11 @@ class ArchivesController < ApplicationController
|
|||
ArchiveSortOrder.new('sort_order' => false).save
|
||||
end
|
||||
params = OrbitHelper.params
|
||||
all_categories_id = get_all_categories_id_sorted
|
||||
puts all_categories_id
|
||||
if !params['title'].nil?
|
||||
files_by_cateogry = ArchiveFile.where(is_hidden: false).group_by(&:category)
|
||||
categories = files_by_cateogry.keys
|
||||
all_categories_id = get_all_categories_id_sorted
|
||||
categories_sort = categories.select{|category| all_categories_id.include? category.id.to_s}
|
||||
cats_last = []
|
||||
categories_sort.each do |category|
|
||||
|
@ -70,7 +71,6 @@ class ArchivesController < ApplicationController
|
|||
files_by_cateogry = ArchiveFile.where(is_hidden: false).filter_by_categories.filter_by_tags.group_by(&:category)
|
||||
each_data_count = []
|
||||
categories = files_by_cateogry.keys
|
||||
all_categories_id = get_all_categories_id_sorted
|
||||
categories_sort = categories.select{|category| all_categories_id.include? category.id.to_s}
|
||||
cats = categories_sort.collect do |category|
|
||||
url_to_edit = OrbitHelper.user_has_cateogry?(category) ? "/admin/archive_files?filters[category][]=#{category.id.to_s}" : ""
|
||||
|
|
Loading…
Reference in New Issue