Issue #0001900: [Liens inter-entreprises] Ajouter le lien "Mettre sous surveillance"

This commit is contained in:
Aram HARUTYUNYAN 2014-04-08 10:31:48 +00:00
parent 51228580d5
commit b06dacdbc2
2 changed files with 29 additions and 16 deletions

View File

@ -583,6 +583,7 @@ class IdentiteController extends Zend_Controller_Action
$this->view->assign('siren', $siren); $this->view->assign('siren', $siren);
$this->view->assign('siret', $session->getSiret()); $this->view->assign('siret', $session->getSiret());
$this->view->assign('isin', $session->getIsin()); $this->view->assign('isin', $session->getIsin());
$this->view->assign('surveillance', $user->checkPerm('survdirigeants'));
} }
Zend_Registry::get('firebug')->info($identite); Zend_Registry::get('firebug')->info($identite);
@ -610,6 +611,7 @@ class IdentiteController extends Zend_Controller_Action
$this->view->assign('siren', $siren); $this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret); $this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale()); $this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('surveillance', $user->checkPerm('liens'));
//Check access to display group link //Check access to display group link
if ( $user->checkPerm('GROUPE') ) { if ( $user->checkPerm('GROUPE') ) {

View File

@ -96,27 +96,38 @@
<a class="confirm" title="Fiche suppression" href="<?=$hrefSuppr; ?>">Supprimer la fiche</a> <a class="confirm" title="Fiche suppression" href="<?=$hrefSuppr; ?>">Supprimer la fiche</a>
</td> </td>
</tr> </tr>
<?php if ($this->surveillance) {?>
<tr>
<td width="30">&nbsp;</td>
<td colspan="2" width="550" class="StyleInfoData">
<?=$this->action('infos','surveillance', null, array(
'source' => 'liens',
'siret' => $this->siret
))?>
</td>
</tr>
<?php }?>
<?php if ($this->PP) {?>
<tr> <tr>
<td width="30">&nbsp;</td> <td width="30">&nbsp;</td>
<td width="200" class="StyleInfoLib"></td> <td width="200" class="StyleInfoLib"></td>
<td width="350" class="StyleInfoLib"> <td width="350" class="StyleInfoLib">
<?php <?php
if ($this->PP) { $date = new Zend_Date($this->naissanceDate, 'YYYY-MM-dd');
$date = new Zend_Date($this->naissanceDate, 'YYYY-MM-dd'); $param = array(
$param = array( 'controller'=>'recherche',
'controller'=>'recherche', 'action'=>'dirigeant',
'action'=>'dirigeant', 'dirNom'=>$this->nom,
'dirNom'=>$this->nom, 'dirPrenom'=>$this->prenom,
'dirPrenom'=>$this->prenom, 'dirDateNaissJJ' =>$date?$date->get('dd'):'',
'dirDateNaissJJ' =>$date->get('dd'), 'dirDateNaissMM' =>$date?$date->get('MM'):'',
'dirDateNaissMM' =>$date->get('MM'), 'dirDateNaissAAAA' =>$date?$date->get('YYYY'):''
'dirDateNaissAAAA' =>$date->get('YYYY') ); ?>
); <a href="<?=$this->url($param,null,true);?>">Lancer une recherche dirigeant</a>
?>
<a href="<?=$this->url($param,null,true);?>">Lancer une recherche dirigeant</a><?php }?>
</td> </td>
</tr> </tr>
<?php }?> <?php }?>
<?php }?>
</table> </table>
</div> </div>
<?php }?> <?php }?>