Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1613 Rev 1629
Line 158... Line 158...
158
 
158
 
159
	public function executerTaxons() {
159
	public function executerTaxons() {
160
		$widget['squelette'] = $this->projet.'_taxons';
160
		$widget['squelette'] = $this->projet.'_taxons';
161
		$widget['squelette_ext'] = '.tpl.js';
161
		$widget['squelette_ext'] = '.tpl.js';
162
		$widget['donnees'] = array();
162
		$widget['donnees'] = array();
-
 
163
		$nomsAAfficher = $this->recupererListeNomsSci();
-
 
164
		$taxons_tries = array();
-
 
165
		foreach ($taxons as $taxon) {
-
 
166
			$taxons_tries[$taxon['num_nom_sel']] = $taxon;
163
		$nomsAAfficher = $this->recupererListeNomsSci();
167
		}
164
		$widget['donnees']['taxons'] = json_encode($nomsAAfficher);
168
		$widget['donnees']['taxons'] = json_encode($taxons_tries);
165
		return  $widget;
169
		return $widget;
Line 166... Line 170...
166
	}
170
	}
167
 
171
 
168
	private function recupererListeNomsSci() {
-
 
169
		$taxons = $this->recupererListeTaxon();
172
	private function recupererListeNomsSci() {
170
		$nomsAAfficher = array();
173
		$taxons = $this->recupererListeTaxon();
171
		if (is_array($taxons)) {
-
 
172
			$taxons = self::trierTableauMd($taxons, array('nom_fr' => SORT_ASC));
-
 
173
			foreach ($taxons as $taxon) {
-
 
174
				$nomsAAfficher[$taxon['num_nom_sel']] = $taxon;
174
		if (is_array($taxons)) {
175
			}
175
			$taxons = self::trierTableauMd($taxons, array('nom_fr' => SORT_ASC));
176
		}
176
		}
Line 177... Line 177...
177
		return $nomsAAfficher;
177
		return $taxons;
178
	}
178
	}
179
 
179
 
Line 212... Line 212...
212
						'nom_type' => 'nom-fr');
212
						'nom_type' => 'nom-fr');
213
				}
213
				}
214
			}
214
			}
215
			$nomsAAfficher = self::trierTableauMd($nomsAAfficher, array('nom_a_afficher' => SORT_ASC));
215
			$nomsAAfficher = self::trierTableauMd($nomsAAfficher, array('nom_a_afficher' => SORT_ASC));
216
			$nomsSpeciaux = self::trierTableauMd($nomsSpeciaux, array('nom_a_afficher' => SORT_ASC));
216
			$nomsSpeciaux = self::trierTableauMd($nomsSpeciaux, array('nom_a_afficher' => SORT_ASC));
217
			$nomsAAfficher = array_merge($nomsAAfficher, $nomsSpeciaux);
-
 
218
		}
217
		}
219
		return array('speciaux' => $nomsSpeciaux, 'sci-et-fr' => $nomsAAfficher);
218
		return array('speciaux' => $nomsSpeciaux, 'sci-et-fr' => $nomsAAfficher);
220
	}
219
	}
Line 221... Line 220...
221
 
220