Add pagination on dossiers list

This commit is contained in:
Mathieu Magnin 2017-09-21 16:47:43 +02:00
parent 47db8f9c7d
commit 2737a8d529
2 changed files with 3 additions and 0 deletions

View file

@ -63,6 +63,8 @@ module NewGestionnaire
when 'archives' when 'archives'
@archived_dossiers @archived_dossiers
end end
@dossiers = @dossiers.page([params[:page].to_i, 1].max)
end end
private private

View file

@ -73,5 +73,6 @@
= link_to(dossier_path(@procedure, dossier), class: 'cell-link') do = link_to(dossier_path(@procedure, dossier), class: 'cell-link') do
= render partial: 'status', locals: { dossier: dossier } = render partial: 'status', locals: { dossier: dossier }
%td.follow-col= render partial: 'dossier_actions', locals: { procedure: @procedure, dossier: dossier, dossier_is_followed: @followed_dossiers_id.include?(dossier.id) } %td.follow-col= render partial: 'dossier_actions', locals: { procedure: @procedure, dossier: dossier, dossier_is_followed: @followed_dossiers_id.include?(dossier.id) }
= paginate @dossiers
- else - else
%h2.empty-text Aucun dossier %h2.empty-text Aucun dossier