Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 86 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 86 Rev 97
Line 1... Line 1...
1
<?php
1
<?php
2
class RechercheSimple extends aControleur {
2
class RechercheSimple extends aControleur {
3
	
3
 
4
	//+----------------------------------------------------------------------------------------------------------------+
4
	//+----------------------------------------------------------------------------------------------------------------+
5
	// Méthodes
5
	// Méthodes
6
	/**
6
	/**
7
	 * Fonction d'affichage par défaut
7
	 * Fonction d'affichage par défaut
8
	 */
8
	 */
9
	
9
 
10
	
10
 
11
	public function executerActionParDefaut() {
11
	public function executerActionParDefaut() {
12
		$this->executerAccueil();
12
		$this->executerAccueil();
13
	}
13
	}
14
	
14
 
15
	public function executerAccueil() {
15
	public function executerAccueil() {
16
		$donnees = array();
16
		$donnees = array();
17
		$donnees['form_nom'] = $this->executerFormulaireNom();
17
		$donnees['form_nom'] = $this->executerFormulaireNom();
18
		$this->afficherAccueil($donnees);
18
		$this->afficherAccueil($donnees);
19
	}
19
	}
20
	
20
 
21
	private function afficherAccueil($donnees) {
21
	private function afficherAccueil($donnees) {
22
		$donnees['i18n'] = I18n::get('Recherche-accueil');		
22
		$donnees['i18n'] = I18n::get('Recherche-accueil');
23
		$this->setSortie(self::RENDU_CORPS, $this->getVue('recherche_accueil', $donnees));
23
		$this->setSortie(self::RENDU_CORPS, $this->getVue('recherche_accueil', $donnees));
24
	}
24
	}
25
	
25
 
26
	public function executerFormulaireNom($donnees = array()) {
26
	public function executerFormulaireNom($donnees = array()) {
27
		if (Config::get(Registre::get('parametres.referentiel').'.referentielVerna')) {
27
		if (Config::get(Registre::get('parametres.referentiel').'.referentielVerna')) {
28
			if (!isset($donnees['type_nom'])) {
28
			if (!isset($donnees['type_nom'])) {
29
				$donnees['type_nom'] = (Registre::get('parametres.niveau') == 1) ? 'nom_vernaculaire' : 'nom_scientifique';
29
				$donnees['type_nom'] = (Registre::get('parametres.niveau') == 1) ? 'nom_vernaculaire' : 'nom_scientifique';
30
			}
30
			}
31
			$donnees['nom_verna'] = true;
31
			$donnees['nom_verna'] = true;
32
		}
32
		}
33
		
33
 
-
 
34
		$donnees['url_form'] = $this->obtenirUrlBase();
34
		$donnees['i18n'] = I18n::get('Recherche-form-nom');
35
		$donnees['i18n'] = I18n::get('Recherche-form-nom');
35
		
36
 
36
		return $this->getVue('form_nom', $donnees);
37
		return $this->getVue('form_nom', $donnees);
37
	}
38
	}
38
	
39
 
39
	public function executerForm() {
40
	public function executerForm() {
40
		$donnees = Registre::get('donneesMoteur');
41
		$donnees = Registre::get('donneesMoteur');
41
		$donnees['form_nom'] = $this->executerFormulaireNom($donnees);
42
		$donnees['form_nom'] = $this->executerFormulaireNom($donnees);
42
		$this->afficherAccueil($donnees);
43
		$this->afficherAccueil($donnees);
43
		Registre::detruire('donneesMoteur');
44
		Registre::detruire('donneesMoteur');
44
	}
45
	}
45
	
-
 
Line -... Line 46...
-
 
46
 
46
 
47
 
47
	
48
 
48
}
49
}
49
?>
50
?>