Pagination improvements (#1445)
* Replace will_paginate with kaminari * Use #page instead of #paginate in controllers * Replace will_paginate.page_gap with pagination.truncate in i18n * Customize kaminari views to match prior styles * Set kaminari options to match prior behavior * Replace will_paginate with paginate in views
This commit is contained in:
parent
a283786463
commit
4ada50985a
36 changed files with 77 additions and 65 deletions
|
@ -5,7 +5,7 @@ module Admin
|
|||
before_action :set_account, except: :index
|
||||
|
||||
def index
|
||||
@accounts = Account.alphabetic.paginate(page: params[:page], per_page: 40)
|
||||
@accounts = Account.alphabetic.page(params[:page])
|
||||
|
||||
@accounts = @accounts.local if params[:local].present?
|
||||
@accounts = @accounts.remote if params[:remote].present?
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
module Admin
|
||||
class DomainBlocksController < BaseController
|
||||
def index
|
||||
@blocks = DomainBlock.paginate(page: params[:page], per_page: 40)
|
||||
@blocks = DomainBlock.page(params[:page])
|
||||
end
|
||||
|
||||
def new
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
module Admin
|
||||
class PubsubhubbubController < BaseController
|
||||
def index
|
||||
@subscriptions = Subscription.order('id desc').includes(:account).paginate(page: params[:page], per_page: 40)
|
||||
@subscriptions = Subscription.order('id desc').includes(:account).page(params[:page])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,7 +5,7 @@ module Admin
|
|||
before_action :set_report, except: [:index]
|
||||
|
||||
def index
|
||||
@reports = Report.includes(:account, :target_account).order('id desc').paginate(page: params[:page], per_page: 40)
|
||||
@reports = Report.includes(:account, :target_account).order('id desc').page(params[:page])
|
||||
@reports = params[:action_taken].present? ? @reports.resolved : @reports.unresolved
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue