/trunk/modules/fiche/squelettes/fiche_accueil_niveau1.tpl.html |
---|
1,11 → 1,7 |
<?= $entete; ?> |
<div id="bloc-fiche" class="importance4"> |
<h1><span class="nomenclature"><?=$nom_retenu_html?></span> |
<span class="famille nomenclature" style="float: right;"> |
<?php if($famille != '') { ?> |
<a class="lien_recherche_hier" title="<?= $i18n['lien-recherche-hier-fam']; ?>" href="<?= $lien_recherche_famille ?>"> <?= $famille; ?> </a> |
<?php } ?> |
</span> |
<span class="famille nomenclature" style="float: right;"><?=($famille != '') ? $famille : '';?></span> |
<br/> |
<?php if($nom_appele_html): ?> |
<span class="redirige_depuis">Nom retenu du nom recherché <strong><?= $nom_appele_html ?></strong></span> |
/trunk/modules/fiche/squelettes/fiche_accueil_niveau2.tpl.html |
---|
1,11 → 1,7 |
<?= $entete; ?> |
<div id="bloc-fiche" class="importance4"> |
<h1><span class="nomenclature"><?=$nom_retenu_html?></span> |
<span class="famille nomenclature" style="float: right;"> |
<?php if($famille != '') { ?> |
<a class="lien_recherche_hier" title="<?= $i18n['lien-recherche-hier-fam']; ?>" href="<?= $lien_recherche_famille ?>"> <?= $famille; ?> </a> |
<?php } ?> |
</span> |
<span class="famille nomenclature" style="float: right;"><?=($famille != '') ? $famille : '';?></span> |
<br/> |
<?php if($nom_appele_html): ?> |
<span class="redirige_depuis">Nom retenu du nom recherché <strong><?= $nom_appele_html ?></strong></span> |
/trunk/modules/fiche/squelettes/fiche_accueil_niveau3.tpl.html |
---|
1,11 → 1,7 |
<?= $entete; ?> |
<div id="bloc-fiche" class="importance4"> |
<h1><span class="nomenclature"><?=$nom_retenu_html?></span> |
<span class="famille nomenclature" style="float: right;"> |
<?php if($famille != '') { ?> |
<a class="lien_recherche_hier" title="<?= $i18n['lien-recherche-hier-fam']; ?>" href="<?= $lien_recherche_famille ?>"> <?= $famille; ?> </a> |
<?php } ?> |
</span> |
<span class="famille nomenclature" style="float: right;"><?=($famille != '') ? $famille : '';?></span> |
<br/> |
<?php if($nom_appele_html): ?> |
<span class="redirige_depuis">Nom retenu du nom recherché <strong><?= $nom_appele_html ?></strong></span> |
/trunk/modules/fiche/Fiche.php |
---|
100,14 → 100,10 |
",botanique,plante,description,ecologie,reconnaitre,fiche espece"); |
// titre de la fiche |
$nom_html_fmt = $this->nom_retenu->get('nom_sci_html').' '.$this->nom_retenu->get('auteur'); |
$donnees['nom_retenu_html'] = $this->formaterLiensNomsHtml($nom_html_fmt); |
$donnees['nom_retenu_html'] = $this->nom_retenu->get('nom_sci_html').' '.$this->nom_retenu->get('auteur'); |
$donnees['nom_retenu'] = $this->nom_retenu->get('nom_sci'); |
$donnees['nom_appele_html'] = $this->nom_appele_html; |
$famille = $this->nom_retenu->getTaxonSupRang('180'); |
$donnees['lien_recherche_famille'] = html_entity_decode($this->url->obtenirUrlRechercheAvancee(array("fam" => $famille))); |
$donnees['famille'] = $famille; |
$donnees['famille'] = $this->nom_retenu->getTaxonSupRang('180'); |
$donnees['nom_vernaculaire'] = $verna; |
// moteur de recherche |
132,49 → 128,6 |
$this->setSortie(self::RENDU_CORPS, $this->getVue('fiche_accueil_niveau'.$niveau, $donnees), true); |
$this->ajouterPiedDePage(); |
} |
private function formaterLiensNomsHtml($nom_sci_html) { |
$app_urls = new AppUrls(); |
$params = array(); |
$classes_recherche = array("fam" => "fam", "gen" => "gen", "sp" => "sp", "infra-sp" => "ssp"); |
$doc = new DOMDocument(); |
$doc->loadHTML($nom_sci_html); |
$spans = $doc->getElementsByTagName('span'); |
$abbr = $doc->getElementsByTagName('abbr'); |
$params_subsp = array(); |
$i18n = I18n::get('Fiche'); |
if ($spans->length > 0) { |
foreach($spans as $span) { |
$classe = $span->getAttribute('class'); |
if(in_array($classe, array_keys($classes_recherche))) { |
$params[$classes_recherche[$classe]] = $span->nodeValue; |
if($classe == "sp") { |
$params_subsp = $params; |
} |
$lien_tpl = html_entity_decode($this->url->obtenirUrlRechercheAvancee($params)); |
$texte_lien = $span->nodeValue; |
$span->nodeValue = ""; |
$text = $doc->createElement('a', $texte_lien); |
$text->setAttribute('href', $lien_tpl); |
$text->setAttribute('title', $i18n["lien-recherche-hier-".$classe]); |
$text->setAttribute('class', 'lien_recherche_hier'); |
$span->appendChild($text); |
} |
} |
} |
// TODO: gérer le cas du type d'épithète infra-spécifique (qui est une abbréviation |
// et donc la valeur ne correspond pas à ce qu'attend l'url de recherche) |
return $doc->SaveXml(); |
} |
public function ajouterLienModuleExport() { |
$donnees['lien'] = $this->url->obtenirUrlPdfExport($this->parametres['num_nom']); |
/trunk/i18n/fr.ini |
---|
78,12 → 78,6 |
alphab = "Tableau multilingue" |
[Fiche] |
lien-recherche-hier-fam = "Voir les taxons rattachés à cette famille" |
lien-recherche-hier-gen = "Voir les taxons rattachés à ce genre" |
lien-recherche-hier-sp = "Voir les taxons rattachés à ce genre et à cette espèce" |
lien-recherche-hier-ssp = "Voir les taxons rattachés à ce genre et à cette espèce ainsi qu'à ce type d'épithète infra spécifique" |
lien-recherche-hier-infra-sp = "Voir les taxons rattachés à ce genre et à cette espèce ainsi qu'à cet épithète infra spécifique" |
onglet-nom-synth = "Synthèse" |
onglet-nom-descr = "Description" |
onglet-nom-ethnobota = "Ethnobota" |