diff --git a/app/controllers/admin/communication/website/posts_controller.rb b/app/controllers/admin/communication/website/posts_controller.rb index f8c2cad42663fc419dcda29e3d5e2acd0982a646..ed0dc79e12d090a29aa9ff9f47497aefc9fff1b8 100644 --- a/app/controllers/admin/communication/website/posts_controller.rb +++ b/app/controllers/admin/communication/website/posts_controller.rb @@ -12,9 +12,9 @@ class Admin::Communication::Website::PostsController < Admin::Communication::Web def index @posts = apply_scopes(@posts).ordered.page params[:page] - @authors = apply_scopes(@website.authors.accessible_by(current_ability)) + @authors = @website.authors.accessible_by(current_ability) .ordered - .page(params[:page]) + .page(params[:authors_page]) @root_categories = @website.categories.root.ordered breadcrumb end diff --git a/app/views/admin/communication/website/posts/index.html.erb b/app/views/admin/communication/website/posts/index.html.erb index 5688ab1246448d9cb21c061ef28b70d5c14869bb..bdfc24a223644721d5a01920b125e29d7c7fa7f1 100644 --- a/app/views/admin/communication/website/posts/index.html.erb +++ b/app/views/admin/communication/website/posts/index.html.erb @@ -57,6 +57,11 @@ <h2 class="card-title"><%= t('communication.authors', count: 2) %></h2> </div> <%= render 'admin/communication/website/authors/list', authors: @authors %> + <% if @authors.total_pages > 1 %> + <div class="card-footer"> + <%= paginate @authors, theme: 'bootstrap-5', param_name: :authors_page %> + </div> + <% end %> </div> </div> </div>