100,8 → 100,8 |
",botanique,plante,description,ecologie,reconnaitre,fiche espece"); |
|
$nom_sci_html = $this->nom_retenu->get('nom_sci_html'); |
// la recherche avancée à partir du clic sur le nom ne fonctionne pas sur les hybrides |
$nom_sci_html = strpos($nom_sci_html, 'class="hyb"') === false ? |
// la recherche avancée à partir du clic sur le nom ne fonctionne pas sur les hybrides |
$nom_sci_html = strpos($nom_sci_html, 'class="hyb"') === false ? |
$this->formaterLiensNomsHtml($nom_sci_html) : $nom_sci_html; |
|
// titre de la fiche |
125,7 → 125,7 |
|
// onglet |
$donnees['onglet'] = $this->onglet; |
$donnees['niveau'] = $niveau; |
$donnees['niveau'] = $niveau; |
$donnees['base_url_onglets'] = Config::get('base_url_application_onglets'); |
|
$taxons = new Taxons(); |
142,12 → 142,12 |
} |
|
public function executerTemplateAjax() { |
$classe = ucfirst($this->onglet); |
$classe = ucfirst($this->onglet); |
$onglet = new $classe($this->conteneur); |
$action = 'obtenir'.ucfirst($_GET['sous_action']); |
$html_ajax = $onglet->$action(); |
header('Content-type : text/html'); |
echo $html_ajax; |
echo $html_ajax; |
exit; |
} |
|
156,8 → 156,8 |
$params = array(); |
$classes_recherche = array("fam" => "fam", "gen" => "gen", "sp" => "sp", "infra-sp" => "ssp"); |
|
$doc = new DOMDocument(); |
$doc->loadHTML($nom_sci_html); |
$doc = new DOMDocument(); |
$doc->loadHTML($nom_sci_html); |
$spans = $doc->getElementsByTagName('span'); |
$abbrs = $doc->getElementsByTagName('abbr'); |
|
165,15 → 165,15 |
|
$i18n = I18n::get('Fiche'); |
|
//TODO: c'est un peu moche, la fonction est surement factorisable |
if ($spans->length > 0) { |
//TODO: c'est un peu moche, la fonction est surement factorisable |
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; |
if($classe == "sp") { |
$params_subsp = $params; |
} |
$lien_tpl = html_entity_decode($this->url->obtenirUrlRechercheAvancee($params)); |
$texte_lien = $span->nodeValue; |
182,10 → 182,10 |
$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'); |
$text->setAttribute('class', 'lien_recherche_hier'); |
$span->appendChild($text); |
} |
} |
} |
} |
|
if ($abbrs->length > 0) { |
192,14 → 192,14 |
foreach($abbrs as $abbr) { |
$classe = $abbr->getAttribute('class'); |
$params_subsp["type"] = $abbr->nodeValue; |
$lien_tpl = html_entity_decode($this->url->obtenirUrlRechercheAvancee($params_subsp)); |
$texte_lien = $abbr->nodeValue; |
|
$abbr->nodeValue = ""; |
$text = $doc->createElement('a', $texte_lien); |
$text->setAttribute('href', $lien_tpl); |
$text->setAttribute('title', $i18n["lien-recherche-hier-ssp"]); |
$text->setAttribute('class', 'lien_recherche_hier'); |
$lien_tpl = html_entity_decode($this->url->obtenirUrlRechercheAvancee($params_subsp)); |
$texte_lien = $abbr->nodeValue; |
|
$abbr->nodeValue = ""; |
$text = $doc->createElement('a', $texte_lien); |
$text->setAttribute('href', $lien_tpl); |
$text->setAttribute('title', $i18n["lien-recherche-hier-ssp"]); |
$text->setAttribute('class', 'lien_recherche_hier'); |
$abbr->appendChild($text); |
} |
} |
233,6 → 233,7 |
'wiki' => $description->getLienWikini(), |
'nom_retenu' => $this->nom_retenu->get('nom_sci'), |
'mobile' => $urlMobile, |
'baseUrlIco' => Registre::get('eFlore.urlBaseDossier')->getUrl() . '/', |
'qr_code_png' => $this->obtenirUrlQrCode($urlMobile) |
); |
$this->setSortie(self::RENDU_CORPS, $this->getVue('fiche_pied_page', $donnees), true); |