Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 1328 → Rev 1325

/branches/v5.7-duchartre/modules/mobile/sources/Repartition.php
17,7 → 17,6
private $conteneur = null;
private $nomCourant = null;
private $donnees = array();
private $referentiel = 'bdtfx';
private $cartes;
public function __construct(Conteneur $conteneur) {
24,30 → 23,25
$this->conteneur = $conteneur;
$this->nomCourant = $this->conteneur->getNomCourant();
$this->cartes = $this->conteneur->getApiCartes();
$this->referentiel = $this->conteneur->getParametre('referentiel');
}
 
public function getDonnees() {
$donnees['carte'] = $this->getChorodepMiniature();
$donnees['chorodep'] = $this->getChorodepMiniature();
return $donnees;
}
private function getChorodepMiniature() {
$url_carte = null;
if(Config::get($this->referentiel.'.baseRepartition') != null) {
$this->cartes->setProjet(Config::get($this->referentiel.'.baseRepartition'));
$this->cartes->setLargeur('570x534');
//TODO: démochir ce code
// Chargement des nn des synonymes pour obtenir une carte plus complète
$noms = $this->conteneur->getApiNoms();
$syns = $noms->getSynonymes($this->nomCourant->getNnr());
$nns_syns = array_keys($syns['resultat']);
$nns_syns[] = $this->nomCourant->getNnr();
$id = 'nn:'.implode(',', $nns_syns);
$this->cartes->setId($id);
$url_carte = $this->cartes->getUrlDataSvg();
}
return $url_carte;
$this->cartes->setProjet('chorodep');
$this->cartes->setLargeur('570x534');
//TODO: démochir ce code
// Chargement des nn des synonymes pour obtenir une carte plus complète
$noms = $this->conteneur->getApiNoms();
$syns = $noms->getSynonymes($this->nomCourant->getNnr());
$nns_syns = array_keys($syns['resultat']);
$nns_syns[] = $this->nomCourant->getNnr();
$id = 'nn:'.implode(',', $nns_syns);
$this->cartes->setId($id);
return $this->cartes->getUrlDataSvg();
}
}
?>
/branches/v5.7-duchartre/modules/mobile/squelettes/theme_pyracantha_niveau1.tpl.html
134,18 → 134,16
<div class="bg <?= $class ?>">
<div class="textes">
<? if (stristr($texte['corps'][$index], 'cologie') != false || stristr($texte['corps'][$index], 'cologie') != false) : ?>
<? if ($repartition['carte'] != null) : ?>
<div class="span6 margin-right-05em">
Carte de répartition <br />
<ul id="galerie_carte" class="gallery style-none margin-center">
<li>
<a href="<?= $repartition['carte'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['carte'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
</a>
</li>
</ul>
</div>
<? endif; ?>
<div class="span6 margin-right-05em">
Carte de répartition <br />
<ul id="galerie_carte" class="gallery style-none margin-center">
<li>
<a href="<?= $repartition['chorodep'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['chorodep'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
</a>
</li>
</ul>
</div>
<div class="">
<?= $texte['corps'][$index+1]; ?>
</div>
161,7 → 159,7
<? endfor; ?>
<? else : ?>
 
<? if ($repartition['carte'] != null) /* affichage de la chorologie quand même, en l'absence de fiche Smartflore */ : ?>
<? if (isset($repartition['chorodep'])) /* affichage de la chorologie quand même, en l'absence de fiche Smartflore */ : ?>
<div class="row-fluid infos">
<div data-target="#c9" data-toggle="collapse" class="btn btn-block couleur1-bg">
<h4 class="padding-left-1em">
174,8 → 172,8
<div class="span6 margin-right-05em"> Carte de répartition <br>
<ul class="gallery style-none margin-center" id="galerie_carte">
<li>
<a href="<?= $repartition['carte'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['carte'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
<a href="<?= $repartition['chorodep'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['chorodep'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
</a>
</li>
</ul>
201,4 → 199,4
<? endif; ?>
<? endif; ?>
</div>
<? endif; ?>
<? endif; ?>
/branches/v5.7-duchartre/modules/mobile/squelettes/theme_gentiana_niveau1.tpl.html
62,17 → 62,15
</div>
</div>
<div class="span6">
<? if ($repartition['carte'] != null) : ?>
<div class="wrapper_carte">
<ul id="galerie_carte" class="gallery">
<li>
<a href="<?= $repartition['carte'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['carte'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
</a>
</li>
</ul>
</div>
<? endif; ?>
<div class="wrapper_carte">
<ul id="galerie_carte" class="gallery">
<li>
<a href="<?= $repartition['chorodep'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['chorodep'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
</a>
</li>
</ul>
</div>
</div>
</div>
<? if ($floraison['floraison'] != -1) : ?>
133,7 → 131,7
<? endfor; ?>
</div>
<? else : ?>
<? if ($repartition['carte'] != null) /* affichage de la chorologie quand même, en l'absence de fiche Smartflore */ : ?>
<? if (isset($repartition['chorodep'])) /* affichage de la chorologie quand même, en l'absence de fiche Smartflore */ : ?>
<div class="row-fluid infos">
<div data-target="#c9" data-toggle="collapse" class="btn btn-block couleur1-bg">
<h4 class="padding-left-1em">
146,8 → 144,8
<div class="span6 margin-right-05em"> Carte de répartition <br>
<ul class="gallery style-none margin-center" id="galerie_carte">
<li>
<a href="<?= $repartition['carte'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['carte'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
<a href="<?= $repartition['chorodep'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['chorodep'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
</a>
</li>
</ul>
174,4 → 172,5
<? endif; ?>
<? endif; ?>
<? endif; ?>
</div>
</div>
/branches/v5.7-duchartre/modules/mobile/squelettes/theme_gentiana2_niveau1.tpl.html
44,17 → 44,15
<div class="span5 margin-bottom-05em margin-center margin-right-05em">
<div class="row-fluid margin-top-05em padding-left-01em" id="icons">
<div class="span6">
<? if ($repartition['carte'] != null) : ?>
<div class="wrapper_carte">
<ul id="galerie_carte" class="gallery">
<li>
<a href="<?= $repartition['carte'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['carte'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
</a>
</li>
</ul>
</div>
<? endif; ?>
<div class="wrapper_carte">
<ul id="galerie_carte" class="gallery">
<li>
<a href="<?= $repartition['chorodep'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['chorodep'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
</a>
</li>
</ul>
</div>
</div>
<div class="span6 bordered">
<div class="wrapper wrapper_demi">
148,7 → 146,7
</div>
<? else : ?>
 
<? if (isset($repartition['carte'])) /* affichage de la chorologie quand même, en l'absence de fiche Smartflore */ : ?>
<? if (isset($repartition['chorodep'])) /* affichage de la chorologie quand même, en l'absence de fiche Smartflore */ : ?>
<div class="row-fluid infos">
<div data-target="#c9" data-toggle="collapse" class="btn btn-block couleur1-bg">
<h4 class="padding-left-1em">
161,8 → 159,8
<div class="span6 margin-right-05em"> Carte de répartition <br>
<ul class="gallery style-none margin-center" id="galerie_carte">
<li>
<a href="<?= $repartition['carte'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['carte'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
<a href="<?= $repartition['chorodep'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['chorodep'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
</a>
</li>
</ul>
191,4 → 189,5
</div>
</div>
</div> <!-- span12 englobant -->
</div>
</div>