modqueue: remove posts per page cookie.
This commit is contained in:
@@ -6,19 +6,9 @@ module Moderator
|
||||
skip_before_action :api_check
|
||||
|
||||
def show
|
||||
if search_params[:per_page]
|
||||
cookies.permanent["mq_per_page"] = search_params[:per_page]
|
||||
end
|
||||
|
||||
@posts = ::Post.includes(:appeals, :disapprovals, :uploader, flags: [:creator]).reorder(id: :asc).pending_or_flagged.available_for_moderation(search_params[:hidden]).tag_match(search_params[:tags]).paginate(params[:page], :limit => per_page)
|
||||
@posts = ::Post.includes(:appeals, :disapprovals, :uploader, flags: [:creator]).reorder(id: :asc).pending_or_flagged.available_for_moderation(search_params[:hidden]).tag_match(search_params[:tags]).paginated_search(params, count_pages: true)
|
||||
respond_with(@posts)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def per_page
|
||||
cookies["mq_per_page"] || search_params[:per_page] || 25
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
<%= search_form_for(moderator_post_queue_path) do |f| %>
|
||||
<%= f.input :tags, input_html: { value: params.dig(:search, :tags), "data-autocomplete": "tag-query" } %>
|
||||
<%= f.input :per_page, label: "Posts", collection: %w[25 50 100 200], selected: cookies[:mq_per_page] %>
|
||||
<%= f.submit "Search" %>
|
||||
<% end %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user