BOMP
This commit is contained in:
parent
1bb82500a1
commit
c3a98c7c4a
@ -66,14 +66,6 @@ class JuridiqueController extends Zend_Controller_Action
|
||||
|
||||
$ws = new WsScores();
|
||||
switch ( $vue ) {
|
||||
case 'bodacc':
|
||||
case 'abod':
|
||||
default:
|
||||
if(intval($siren)==0) {
|
||||
$idAnn = $session->getSourceId();
|
||||
}
|
||||
$infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAffichage);
|
||||
break;
|
||||
case 'balo':
|
||||
$infos = $ws->getAnnoncesBalo($siren, $idAnn, null, $position, $nbAffichage);
|
||||
break;
|
||||
@ -90,13 +82,23 @@ class JuridiqueController extends Zend_Controller_Action
|
||||
case 'bomp':
|
||||
$filtre = $request->getParam('filtre', 'A');
|
||||
$this->view->assign('filtre', $filtre);
|
||||
Zend_Registry::get('firebug')->info("getAnnoncesBoamp");
|
||||
$infos = $ws->getAnnoncesBoamp($siren, $idAnn, $filtre, $position, $nbAffichage);
|
||||
break;
|
||||
case 'bodacc':
|
||||
case 'abod':
|
||||
default:
|
||||
if(intval($siren)==0) {
|
||||
$idAnn = $session->getSourceId();
|
||||
}
|
||||
$infos = $ws->getAnnoncesLegales($siren, $idAnn, null, $position, $nbAffichage);
|
||||
break;
|
||||
}
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
if ($infos === false) {
|
||||
$this->forward('soap', 'error');
|
||||
}
|
||||
Zend_Registry::get('firebug')->info($infos);
|
||||
|
||||
require_once 'Scores/Annonces.php';
|
||||
$objAnnonces = new Annonces($infos->result->item);
|
||||
|
||||
@ -109,7 +111,6 @@ class JuridiqueController extends Zend_Controller_Action
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$this->view->assign('hasModeEdition', $user->checkModeEdition());
|
||||
|
||||
$this->view->assign('exportObjet', $infos);
|
||||
$this->view->assign('surveillance', $user->checkPerm('survannonce'));
|
||||
|
||||
@ -172,7 +173,6 @@ class JuridiqueController extends Zend_Controller_Action
|
||||
|
||||
// --- Affichage pour la liste des annonces
|
||||
} else {
|
||||
|
||||
// --- Titre de la page
|
||||
if ( empty($autrePage) ) {
|
||||
if( empty($siren) ){
|
||||
@ -208,16 +208,15 @@ class JuridiqueController extends Zend_Controller_Action
|
||||
$this->view->assign('nbReponses', empty($nbReponses) ? 0 : $nbReponses);
|
||||
$this->view->assign('nbReponsesTotal', empty($nbReponsesTotal) ? 0 : $nbReponsesTotal);
|
||||
|
||||
foreach ( $typeAnnonces as $type ) {
|
||||
$classType = 'annonces'.$type;
|
||||
$annonces = array();
|
||||
if ( count( $objAnnonces->$classType ) > 0 ) {
|
||||
foreach( $objAnnonces->$classType as $ann ) {
|
||||
$annonces[] = $objAnnonces->getAnnonceResume($ann);
|
||||
}
|
||||
$this->view->assign($classType, $annonces);
|
||||
}
|
||||
}
|
||||
$classType = 'annonces'.ucfirst($vue);;
|
||||
$annonces = array();
|
||||
if (count($objAnnonces->$classType) > 0) {
|
||||
foreach($objAnnonces->$classType as $ann) {
|
||||
$annonces[] = $objAnnonces->getAnnonceResume($ann);
|
||||
}
|
||||
Zend_Registry::get('firebug')->info($annonces);
|
||||
$this->view->assign($classType, $annonces);
|
||||
}
|
||||
$this->view->headScript()->appendFile($this->theme->pathScript.'/annonces.js', 'text/javascript');
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +0,0 @@
|
||||
<div id="center">
|
||||
<pre><?php print_r($this->infos); ?></pre>
|
||||
</div>
|
@ -131,10 +131,10 @@ a.lienType {
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if ($this->vue=='bodacc'){ ?>
|
||||
<?php if ($this->vue=='bodacc') {?>
|
||||
<h2>EVÉNEMENTS LÉGAUX</h2>
|
||||
<div class="paragraph">
|
||||
<?php if(count($this->annoncesBodacc) ==0 ) { ?>
|
||||
<?php if (count($this->annoncesBodacc) == 0) { ?>
|
||||
Néant
|
||||
<?php } else {?>
|
||||
<table class="data">
|
||||
@ -144,10 +144,10 @@ a.lienType {
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if ($this->vue=='balo'){ ?>
|
||||
<?php if ($this->vue=='balo') {?>
|
||||
<h2>BALO</h2>
|
||||
<div class="paragraph">
|
||||
<?php if(count($this->annoncesBalo)==0){ ?>
|
||||
<?php if(count($this->annoncesBalo) == 0){ ?>
|
||||
Néant
|
||||
<?php } else {?>
|
||||
<table class="data">
|
||||
@ -157,10 +157,10 @@ a.lienType {
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if ($this->vue=='bomp'){ ?>
|
||||
<?php if ($this->vue == 'bomp') {?>
|
||||
<div class="paragraph" style="margin:0 0 0 40px;">
|
||||
<form name="filtreBoamp" method="post" action="<?=$this->url(array('controller'=>'juridique',
|
||||
'action'=>'annonces','vue'=>'bomp','siret'=>$this->siret,'id'=>$this->id),null,true)?>">
|
||||
<form name="filtreBoamp" method="post" action="<?=$this->url(array('controller'=>'juridique', 'action'=>'annonces', 'vue'=>'bomp',
|
||||
'siret'=>$this->siret, 'id'=>$this->id), 'default', true)?>">
|
||||
<label>Type d'annonce</label>
|
||||
<select name="filtre">
|
||||
<option value="A"<?=($this->filtre=='A')?' selected':'';?>>Avis d'attribution</option>
|
||||
@ -168,15 +168,16 @@ a.lienType {
|
||||
</select>
|
||||
</form>
|
||||
<script>
|
||||
$('select[name=filtre]').on('change',function(){
|
||||
$(this).parent('form').submit();
|
||||
$('select[name=filtre]').on('change', function(e){
|
||||
e.preventDefault();
|
||||
$('form[name=filtreBoamp]').submit();
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<h2>Marchés publics</h2>
|
||||
<div class="paragraph">
|
||||
<?php if (count($this->annoncesBomp)==0) { ?>
|
||||
<?php if (count($this->annoncesBomp) == 0) {?>
|
||||
Néant
|
||||
<?php } else {?>
|
||||
<table class="data">
|
||||
@ -189,7 +190,7 @@ Néant
|
||||
<?php if ($this->vue=='asso') { ?>
|
||||
<h2>Associations</h2>
|
||||
<div class="paragraph">
|
||||
<?php if (count($this->annoncesAsso)==0){ ?>
|
||||
<?php if (count($this->annoncesAsso) == 0){ ?>
|
||||
Néant
|
||||
<?php } else {?>
|
||||
<table class="data">
|
||||
@ -204,11 +205,11 @@ Néant
|
||||
<?php if ($this->PageTotal>1) {?>
|
||||
<div class="paragraph">
|
||||
<div class="pagination clearfix">
|
||||
<a class="first" href="<?=$this->url(array('page'=>1))?>">«</a>
|
||||
<a class="previous" href="<?=$this->url(array('page'=>$this->PagePrev))?>">‹</a>
|
||||
<a class="first" href="<?=$this->url(array('filtre'=>$this->filtre, 'page'=>1))?>">«</a>
|
||||
<a class="previous" href="<?=$this->url(array('filtre'=>$this->filtre, 'page'=>$this->PagePrev))?>">‹</a>
|
||||
<span>Page <?=$this->PageCurrent?>/<?=$this->PageTotal?></span>
|
||||
<a class="next" href="<?=$this->url(array('page'=>$this->PageNext))?>">›</a>
|
||||
<a class="last" href="<?=$this->url(array('page'=>$this->PageTotal))?>">»</a>
|
||||
<a class="next" href="<?=$this->url(array('filtre'=>$this->filtre, 'page'=>$this->PageNext))?>">›</a>
|
||||
<a class="last" href="<?=$this->url(array('filtre'=>$this->filtre, 'page'=>$this->PageTotal))?>">»</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
@ -2237,7 +2237,11 @@ class WsScores
|
||||
|
||||
public function getAnnoncesBoamp($siren, $idAnn=null, $filtre = null, $position=0, $nbRep=20)
|
||||
{
|
||||
$filename = 'annoncesboamp-'.$siren.'-'.$idAnn.'-'.$position.'-'.$nbRep;
|
||||
$filename = 'annoncesboamp-'.$siren.'-'.$filtre.'-'.$position.'-'.$nbRep;
|
||||
|
||||
if ($idAnn !== null) {
|
||||
$filename = 'annoncesboamp-'.$siren.'-'.$filtre.'-'.$idAnn.'-'.$position.'-'.$nbRep;
|
||||
}
|
||||
|
||||
if ($this->cacheWrite) {
|
||||
$cache = new Cache($filename);
|
||||
|
Loading…
Reference in New Issue
Block a user