diff --git a/application/controllers/JuridiqueController.php b/application/controllers/JuridiqueController.php index 59357ac5f..948db3740 100644 --- a/application/controllers/JuridiqueController.php +++ b/application/controllers/JuridiqueController.php @@ -61,6 +61,10 @@ class JuridiqueController extends Zend_Controller_Action 'Asso', ); + $user = new Utilisateur(); + $this->view->assign('hasModeEdition', $user->checkModeEdition()); + + $this->view->assign('id', $session->getId()); $this->view->assign('siren', $siren); $this->view->assign('siret', $this->siret); $this->view->assign('raisonSociale', $session->getRaisonSociale()); @@ -83,6 +87,14 @@ class JuridiqueController extends Zend_Controller_Action ); Zend_Registry::get('firebug')->info($infos->result->item); Zend_Registry::get('firebug')->info($annonce); + + $this->view->assign('source', $session->getSource()); + if (intval($this->siret)==0){ + $this->view->assign('sourceId', $session->getSourceId()); + } else { + $this->view->assign('sourceId', null); + } + $this->view->assign('idAnn', $idAnn); $this->view->assign('annonce', $annonce); $this->renderScript('juridique/annonce.phtml'); } else { diff --git a/application/views/default/scripts/juridique/annonce.phtml b/application/views/default/scripts/juridique/annonce.phtml index 78a3b14d4..43ffff52f 100644 --- a/application/views/default/scripts/juridique/annonce.phtml +++ b/application/views/default/scripts/juridique/annonce.phtml @@ -14,7 +14,17 @@   Raison Sociale - raisonSociale?> + + raisonSociale?> + hasModeEdition) : ?> + (Edition) + +   @@ -50,10 +60,43 @@ switch ($this->annonce['Type']) {   + annonce['Desc'].' '.$this->annonce['Entree'].' '.$this->annonce['EntreeSD'];?> annonce['Desc'].' '. - $this->annonce['Entree'].' '. - $this->annonce['EntreeSD']; + if ($this->hasModeEdition){ + $liensEdit = array( + 'edit' => array( + 'class' => 'annonceEdit', + 'title' => 'Edition annonce', + 'img' => '', + ), + 'delete' => array( + 'class' => 'annonceDelete', + 'title' => 'Suppression annonce', + 'img' => '', + ), + 'copy' => array( + 'class' => 'annonceCopy', + 'title' => 'Dupliquer sur autre Siren', + 'img' => '', + ), + ); + + foreach ( $liensEdit as $lienId => $lienItem ){ + ?> + + + + @@ -82,16 +125,16 @@ switch ($this->annonce['Type']) { url(array( + 'controller' => 'juridique', + 'action' => 'annonces', + 'siret' => $this->siret, + 'id' => $this->id, + 'idAnn' => '', + 'vue' => '', + )); ?> - - Revenir à la liste des annonces - + Revenir à la liste des annonces diff --git a/application/views/default/scripts/juridique/annonces.phtml b/application/views/default/scripts/juridique/annonces.phtml index 58b106630..bb64c2317 100644 --- a/application/views/default/scripts/juridique/annonces.phtml +++ b/application/views/default/scripts/juridique/annonces.phtml @@ -15,7 +15,17 @@   Raison Sociale - raisonSociale?> + + raisonSociale?> + hasModeEdition) : ?> + (Edition) + +   diff --git a/public/themes/default/images/interfaces/save_copy.png b/public/themes/default/images/interfaces/save_copy.png new file mode 100644 index 000000000..41afdf8e1 Binary files /dev/null and b/public/themes/default/images/interfaces/save_copy.png differ