Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 122 → Rev 123

/trunk/i18n/fr.ini
29,7 → 29,9
recherche = "OK"
fiche = "Accès fiche"
referentiel = "Référentiels"
orthographe = "Essayez avec cette orthographe : "
info_nb_lettres = "Veuillez saisir au moins 3 lettres !"
info_sp_abs = "Aucune espèce trouvée avec cette orthographe."
orthographe = "Vous recherchez peut-être : "
 
[Recherche-form-taxon]
titre = "Consulter les plantes par genre/famille"
/trunk/modules/recherche_simple/squelettes/form_nom.tpl.html
37,11 → 37,18
</fieldset>
</form>
 
<?php if (isset($nom_approche)) : ?>
<p id="efr-ortho-approche"> <span class="erreur"><?=$i18n['orthographe'];?></span><a href="<?=$url_nom_approche?>"><?=$nom_approche;?></a></p>
 
<?php if (isset($message)) : ?>
<p class= "<?= ($message['attention']) ? 'attention' : 'information'; ?>">
<?= ($message['attention']) ? $i18n[$message['attention']] : ''; ?>
<?php if (isset($message['nom_approche'])) : ?>
<?=$i18n['orthographe'];?>
<?php foreach ($message['nom_approche'] as $nom) :?>
<a href="<?=$nom['url_nom_approche']?>"><?=$nom['nom'];?></a>
<?php endforeach; ?>
<?php endif; ?>
</p>
<?php endif; ?>
<?php if (isset($information)) : ?>
<p id="information"><?=$information?></p>
<?php endif; ?>
 
 
<!-- FIN FORM_NOM -->
/trunk/modules/recherche/Recherche.php
21,14 → 21,16
$donnees['type_nom'] = $this->type_nom;
$donnees['nom'] = $this->nom;
if (strlen($donnees['nom']) < 3) {
$donnees['information'] = 'Veuillez saisir un radical contenant au moins 3 caractères alphabétiques !';
$donnees['message']['attention'] = 'info_nb_lettres';
} else {
$presence = $this->rechercherNom();
if ($presence == '') {
$donnees['information'] = 'Nom inconnu';
} elseif ($presence != 'ok') {
$donnees['nom_approche'] = $presence;
$donnees['url_nom_approche'] = $this->obtenirUrlRechercheSimple($presence, $donnees['type_nom']);
if ($presence == '') { // s'il n'y a pas de nom
$donnees['message']['attention'] = 'info_sp_abs';
} elseif ($presence != 'ok') { // s'il y a des noms approchés
if (!Registre::get('resultats')) { // s'il n'y a aucun nom exact
$donnees['message']['attention'] = 'info_sp_abs';
}
$donnees['message']['nom_approche'] = $presence;
}
}
Registre::set('donneesMoteur', $donnees);
57,7 → 59,7
$res['type'] = $this->type_nom;
Registre::set('resultats', $res);
$approche = 'ok';
if ($res['entete']['total'] < 16) { // si moins de 16 noms affiche en plus un nom approché
if ($res['entete']['total'] < 3) { // si moins de 16 noms affiche en plus un nom approché
$approche = $this->rechercherNomApproche($noms);
}
}
68,8 → 70,11
$approche = '';
$res = $noms->getRechercheFloue($this->nom);
if (!($res == false || $res['entete']['total'] == 0)) {
$nom_proche = array_shift($res['resultat']);
$approche = ($this->type_nom == 'nom_vernaculaire') ? $nom_proche['nom'] : $nom_proche['nom_sci'];
for ($i = 0; $i < 3; $i++) {
$nom_proche = array_shift($res['resultat']);
$approche[$i]['nom'] = ($this->type_nom == 'nom_vernaculaire') ? $nom_proche['nom'] : $nom_proche['nom_sci'];
$approche[$i]['url_nom_approche'] = $this->obtenirUrlRechercheSimple($approche, $this->type_nom);
}
}
return $approche;
}