Merge pull request #7322 from betagouv/fix/search-pagination-rendered-in-loop

fix(recherche#index): move paginate outside of table row loop
This commit is contained in:
mfo 2022-05-16 16:02:59 +02:00 committed by GitHub
commit dac94546e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,13 +1,12 @@
- content_for(:title, "Recherche : #{@search_terms}")
- pagination = paginate @paginated_ids
.container
.page-title
Résultat de la recherche :
= t('pluralize.dossier_trouve', count: @dossiers_count)
= pagination
- if @projected_dossiers.present?
= paginate @paginated_ids
%table.table.dossiers-table.hoverable
%thead
%tr
@ -97,8 +96,7 @@
- else
%td
= pagination
= paginate @paginated_ids
- else
%h2 Aucun dossier correspondant à votre recherche na été trouvé