From b216d3e6da77bbf50a31bca082e70e6e820aec5c Mon Sep 17 00:00:00 2001 From: Paul Bob <69730720+Paul-Bob@users.noreply.github.com> Date: Thu, 16 Nov 2023 10:19:14 +0200 Subject: [PATCH] feature: countless pagination (#1998) * feature: countless pagination * i18n-tasks normalize * refactor * spec * fix paginator render condition * refactor * tweak * fix bug * uncomment spec * pagination_type refactor * extract apply_pagination from index * normal => default * fr translations by @jetienne --- .../index/resource_table_component.html.erb | 4 +- .../avo/index/resource_table_component.rb | 16 +++ .../avo/paginator_component.html.erb | 69 +++++------ app/components/avo/paginator_component.rb | 18 +++ app/controllers/avo/application_controller.rb | 1 - app/controllers/avo/base_controller.rb | 13 +- config/initializers/pagy.rb | 1 + lib/avo/base_resource.rb | 1 + lib/avo/concerns/pagination.rb | 53 ++++++++ .../avo/templates/locales/avo.en.yml | 2 + .../avo/templates/locales/avo.fr.yml | 2 + .../avo/templates/locales/avo.pt-BR.yml | 2 + .../avo/templates/locales/avo.pt.yml | 2 + .../avo/templates/locales/avo.ro.yml | 2 + spec/system/avo/select_all_spec.rb | 117 ++++++++++++------ 15 files changed, 217 insertions(+), 86 deletions(-) create mode 100644 lib/avo/concerns/pagination.rb diff --git a/app/components/avo/index/resource_table_component.html.erb b/app/components/avo/index/resource_table_component.html.erb index e687e3e1d0..327acfd9d1 100644 --- a/app/components/avo/index/resource_table_component.html.erb +++ b/app/components/avo/index/resource_table_component.html.erb @@ -11,7 +11,7 @@