diff --git a/application/modules/default/controllers/SurveillanceController.php b/application/modules/default/controllers/SurveillanceController.php index 1eeb847a0..20963e00d 100644 --- a/application/modules/default/controllers/SurveillanceController.php +++ b/application/modules/default/controllers/SurveillanceController.php @@ -118,6 +118,7 @@ class SurveillanceController extends Zend_Controller_Action $page = $request->getParam('page'); $from = $request->getParam('from'); + $q = $request->getParam('q'); $siret = $request->getParam('siret', ''); $email = $request->getParam('email', ''); @@ -136,6 +137,8 @@ class SurveillanceController extends Zend_Controller_Action } } elseif (isset($page)) { $this->redirect('surveillance/liste/page/'.$page); + } elseif (isset($q)) { + $this->redirect('surveillance/liste/q/'.$q); } else { $this->redirect('surveillance/liste'); } @@ -424,8 +427,8 @@ class SurveillanceController extends Zend_Controller_Action $pageTotal = $pageCurrent = 1; } $this->view->assign('PageTotal', $pageTotal); - $this->view->assign('PagePrev', $pagePrev); - $this->view->assign('PageNext', $pageNext); + $this->view->assign('PagePrev', isset($pagePrev)?$pagePrev:1); + $this->view->assign('PageNext', isset($pageNext)?$pageNext:1); $this->view->assign('PageCurrent', $pageCurrent); $this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses); diff --git a/application/modules/default/views/default/scripts/surveillance/liste.phtml b/application/modules/default/views/default/scripts/surveillance/liste.phtml index 65a9a8c76..dca262ac1 100644 --- a/application/modules/default/views/default/scripts/surveillance/liste.phtml +++ b/application/modules/default/views/default/scripts/surveillance/liste.phtml @@ -152,7 +152,8 @@ par 'siret' => $item['siren'].$item['nic'], 'ref' => urlencode($surveillance['ref']), 'email' => $surveillance['email'], - 'source' => $surveillance['source'] + 'source' => $surveillance['source'], + 'q' => $this->q, ))?>" title="Supprimer la surveillance ">