Add PreferenceSmartListingPage table and implement the usage

This commit is contained in:
Xavier J 2016-10-11 15:37:16 +02:00
parent 02000eeb41
commit 64d46a25df
8 changed files with 105 additions and 1 deletions

View file

@ -31,6 +31,14 @@ class Backoffice::DossiersListController < ApplicationController
dossiers_list_facade liste
dossiers_list = dossiers_list_facade.dossiers_to_display if dossiers_list.nil?
if params[:dossiers_smart_listing].nil? || params[:dossiers_smart_listing][:page].nil?
pref = current_gestionnaire.preference_smart_listing_page
if pref.liste == liste && pref.procedure_id == dossiers_list_facade.procedure_id
params[:dossiers_smart_listing] = {page: pref.page.to_s}
end
end
@dossiers = smart_listing_create :dossiers,
dossiers_list,
partial: "backoffice/dossiers/list",