Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 1476 → Rev 1477

/trunk/modules/fiche/Fiche.php
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);
/trunk/modules/fiche/formateurs/Description.php
185,7 → 185,9
$this->textes->setProjet('coste');
$this->textes->setId('bdtfx.nt:'.$this->nomCourant->getNt());
$texte = $this->textes->getTexte();
$texte = array_pop($texte['resultats']);
if (! empty($texte['resultats'])) {
$texte = array_pop($texte['resultats']);
}
if ($texte) {
$coste['titre'] = $texte['titre'];
$coste['description'] = self::mettreEnFormeCoste($texte['texte']);
/trunk/modules/fiche/formateurs/Statut.php
69,8 → 69,10
if ($projet != "") {
$nnr = $this->nomCourant->getNnr();
$reponse = $this->statuts->getStatutsZoneGeo($projet, $nnr);
foreach ($reponse as $statut) {
$statuts[$statut['type_protection']][] = $statut['zone_application'];
if (! empty($reponse)) {
foreach ($reponse as $statut) {
$statuts[$statut['type_protection']][] = $statut['zone_application'];
}
}
$this->meta->setProjet($projet);
$meta = $this->meta->getMetaDonnees();
/trunk/modules/fiche/squelettes/fiche_accueil_niveau2.tpl.html
20,7 → 20,7
</h2>
<div class="categories">
 
<? $url = htmlentities(Registre::get('eFlore.index') . '?referentiel='.Registre::get('parametres.referentiel').'&niveau='.Registre::get('parametres.niveau').'&module=fiche&action=fiche&num_nom='.$num_nom.'&type_nom='.$type_nom.'&nom='.$nom.'&onglet=');?>
<? $url = htmlentities(Registre::get('eFlore.urlBase')->getUrl() . Registre::get('eFlore.index') . '?referentiel='.Registre::get('parametres.referentiel').'&niveau='.Registre::get('parametres.niveau').'&module=fiche&action=fiche&num_nom='.$num_nom.'&type_nom='.$type_nom.'&nom='.$nom.'&onglet=');?>
<ul class="categories-items">
<li class="categories-item <?= ($onglet == 'synthese') ? 'est-active' : '' ;?>" title="<?=$i18n['onglet-descr-synth']?>" id="onglet_synthese">
<h3 class="categories-item-titre"><a class="categories-item-lien" rel="synthese" href="<?=$url;?>synthese">