Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 1156 Rev 1165
Line 51... Line 51...
51
			$image['binaire.href'] = str_replace('CRX2S', 'CRS', $image['binaire.href']);
51
			$image['binaire.href'] = str_replace('CRX2S', 'CRS', $image['binaire.href']);
52
			$this->donnees['organes'][$organe] = $image;
52
			$this->donnees['organes'][$organe] = $image;
53
		}
53
		}
54
		// --
54
		// --
55
		$this->setCheminSquelette('modules/fiche/squelettes/'); // @FIXME le chemin devrait déjà être défini correctement !?
55
		$this->setCheminSquelette('modules/fiche/squelettes/'); // @FIXME le chemin devrait déjà être défini correctement !?
56
		$this->donnees['illustrationsOrganes'] = $this->getVue('fiche_illustrations_organes',
56
		$params = array('organes' => $pso, 'nnr' => $this->donnees['nnr'], 'nomComplet' => $this->donnees['nomComplet']);
57
				array('organes' => $pso, 'nnr' => $this->donnees['nnr'], 'nomComplet' => $this->donnees['nomComplet']));
57
		$this->donnees['illustrationsOrganes'] = $this->getVue('fiche_illustrations_organes',$params);
-
 
58
		
58
		// chemins
59
		// chemins
59
		$this->donnees['base_url_widget'] = Config::get('base_url_widget');
60
		$this->donnees['base_url_widget'] = Config::get('base_url_widget');
60
		$this->donnees['base_url_del'] = Config::get('base_url_del');
61
		$this->donnees['base_url_del'] = Config::get('base_url_del');
61
		return $this->donnees;
62
		return $this->donnees;
62
	}
63
	}
Line 154... Line 155...
154
			}
155
			}
155
		}
156
		}
156
	}
157
	}
Line 157... Line 158...
157
	
158
	
158
	public function getPhotosSixOrganes() {
159
	public function getPhotosSixOrganes() {
159
		$organes = array(
-
 
160
				'fleur' => array(),
-
 
161
				'feuille' => array(),
-
 
162
				'fruit' => array(),
-
 
163
				'ecorce' => array(),
-
 
164
				'port' => array(),
-
 
165
				'rameau' => array());
160
		$organes = $this->getOrganes();
166
		$nnr = $this->nomCourant->getNnr();
161
		$nnr = $this->nomCourant->getNnr();
167
		$infosOrganes = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CAPITALISATION, 6, 'CRX2S');
162
		$infosOrganes = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CAPITALISATION, 6, 'CRX2S');
168
		$vide = true;
163
		$vide = true;
169
		foreach ($infosOrganes as $tag => $organe) {
164
		foreach ($infosOrganes as $tag => $organe) {
Line 181... Line 176...
181
		}
176
		}
182
		return $organes;
177
		return $organes;
183
	}
178
	}
Line 184... Line 179...
184
	
179
	
185
	public function getPhotosOrganes() {
180
	public function getPhotosOrganes() {
186
		$organes = array(
-
 
187
				'fleur' => array(),
-
 
188
				'feuille' => array(),
-
 
189
				'fruit' => array(),
-
 
190
				'ecorce' => array(),
-
 
191
				'port' => array(),
-
 
192
				'rameau' => array());
181
		$organes = $this->getOrganes();
193
		$nnr = $this->nomCourant->getNnr();
182
		$nnr = $this->nomCourant->getNnr();
194
		$infosOrganes = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CAPITALISATION, 1);
183
		$infosOrganes = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CAPITALISATION, 1);
195
		$vide = true;
184
		$vide = true;
196
		foreach ($infosOrganes as $tag => $organe) {
185
		foreach ($infosOrganes as $tag => $organe) {
Line 208... Line 197...
208
	}
197
	}
Line 209... Line 198...
209
	
198
	
210
	public function getPhotosCaracteresIdentification() {
199
	public function getPhotosCaracteresIdentification() {
211
		$caracteres = array();
200
		$caracteres = array();
212
		$nnr = $this->nomCourant->getNnr();
201
		$nnr = $this->nomCourant->getNnr();
213
		$infosCaracteres = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CARACTERES, 3);
202
		$infosCaracteres = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($this->getOrganes()), Eflore::PROTOCOLE_CARACTERES, 3);
214
		if (! empty($infosCaracteres) && ! empty($infosCaracteres[''])) { // le tag est vide, ici
203
		if (! empty($infosCaracteres) && ! empty($infosCaracteres[''])) { // le tag est vide, ici
215
			$caracteres = $infosCaracteres[''];
204
			$caracteres = $infosCaracteres;
216
		}
205
		}
217
		$this->donnees['caracteres'] = $caracteres;
206
		$this->donnees['caracteres'] = $caracteres;
-
 
207
	}
-
 
208
	
-
 
209
	private function getOrganes() {
-
 
210
		return array(
-
 
211
				'fleur' => array(),
-
 
212
				'feuille' => array(),
-
 
213
				'fruit' => array(),
-
 
214
				'ecorce' => array(),
-
 
215
				'port' => array(),
-
 
216
				'rameau' => array());
Line 218... Line 217...
218
	}
217
	}
219
 
218
 
220
	// XXX: webservice:
219
	// XXX: webservice:
221
	// /service:eflore:0.1/cel/images?masque.nn=XXX&referentiel=bdtfx&retour.format=CS&navigation.limite=801
220
	// /service:eflore:0.1/cel/images?masque.nn=XXX&referentiel=bdtfx&retour.format=CS&navigation.limite=801