Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 1025 → Rev 1026

/trunk/modules/fiche/squelettes/fiche_repartition.tpl.html
29,7 → 29,7
<? if (isset($moissonnage)) : ?>
<div id="moissonnage">
<h2>Observations</h2>
<object id="repartition_observations" type="text/html" data="<?=$moissonnage['mapUrl']?>" class="svg" alt="<?=$moissonnage['mapUrl']?>">
<object id="repartition_observations" type="text/html" data="<?=$moissonnage['mapUrl']?>" class="svg" alt="<?=$moissonnage['mapUrl']?>" style="width:620px; height:620px; overflow:none;">
</object>
<div id="legende" style="padding:15px;margin-top:-25px;">
<? foreach ($moissonnage['legende'] as $id => $details) :?>
40,6 → 40,7
<? endforeach; ?>
</div>
</div>
<hr class="nettoyage" />
<?endif;?>
<div id="cel">
/trunk/modules/fiche/formateurs/Repartition.php
43,19 → 43,13
}
 
public function obtenirDonneesExport() {
$this->getRepartition();
$donnees['chorodep'] = $this->donnees['repartition'];
$this->getMoissonnageExport();
// TODO: renommer l'index "eflore" en moissonnage
// et renommer dans pdf_export/squelettes/pdf_repartition.tpl.html
$donnees['eflore'] = $this->donnees['moissonnage'];
$donnees['chorodep'] = $this->getRepartition();
$donnees['eflore'] = $this->getMoissonnageExport();
return $donnees;
}
private function getRepartition() {
$projetRepartition = Config::get($this->referentiel.'.baseRepartition');
// eg: eflore ou chorodep
// cf: bdtfx.ini, bdtxa.ini
if ($projetRepartition != "") {
$this->cartes->setProjet($projetRepartition);
$this->cartes->setLargeur('630');
83,56 → 77,52
private function getMoissonnage() {
$projetMoissonnage = Config::get($this->referentiel.'.baseMoissonnage');
if (! $projetMoissonnage) return;
$this->cartes->setProjet($projetMoissonnage);
$this->cartes->setLargeur('max');
$this->cartes->setInfoNom($this->nomCourant->getNomRetenu());
$eflore['mapUrl'] = $this->cartes->getUrlMap();
$eflore['legende'] = $this->cartes->getLegende();
$this->donnees['moissonnage'] = $eflore;
if ($projetMoissonnage != "") {
$this->cartes->setProjet('moissonnage');
$this->cartes->setLargeur('600');
$this->cartes->setInfoNom($this->nomCourant->getNt());
$this->cartes->setInfoReferentiel($this->referentiel);
$eflore['mapUrl'] = $this->cartes->getUrlMapSvg();
$eflore['legende'] = $this->cartes->getLegende();
$this->donnees['moissonnage'] = $eflore;
}
}
private function getMoissonnageExport() {
$projetMoissonnage = Config::get($this->referentiel.'.baseMoissonnage');
if (! $projetMoissonnage) return;
$this->cartes->setProjet($projetMoissonnage);
$this->cartes->setProjet('eflore');
$this->cartes->setLargeur('min');
$this->cartes->setInfoNom($this->nomCourant->getNomRetenu());
$eflore['min'] = $this->cartes->getUrlEflorePng();
$eflore['legende'] = $this->cartes->getLegende();
$this->donnees['moissonnage'] = $eflore;
return $eflore;
}
 
public function getBloc() {
$donnees['chorodep'] = $this->getChorodepMiniature();
$donnees['eflore'] = $this->getEfloreMiniature();
$donnees['eflore'] = $this->getMoissonnageMiniature();
return $donnees;
}
private function getChorodepMiniature() {
$projetRepartition = Config::get($this->referentiel.'.baseRepartition');
$url = "";
if ($projetRepartition != "") {
$this->cartes->setProjet($projetRepartition);
$this->cartes->setLargeur('190x178');
//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 = $this->cartes->getUrlPng();
}
return $url;
$this->cartes->setProjet('chorodep');
$this->cartes->setLargeur('190x178');
//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->getUrlPng();
}
private function getEfloreMiniature() {
$this->cartes->setProjet('eflore');
$this->cartes->setLargeur('min');
$this->cartes->setInfoNom($this->nomCourant->getNomRetenu());
return $this->cartes->getUrlEflorePng();
private function getMoissonnageMiniature() {
$this->cartes->setProjet('moissonnage');
$this->cartes->setLargeur('190');
$this->cartes->setInfoReferentiel($this->referentiel);
$this->cartes->setInfoNom($this->nomCourant->getNt());
return $this->cartes->getUrlMapPng();
}
}
?>