From fd6f110210e386194f79f8a0a3987a2dd8521421 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Sun, 25 Apr 2021 21:32:22 +0200 Subject: [PATCH] do not calculate pagination twice --- app/views/instructeurs/procedures/show.html.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/instructeurs/procedures/show.html.haml b/app/views/instructeurs/procedures/show.html.haml index 2f4e0bb92..f440ba5a7 100644 --- a/app/views/instructeurs/procedures/show.html.haml +++ b/app/views/instructeurs/procedures/show.html.haml @@ -76,7 +76,8 @@ Afficher les dossiers supprimés - if @filtered_sorted_paginated_ids.present? || @current_filters.count > 0 - = paginate @filtered_sorted_paginated_ids + - pagination = paginate @filtered_sorted_paginated_ids + = pagination %span.dropdown %button.button.dropdown-button{ 'aria-expanded' => 'false', 'aria-controls' => 'filter-menu' } Filtrer @@ -151,6 +152,6 @@ %a.cell-link{ href: path }= status_badge(dossier.state) %td.action-col.follow-col= render partial: 'dossier_actions', locals: { procedure: @procedure, dossier: dossier, dossier_is_followed: @followed_dossiers_id.include?(dossier.id) } - = paginate @filtered_sorted_paginated_ids + = pagination - else %h2.empty-text Aucun dossier