Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 1281 Rev 1303
Line 154... Line 154...
154
	
154
	
155
	public function getPhotosSixOrganes() {
155
	public function getPhotosSixOrganes() {
156
		$organes = $this->getOrganes();
156
		$organes = $this->getOrganes();
157
		$nnr = $this->nomCourant->getNnr();
157
		$nnr = $this->nomCourant->getNnr();
-
 
158
		$infosOrganes = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CAPITALISATION, 6, 'CRX2S');
158
		$infosOrganes = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CAPITALISATION, 6, 'CRX2S');
159
		
159
		$vide = true;
160
		$vide = true;
160
		foreach ($infosOrganes as $tag => $organe) {
161
		foreach ($infosOrganes as $tag => $organe) {
161
			$organes[$tag] = $organe;
162
			$organes[$tag] = $organe;
162
			$nbImages = count($organe);
163
			$nbImages = count($organe);
Line 168... Line 169...
168
			}
169
			}
169
		}
170
		}
170
		if ($vide) {
171
		if ($vide) {
171
			$organes = array();
172
			$organes = array();
172
		}
173
		}
-
 
174
		
173
		return $organes;
175
		return $organes;
174
	}
176
	}
Line 175... Line 177...
175
	
177
	
176
	public function getPhotosOrganes() {
178
	public function getPhotosOrganes() {
Line 231... Line 233...
231
			$infosImg['date'] = $this->formaterDateImg($img['date']);
233
			$infosImg['date'] = $this->formaterDateImg($img['date']);
232
			$infosImg['auteur'] = $img['auteur.libelle'];
234
			$infosImg['auteur'] = $img['auteur.libelle'];
233
			$infosImg['auteur.id'] = $img['auteur.id'];
235
			$infosImg['auteur.id'] = $img['auteur.id'];
234
			if ($projet == "cel") {
236
			if ($projet == "cel") {
235
				$infosImg['urlDetailImg'] = $this->appUrls->obtenirUrlPopUpIllustrations($idImg);
237
				$infosImg['urlDetailImg'] = $this->appUrls->obtenirUrlPopUpIllustrations($idImg);
-
 
238
				$infosImg['urlImgGrandFormat'] = $this->obtenirUrlImageGrandFormatCel($idImg);
236
				$infosImg['urlContact'] = $this->appUrls->obtenirUrlPopUpContact($img['auteur.id'], $idImg);
239
				$infosImg['urlContact'] = $this->appUrls->obtenirUrlPopUpContact($img['auteur.id'], $idImg);
237
				$infosImg['urlProfil'] = $this->appUrls->obtenirUrlProfilAnnuaire($img['auteur.id']);
240
				$infosImg['urlProfil'] = $this->appUrls->obtenirUrlProfilAnnuaire($img['auteur.id']);
238
				$infosImg['urlMauvaiseIdentification'] =  $this->appUrls->obtenirUrlMauvaiseIdentification($img['observation.id']);
241
				$infosImg['urlMauvaiseIdentification'] =  $this->appUrls->obtenirUrlMauvaiseIdentification($img['observation.id']);
239
			}
242
			}
240
			$this->donnees[$projet]['images'][$idImg] = $infosImg;
243
			$this->donnees[$projet]['images'][$idImg] = $infosImg;
241
		}
244
		}
242
	}
245
	}
Line -... Line 246...
-
 
246
	
-
 
247
	private function obtenirUrlImageGrandFormatCel($id, $format = "X3L") {
-
 
248
		$tpl = Config::get('baseUrlImageCelTpl');
-
 
249
		return sprintf($tpl, str_pad($id, 9, '0', STR_PAD_LEFT).$format.'.jpg');
-
 
250
	}
-
 
251
	
-
 
252
	// XXX: public static pour ĂȘtre injectĂ© dans le squelette d'entete
-
 
253
	public static function obtenirTemplateUrlImageGrandFormatOrganes($format = "X3L") {
-
 
254
		return $tpl = sprintf(Config::get('baseUrlImageCelTpl').$format.'.jpg', '{id_image}');
-
 
255
	}
243
	
256
	
244
	private function formaterMetaPhotos($projet) {
257
	private function formaterMetaPhotos($projet) {
245
		$this->meta->setProjet($projet);
258
		$this->meta->setProjet($projet);
246
		$meta = $this->meta->getMetaDonnees();
259
		$meta = $this->meta->getMetaDonnees();
247
		$titreMeta = $meta[0];
260
		$titreMeta = $meta[0];