Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 75 → Rev 76

/trunk/controleurs/aControleur.php
209,8 → 209,8
private function getParametresUrlRecherche() {
$parametres = array(
'referentiel' => Registre::get('parametres.referentiel'),
'module' => 'recherche-simple',
'action' => 'rechercheNom',
'module' => 'recherche',
'action' => 'rechercheSimple',
'submit' => 'Rechercher'
);
return $parametres;
218,7 → 218,6
protected function obtenirUrlRechercheSimple($nom = null, $type = 'nom_scientifique') {
$parametres = $this->getParametresUrlRecherche();
$parametres['module'] = 'recherche-simple';
$parametres['type_nom'] = $type;
$parametres['nom'] = $nom;
$this->urlBase->setRequete($parametres);
/trunk/modules/recherche/Recherche.php
7,8 → 7,8
* Fonction d'affichage par défaut
*/
public function executerActionParDefaut() {
$rechercheAccueil = $this->executerAction('recherche-simple', 'accueil');
$this->setSortie(self::RENDU_CORPS, $rechercheAccueil);
$this->executerAction('RechercheSimple', 'executerAccueil');
}
 
public function executerRechercheSimple() {
28,8 → 28,11
$donnees['url_nom_approche'] = $this->obtenirUrlRechercheSimple($presence, $donnees['type_nom']);
}
}
Registre::set('donnees', $donnees);
$this->executerAction('recherche_simple', 'executerForm');
Registre::set('donneesMoteur', $donnees);
$this->executerAction('RechercheSimple', 'executerForm');
if ($presence == 'ok') {
$this->executerAction('Resultat', 'executerResultat');
}
}
// regarde si il y a des résultats correspondant au nom recherché sinon recherche un nom approché
48,6 → 51,7
$url = $this->obtenirUrlFiche($ids[0]);
$this->redirigerVers($url);
} else { // affiche les résultats
Registre::set('resultats', $res);
$approche = 'ok';
}
return $approche;
/trunk/modules/recherche_simple/RechercheSimple.php
19,8 → 19,7
}
private function afficherAccueil($donnees) {
$donnees['i18n'] = I18n::get('Recherche-accueil');
$donnees['i18n'] = I18n::get('Recherche-accueil');
$this->setSortie(self::RENDU_CORPS, $this->getVue('recherche_accueil', $donnees));
}
34,9 → 33,10
}
public function executerForm() {
$donnees = Registre::get('donnees');
$donnees = Registre::get('donneesMoteur');
$donnees['form_nom'] = $this->executerFormulaireNom($donnees);
$this->afficherAccueil($donnees);
Registre::detruire('donneesMoteur');
}
 
/trunk/modules/recherche_simple/squelettes/recherche_accueil.tpl.html
1,5 → 1,2
<h2><?=$i18n['titre-nom'];?></h2>
<?=$form_nom;?>
<hr/>
<h2><?=$i18n['titre-taxon'];?></h2>
<?=$form_taxon;?>
/trunk/modules/resultat/squelettes/resultat.tpl.html
New file
0,0 → 1,10
<h1>Résultats trouvés : <?=$nbreTaxons?></h1>
<ol>
<? foreach ($taxons as $id => $taxon) : ?>
<li>
<a href="#">
<?php print_r($taxon); ?>
</a>
</li>
<? endforeach; ?>
</ol>
/trunk/modules/resultat/Resultat.php
New file
0,0 → 1,30
<?php
// declare(encoding='UTF-8');
/**
* Classe mère du module Liste.
*
* @category PHP 5.2
* @package eflore-consultation
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @author Delphine CAUQUIL <delphine@tela-botanica.org>
* @copyright 2011 Tela-Botanica
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
* @version $Id$
*/
class Resultat extends aControleur {
public function executerActionParDefaut() {
$this->executerResultat();
}
public function executerResultat() {
$donnees = array();
$resultats = Registre::get('resultats');
$donnees['nbreTaxons'] = $resultats['entete']['total'];
$donnees['taxons'] = $resultats['resultat'];
$this->setSortie(self::RENDU_CORPS, $this->getVue('resultat', $donnees));
//print_r(Registre::get('resultats'));
}
}
?>