On affiche que le message de comptage sur la page index/index

This commit is contained in:
Michael RICOIS 2012-01-05 16:27:24 +00:00
parent 6190ffc77d
commit ef82747590
2 changed files with 12 additions and 6 deletions

View File

@ -13,6 +13,7 @@
</div>
<div id="message">
<?php if ($this->msgComptage){?>
<div id="comptage" >
<?php if (!empty($this->total)) {?>
Nombre sélectionnées :
@ -29,4 +30,5 @@
[<a href="<?=$this->url(array('controller'=>'index', 'action'=> 'reset'))?>">Initialiser les critères</a>],
[<a id="saveciblage" href="<?=$this->url(array('controller'=>'comptage', 'action'=>'savedialog'))?>">Sauvegarder le profil du ciblage</a>]
</div>
<?php }?>
</div>

View File

@ -7,11 +7,15 @@ class Application_Controller_Plugin_Comptage extends Zend_Controller_Plugin_Abst
if ($layout->isEnabled()) {
$controller = $this->_request->getControllerName();
$action = $this->_request->getActionName();
if ($controller == 'index' && $action == 'index') {
require_once 'Scores/SessionCiblage.php';
$session = new SessionCiblage();
$view = $layout->getView();
$view->total = number_format($session->getNb('total'), 0, '', ' ');
$view->insee = number_format($session->getNb('insee'), 0, '', ' ');
$view->msgComptage = true;
}
}
}
}