Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 1164 → Rev 1165

/trunk/configurations/isfan.ini
New file
0,0 → 1,15
; Mettre ici les paramètres de config qui doivent être redéfinis par ce référentiel
couleur_alphabet_fin = "204,255,51"
 
; Mettre ici les paramètres spécifiques au référentiel
[isfan]
nom = "Base de données des Trachéophytes des Antilles"
referentielVerna = ""
baseImages = "cel"
baseStatuts = ""
baseRepartition = ""
 
; à voir si l'on crée un fichier spécifique pour l'i18n de chaque référentiel
champsPresence = ""
/trunk/presentations/squelettes/menu.tpl.html
5,6 → 5,7
<li><a href="index.php?referentiel=bdtfx&amp;module=liste&amp;rang=F">Liste Famille</a></li>
<li><a href="index.php?referentiel=bdtfx&amp;module=liste&amp;rang=G">Liste Genre</a></li>
<li><a href="index.php?referentiel=bdtxa">eFlore Antilles</a></li>
<li><a href="index.php?referentiel=isfan">eFlore Afrique du Nord</a></li>
</ul>
</li>
</ul>
/trunk/modules/resultat/Resultat.php
141,8 → 141,10
$champs_presence_spl = explode('|', $champs_presence);
foreach($champs_presence_spl as $champ) {
$label_param_champ = explode(':', $champ);
$tableau_champs_presence[] = array('param' => $label_param_champ[1],
if(count($label_param_champ) >= 2) {
$tableau_champs_presence[] = array('param' => $label_param_champ[1],
'label' => $label_param_champ[0]);
}
}
return $tableau_champs_presence;
}
/trunk/modules/recherche/Recherche.php
280,8 → 280,10
$champs_presence_spl = explode('|', Config::get($referentiel.'.champsPresence'));
foreach($champs_presence_spl as $champ) {
$label_param_champ = explode(':', $champ);
$tableau_champs_presence[] = array('param' => $label_param_champ[1],
if(count($label_param_champ) >= 2) {
$tableau_champs_presence[] = array('param' => $label_param_champ[1],
'label' => $label_param_champ[0]);
}
}
return $tableau_champs_presence;
}
/trunk/modules/recherche_avancee/RechercheAvancee.php
19,8 → 19,10
$champs_presence_spl = explode('|', $champs_presence);
foreach($champs_presence_spl as $champ) {
$label_param_champ = explode(':', $champ);
$tableau_champs_presence[] = array('param' => $label_param_champ[1],
'label' => $label_param_champ[0]);
if(count($label_param_champ) >= 2) {
$tableau_champs_presence[] = array('param' => $label_param_champ[1],
'label' => $label_param_champ[0]);
}
}
return $tableau_champs_presence;
}
/trunk/modules/recherche_avancee/squelettes/form_recherche_av.tpl.html
91,6 → 91,7
<label> dans </label>
<input placeholder="<?=$i18n['valeur-form-bib']?>" class="champ_autocomplete largeur-06" id="bib" type="text" name="bib" value="<? if(isset($param['bib'])){echo $param['bib'] ;}?>" "/>
</fieldset>
<? if(count($champs_presence) > 0) { ?>
<fieldset class="presence_form">
<legend> Présence </legend>
<br/>
137,6 → 138,7
<br/> <br/>
<? endforeach; ?>
</fieldset>
<?php } ?>
<fieldset class="statuts_form">
<legend> Statuts </legend>
<br/>
/trunk/modules/fiche/squelettes/fiche_synthese_niveau1.tpl.html
407,11 → 407,15
<a class="titreOnglet lien-onglet-synthese" href="<?=$url;?>repartition">Répartition</a>
</h3>
<div id="contenu-3" class="contenu">
<h4>Observations</h4>
<img src="<?=htmlentities($repartition['eflore'])?>" alt="Carte des observations" style="margin-left: 11px; width: 190px;" />
<h4>Répartition départementale</h4>
<img src="<?=htmlentities($repartition['chorodep'])?>" alt="Carte de répartition"/>
<br />
<? if ($referentiel != "bdtxa" && $repartition['eflore'] != null) : ?>
<h4>Observations</h4>
<img src="<?=htmlentities($repartition['eflore'])?>" alt="Carte des observations" style="margin-left: 11px; width: 190px;" />
<? endif; ?>
<? if ($repartition['chorodep'] != null) : ?>
<h4>Répartition départementale</h4>
<img src="<?=htmlentities($repartition['chorodep'])?>" alt="Carte de répartition"/>
<? endif; ?>
<br/>
<a href="<?=$url;?>repartition" class="lien_ouverture_onglet_parent" id="alignement-droite">
Voir +/Compléter
</a>
/trunk/modules/fiche/squelettes/fiche_synthese_niveau2.tpl.html
407,13 → 407,15
<a class="titreOnglet lien-onglet-synthese" href="<?=$url;?>repartition">Répartition</a>
</h3>
<div id="contenu-3" class="contenu">
<? if ($referentiel != "bdtxa") : ?>
<h4>Observations</h4>
<img src="<?=htmlentities($repartition['eflore'])?>" alt="Carte des observations" style="margin-left: 11px; width: 190px;" />
<? endif; ?>
<h4>Répartition départementale</h4>
<img src="<?=htmlentities($repartition['chorodep'])?>" alt="Carte de répartition"/>
<br/>
<? if ($referentiel != "bdtxa" && $repartition['eflore'] != null) : ?>
<h4>Observations</h4>
<img src="<?=htmlentities($repartition['eflore'])?>" alt="Carte des observations" style="margin-left: 11px; width: 190px;" />
<? endif; ?>
<? if ($repartition['chorodep'] != null) : ?>
<h4>Répartition départementale</h4>
<img src="<?=htmlentities($repartition['chorodep'])?>" alt="Carte de répartition"/>
<? endif; ?>
<br/>
<a href="<?=$url;?>repartition" class="lien_ouverture_onglet_parent" id="alignement-droite">
Voir +/Compléter
</a>
/trunk/modules/fiche/squelettes/fiche_nomenclature.tpl.html
1,5 → 1,5
<div id="nomenclature">
<h2>Nom retenu <?php if ($referentiel != "bdtxa") : ?> (taxon modifié le : <?= $date_maj ?>)<? endif; ?></h2>
<h2>Nom retenu <?php if (trim($date_maj) != "") : ?> (taxon modifié le : <?= $date_maj ?>)<? endif; ?></h2>
<div style="float:right">
<div class="legende">
<b>Légende</b><br />
/trunk/modules/fiche/squelettes/fiche_synthese_niveau3.tpl.html
403,10 → 403,15
<a class="titreOnglet lien-onglet-synthese" href="<?=$url;?>repartition">Répartition</a>
</h3>
<div id="contenu-3" class="contenu">
<h4>Observations</h4>
<img src="<?=htmlentities($repartition['eflore'])?>" alt="Carte des observations" style="margin-left: 11px; width: 190px;" />
<h4>Répartition départementale</h4>
<img src="<?=htmlentities($repartition['chorodep'])?>" alt="Carte de répartition"/>
<? if ($referentiel != "bdtxa" && $repartition['eflore'] != null) : ?>
<h4>Observations</h4>
<img src="<?=htmlentities($repartition['eflore'])?>" alt="Carte des observations" style="margin-left: 11px; width: 190px;" />
<? endif; ?>
<? if ($repartition['chorodep'] != null) : ?>
<h4>Répartition départementale</h4>
<img src="<?=htmlentities($repartition['chorodep'])?>" alt="Carte de répartition"/>
<? endif; ?>
<br/>
<a href="<?=$url;?>repartition" class="lien_ouverture_onglet_parent" id="alignement-droite">
Voir +/Compléter
</a>
/trunk/modules/fiche/formateurs/Illustrations.php
53,8 → 53,9
}
// --
$this->setCheminSquelette('modules/fiche/squelettes/'); // @FIXME le chemin devrait déjà être défini correctement !?
$this->donnees['illustrationsOrganes'] = $this->getVue('fiche_illustrations_organes',
array('organes' => $pso, 'nnr' => $this->donnees['nnr'], 'nomComplet' => $this->donnees['nomComplet']));
$params = array('organes' => $pso, 'nnr' => $this->donnees['nnr'], 'nomComplet' => $this->donnees['nomComplet']);
$this->donnees['illustrationsOrganes'] = $this->getVue('fiche_illustrations_organes',$params);
// chemins
$this->donnees['base_url_widget'] = Config::get('base_url_widget');
$this->donnees['base_url_del'] = Config::get('base_url_del');
156,13 → 157,7
}
public function getPhotosSixOrganes() {
$organes = array(
'fleur' => array(),
'feuille' => array(),
'fruit' => array(),
'ecorce' => array(),
'port' => array(),
'rameau' => array());
$organes = $this->getOrganes();
$nnr = $this->nomCourant->getNnr();
$infosOrganes = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CAPITALISATION, 6, 'CRX2S');
$vide = true;
183,13 → 178,7
}
public function getPhotosOrganes() {
$organes = array(
'fleur' => array(),
'feuille' => array(),
'fruit' => array(),
'ecorce' => array(),
'port' => array(),
'rameau' => array());
$organes = $this->getOrganes();
$nnr = $this->nomCourant->getNnr();
$infosOrganes = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CAPITALISATION, 1);
$vide = true;
210,12 → 199,22
public function getPhotosCaracteresIdentification() {
$caracteres = array();
$nnr = $this->nomCourant->getNnr();
$infosCaracteres = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CARACTERES, 3);
$infosCaracteres = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($this->getOrganes()), Eflore::PROTOCOLE_CARACTERES, 3);
if (! empty($infosCaracteres) && ! empty($infosCaracteres[''])) { // le tag est vide, ici
$caracteres = $infosCaracteres[''];
$caracteres = $infosCaracteres;
}
$this->donnees['caracteres'] = $caracteres;
}
private function getOrganes() {
return array(
'fleur' => array(),
'feuille' => array(),
'fruit' => array(),
'ecorce' => array(),
'port' => array(),
'rameau' => array());
}
 
// XXX: webservice:
// /service:eflore:0.1/cel/images?masque.nn=XXX&referentiel=bdtfx&retour.format=CS&navigation.limite=801
/trunk/modules/fiche/formateurs/Repartition.php
125,25 → 125,36
}
private function getChorodepMiniature() {
$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();
$projetRepartition = Config::get($this->referentiel.'.baseRepartition');
$url = null;
if ($projetRepartition != "") {
$this->cartes->setProjet($projetRepartition);
$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);
$url = $this->cartes->getUrlPng();
}
return $url;
}
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();
$projetMoissonnage = Config::get($this->referentiel.'.baseMoissonnage');
$url = null;
if ($projetRepartition != "") {
$this->cartes->setProjet('moissonnage');
$this->cartes->setLargeur('190');
$this->cartes->setInfoReferentiel($this->referentiel);
$this->cartes->setInfoNom($this->nomCourant->getNt());
$url = $this->cartes->getUrlMapPng();
}
return $url;
}
}
?>
/trunk/modules/fiche/formateurs/Description.php
56,12 → 56,13
}
private function getDescriptionsDependantesReferentiel($ref) {
// eg: [bdtfx]baseDescription = coste,baseflor dans bdtfx.ini
$bases_descriptions = explode(',', Config::get($ref . '.baseDescription'));
foreach ($bases_descriptions as $base) {
$fonction = 'get'.ucfirst($base);
$this->$fonction();
if(trim(Config::get($ref . '.baseDescription')) != "") {
// eg: [bdtfx]baseDescription = coste,baseflor dans bdtfx.ini
$bases_descriptions = explode(',', Config::get($ref . '.baseDescription'));
foreach ($bases_descriptions as $base) {
$fonction = 'get'.ucfirst($base);
$this->$fonction();
}
}
}
/trunk/modules/fiche/formateurs/Ethnobotanique.php
96,11 → 96,11
static function traiterChampsStatuts($ref, $tableau_donnees, $code, $valeur) {
if ($code == 'statut_origine.libelle') {
$tableau_donnees['Statut d\'origine'][$ref == 'bdtfx' ? 'France' : 'Antilles'] = $valeur;
$tableau_donnees['Statut d\'origine'][self::obtenirIntituleLieuPourReferentiel($ref)] = $valeur;
} elseif ($code == 'statut_introduction.libelle') {
$tableau_donnees['Statut d\'introduction'][$ref == 'bdtfx' ? 'France' : 'Antilles'] = $valeur;
$tableau_donnees['Statut d\'introduction'][self::obtenirIntituleLieuPourReferentiel($ref)] = $valeur;
} elseif ($code == 'statut_culture.libelle') {
$tableau_donnees['Statut de culture'][$ref == 'bdtfx' ? 'France' : 'Antilles'] = $valeur;
$tableau_donnees['Statut de culture'][self::obtenirIntituleLieuPourReferentiel($ref)] = $valeur;
}
return $tableau_donnees;
113,10 → 113,10
// ignore les paramètres JSON de présence qui ne contiennent pas le libellé
// (= présence en toutes lettres)
if(substr($str, -7) != 'libelle') return NULL;
list($prefixe, $lieu) = explode('_', $str, 2);
@list($prefixe, $lieu) = explode('_', $str, 2);
 
if($str == 'presence.libelle') {
return $ref == 'bdtfx' ? 'France' : 'Antilles';
return self::obtenirIntituleLieuPourReferentiel($ref);
}
 
list($lieu, $param) = explode('.', $lieu, 2);
130,6 → 130,21
return NULL;
}
private static function obtenirIntituleLieuPourReferentiel($ref) {
$lieu = '';
switch($ref) {
case 'bdtfx':
$lieu = 'France';
break;
case 'bdtxa':
$lieu = 'Antilles';
case 'isfan':
$lieu = 'Afrique du Nord';
break;
}
return $lieu;
}
private function getWikini() {
$wikini = array();
$wikini['titre'] = 'Wikini';