From 27dbe76a7507c402c438c960305446dc3dd1481f Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Wed, 8 Feb 2012 15:32:32 +0000 Subject: [PATCH] =?UTF-8?q?Affichage=20du=20lien=20de=20mise=20en=20survei?= =?UTF-8?q?llance=20uniquement=20lors=20que=20l'utilisateur=20=C3=A0=20le?= =?UTF-8?q?=20droit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/controllers/IdentiteController.php | 7 +++++++ application/views/default/scripts/identite/fiche.phtml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/application/controllers/IdentiteController.php b/application/controllers/IdentiteController.php index baa90d1fe..1cb115f23 100644 --- a/application/controllers/IdentiteController.php +++ b/application/controllers/IdentiteController.php @@ -162,6 +162,13 @@ class IdentiteController extends Zend_Controller_Action $this->view->assign('infos', $infos); $this->view->assign('siret', $infos->Siret); + $survDroits = array('survannonce', 'survinsee', 'survbilan', 'survscore', 'survactes', 'survdirigeants', 'survpriv'); + $countSurvDroits = 0; + foreach ( $survDroits as $item ) { + if ($user->checkPerm($item)) $countSurvDroits++; + } + $this->view->assign('surveillance', $countSurvDroits); + $this->view->assign('AutrePage', $this->getRequest()->getParam('apage')); } diff --git a/application/views/default/scripts/identite/fiche.phtml b/application/views/default/scripts/identite/fiche.phtml index f34170088..0b367e278 100644 --- a/application/views/default/scripts/identite/fiche.phtml +++ b/application/views/default/scripts/identite/fiche.phtml @@ -86,9 +86,11 @@ echo $this->partial('identite/fiche-item.phtml', $this->dBlock['EffectifEtab']); action('news', 'identite');?> +surveillance)):?>
action('infos','surveillance', null, array('siret' => $this->siret))?>
+ AutrePage)):?> render('cgu.phtml', $this->cgu)?>