Amélioration affichage annonces associations

This commit is contained in:
Michael RICOIS 2012-08-27 11:29:03 +00:00
parent f8b6dc8944
commit 5f5d8371af
4 changed files with 26 additions and 25 deletions

View File

@ -43,8 +43,8 @@ class JuridiqueController extends Zend_Controller_Action
$session = new SessionEntreprise($this->siret, $this->id);
$fj = $session->getFormeJuridique();
if ($fj>9000 && $fj<9999 && intval($siren)==0) {
$vue='asso';
if ( $fj>9000 && $fj<9999 && intval($siren)==0 ) {
$vue = 'asso';
}
$this->view->assign('vue', $vue);
@ -63,7 +63,12 @@ class JuridiqueController extends Zend_Controller_Action
$infos = $ws->getAnnoncesBalo($siren, $idAnn, null, $position, $nbAnnonces);
break;
case 'asso':
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAnnonces);
if ( substr($session->getAutreId(),0,1)=='W' ) {
$infos = $ws->getAnnoncesAsso($siren, $session->getSourceId(), null, $position, $nbAnnonces);
} else {
$idAnn = $session->getSourceId();
$infos = $ws->getAnnoncesAsso($siren, $idAnn, null, $position, $nbAnnonces);
}
break;
case 'bomp':
$filtre = $request->getParam('filtre', null);
@ -119,7 +124,7 @@ class JuridiqueController extends Zend_Controller_Action
);
$this->view->assign('source', $session->getSource());
if (intval($this->siret)==0){
if ( intval($this->siret)==0 ){
$this->view->assign('sourceId', $session->getSourceId());
} else {
$this->view->assign('sourceId', null);
@ -134,7 +139,7 @@ class JuridiqueController extends Zend_Controller_Action
$this->renderScript('juridique/annonce-ajax.phtml');
} else {
//Définir url pour téléchargement pdf
if ( in_array($annonce['Code'], array('BODA', 'BODB', 'BODC'))&& intval($annonce['Annee'])>=2008) {
if ( in_array($annonce['Code'], array('BODA', 'BODB', 'BODC')) && intval($annonce['Annee'])>=2008) {
$lienBodacc = $this->view->url(array(
'controller' => 'juridique',
'action' => 'bodaccpdf',
@ -159,10 +164,10 @@ class JuridiqueController extends Zend_Controller_Action
$lienPagePrecedente = false;
} else {
$lienPagePrecedente = $this->view->url(array(
'controller'=>'juridique',
'action'=>'annonces',
'vue'=>$vue,
'p'=>$p-1
'controller' => 'juridique',
'action' => 'annonces',
'vue'=> $vue,
'p' => $p-1
));
}
@ -170,10 +175,10 @@ class JuridiqueController extends Zend_Controller_Action
$lienPageSuivante = false;
} else {
$lienPageSuivante = $this->view->url(array(
'controller'=>'juridique',
'action'=>'annonces',
'vue'=>$vue,
'p'=>$p+1
'controller' => 'juridique',
'action' => 'annonces',
'vue' => $vue,
'p' => $p+1
));
}

View File

@ -129,23 +129,24 @@ switch ($this->annonce['Type']) {
</table>
<div style="width:100%;text-align:center;">
<?php if (intval($this->siret)!=0) {?>
<?php
$href = $this->url(array(
'controller' => 'juridique',
'action' => 'annonces',
'siret' => $this->siret,
'id' => $this->id,
'source' => $this->sourceId,
'vue' => $this->vue
), null, true);
?>
<a href="<?=$href?>">Revenir à la liste des annonces</a>
<?php }?>
<?php if ( $this->lienBodacc ) { ?>
- <span id="bodacc"><a href="<?=$this->lienBodacc?>">
<img src="/themes/default/images/interfaces/pdf.png" alt="Bodacc au format PDF">
Télécharger le bulletin officiel</a>
</span>
<?php } ?>
</div>

View File

@ -813,16 +813,6 @@ class Menu
case 'juridique':
if (!empty($this->siret)) { $params['siret'] = $this->siret; }
if (!empty($this->id)) { $params['id'] = $this->id; }
switch($action){
case 'annonces':
if (empty($this->siret) || intval($this->siret)==0){
require_once 'Scores/SessionEntreprise.php';
$session = new SessionEntreprise(null);
$params['idAnn'] = $session->getSourceId();
$params['source'] = $session->getSource();
}
break;
}
break;
case 'saisie':
switch($action){

View File

@ -32,6 +32,11 @@ class SessionEntreprise
return $this->get('siret');
}
public function getAutreId()
{
return $this->get('AutreId');
}
public function getSiretSiege()
{
return $this->get('siretSiege');