Ne délivrer que les procoll sur cpcambr13, issue #0001049
This commit is contained in:
parent
2200a7ba6d
commit
c33fd0d6c5
@ -702,6 +702,20 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
//Lister les annonces
|
||||
elseif (empty($getCSV))
|
||||
{
|
||||
$selectFiltre = array(
|
||||
'procol' => array('lib'=> 'Procédures collectives', 'select'=>''),
|
||||
'radiations' => array('lib'=> 'Radiations', 'select'=>''),
|
||||
'ventes' => array('lib'=> 'Ventes/Cessions', 'select'=>''),
|
||||
'mmd' => array('lib'=> 'Modifications diverses', 'select'=>''),
|
||||
);
|
||||
|
||||
if (strtolower($user->getLogin())=='cpcambr13') {
|
||||
$selectFiltre = array(
|
||||
'procol' => array('lib'=> 'Procédures collectives', 'select'=>''),
|
||||
);
|
||||
$filtre = 'procol';
|
||||
}
|
||||
|
||||
$filtre = $request->getParam('filtre', '');
|
||||
if (!empty($filtre)) {
|
||||
switch (trim(strtolower($filtre))) {
|
||||
@ -714,7 +728,12 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
case 'bodacc': $filtre = 'bodacc'; break;
|
||||
default: $filtre = ''; break;
|
||||
}
|
||||
if (array_key_exists($filtre, $selectFiltre)) {
|
||||
$selectFiltre[$filtre]['select'] = ' selected';
|
||||
}
|
||||
}
|
||||
$this->view->assign('selectFiltre', $selectFiltre);
|
||||
|
||||
|
||||
//Récupération du fichier
|
||||
$file = $path.'/'.$nomFic;
|
||||
@ -799,7 +818,6 @@ class SurveillanceController extends Zend_Controller_Action
|
||||
fclose($handle);
|
||||
|
||||
$this->view->assign('annonces', $tab);
|
||||
$this->view->assign('filtre', $filtre);
|
||||
$this->view->assign('nomFic', $nomFic);
|
||||
$this->renderScript('surveillance/fichier-ann.phtml');
|
||||
} else {
|
||||
|
@ -18,17 +18,15 @@
|
||||
<td width="200" class="StyleInfoLib">Afficher uniquement les annonces</td>
|
||||
<td width="350" class="StyleInfoData">
|
||||
<form name="form_filtre" action="<?=$this->url(array('controller'=>'surveillance', 'action'=>'fichier'))?>" method="GET" enctype="multipart/form-data">
|
||||
<input type="hidden" name="page" value="survlisteann" />
|
||||
<input type="hidden" name="nomFic" value="<?=$this->$nomFic?>" />
|
||||
<select name="filtre" onchange="document.form_filtre.submit()">
|
||||
<option value="-" <?if ($this->filtre=='') echo 'selected';?>>-</option>
|
||||
<option value="procol" <?if ($this->filtre=='procol') echo 'selected';?>>Procédures collectives</option>
|
||||
<option value="radiations" <?if ($this->filtre=='radiations') echo 'selected';?>>Radiations</option>
|
||||
<option value="ventes" <?if ($this->filtre=='ventes') echo 'selected';?>>Ventes/Cessions</option>
|
||||
<option value="mmd" <?if ($this->filtre=='mmd') echo 'selected';?>>Modifications diverses</option>
|
||||
<?php /* <option value="bodacc" <?if ($filtre=='bodacc') echo 'selected';?>>BODACC</option> */ ?>
|
||||
</select>
|
||||
</form>
|
||||
<input type="hidden" name="page" value="survlisteann" />
|
||||
<input type="hidden" name="nomFic" value="<?=$this->$nomFic?>" />
|
||||
<select name="filtre" onchange="document.form_filtre.submit()">
|
||||
<option value="-">-</option>
|
||||
<?php foreach ( $this->selectFiltre as $key => $value ) {?>
|
||||
<option value="<?=$key?>"<?=$value['select']?>><?=$value['lib']?></option>
|
||||
<?php }?>
|
||||
</select>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user