Archived
gallery versioning added.. and also the models changed for gallery now more R4 compatible. urls for gallery working fine now..
This commit is contained in:
1 parent
16b695200a
commit
91d5ab6352
13 files changed
+55
-54
No files matched your search
@@ -238,7 +238,7 @@ class ApplicationController < ActionController::Base
|
||||
redirect_to ret
|
||||
end
|
||||
|
||||
def get_sorted_and_filtered(object_class, query = nil, objects = nil)
|
||||
def get_sorted_and_filtered(object_class, query = nil, objects = nil, pagination = true)
|
||||
if params[:filter] || params[:sort] || params[:new_filter]
|
||||
@filter = params[:filter]
|
||||
new_filter = params[:new_filter]
|
||||
@@ -345,7 +345,12 @@ class ApplicationController < ActionController::Base
|
||||
if (!user_signed_in? && object_class == "bulletin")
|
||||
objects = get_bulletins_for_open_backend(objects)
|
||||
end
|
||||
Kaminari.paginate_array(filter_authorized_objects(objects)).page(params[:page]).per(10)
|
||||
|
||||
if pagination
|
||||
Kaminari.paginate_array(filter_authorized_objects(objects)).page(params[:page]).per(10)
|
||||
else
|
||||
filter_authorized_objects(objects)
|
||||
end
|
||||
end
|
||||
|
||||
def get_bulletins_for_open_backend(objects)
|
||||
|
||||
Reference in new issue
Block a user