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

@ -582,7 +582,8 @@ class IdentiteController extends Zend_Controller_Action
$session = new Scores_Session_Entreprise($siren, null, true);
$this->view->assign('siren', $siren);
$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);
@ -609,7 +610,8 @@ class IdentiteController extends Zend_Controller_Action
$this->view->assign('isin', $session->getIsin());
$this->view->assign('siren', $siren);
$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
if ( $user->checkPerm('GROUPE') ) {

View File

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