/trunk/metier/api_0.1/Images.php |
---|
112,23 → 112,17 |
/** |
* Retourne les $limite images ayant le plus de votes pour le protocole $protocole et le(s) tag(s) $tags |
* |
* @param number $nn |
* @param mixed $tags |
* @param number $protocole |
* @param number $limite |
* @return array |
*/ |
public function getInfosMeilleuresImagesParTag($nn, $tags, $protocole = Eflore::PROTOCOLE_CAPITALISATION, $limite = 10) { |
public function getInfosMeilleuresImagesParTag($nn, $tags, $protocole = Eflore::PROTOCOLE_CAPITALISATION, $limite = 10, $format = 'CRS') { |
if (! is_array($tags)) { |
$tags = array($tags); |
} |
$images_tag = array(); |
foreach ($tags as $tag) { |
$url = $this->getUrlMeilleuresImagesParTag($nn, $tag, $protocole, $limite); |
$url = $this->getUrlMeilleuresImagesParTag($nn, $tag, $protocole, $limite, $format); |
$donnees = $this->chargerDonnees($url); |
$images = (isset($donnees['resultats'])) ? $donnees['resultats'] : array(); |
$images_tag[$tag] = $images; |
$images_tag[$tag] = $this->formaterResultatImagesDel($images); |
} |
return $images_tag; |
} |
169,13 → 163,14 |
return $url; |
} |
private function getUrlMeilleuresImagesParTag($nn, $tag, $protocole = Eflore::PROTOCOLE_CAPITALISATION, $limite = 10) { |
private function getUrlMeilleuresImagesParTag($nn, $tag, $protocole = Eflore::PROTOCOLE_CAPITALISATION, $limite = 10, $format = 'CRS') { |
$tpl = Config::get('delMeilleuresImagesParTagTpl'); |
$params = array('nn'=> $nn, |
'tag'=> $tag, |
'protocole' => $protocole, |
'referentiel' => Registre::get('parametres.referentiel'), |
'limite' => $limite); |
'limite' => $limite, |
'format' => $format); |
$url = $this->formaterUrl($tpl, $params); |
return $url; |
} |
/trunk/presentations/scripts/fiche-synthese.js |
---|
18,6 → 18,7 |
var tableauOnglets = Array(); |
var nbOngletsInvisibles = 0; |
var ongletSyntheseCharge = true; |
var ongletIllustrationsCharge = false; |
/** Classe Module |
* Définit un module de type portlet |
489,7 → 490,7 |
$("#zone_onglets").tabs('select', 0); |
} |
}); |
gererEvenementsWiki(); |
gererEvenementsPliage(); |
gererClicIllustrationsFiche(); |
505,6 → 506,79 |
redimensionnerOnglets(); |
}); |
// À la fin du chargement de l'onglet Illustrations |
$(document).on('ongletIllustrationsCharge', function() { |
if (ongletIllustrationsCharge == false) { |
ongletIllustrationsCharge = true; |
$('a.lien-images-organes.fourni').live('click', afficherOngletOrgane); |
$('a.lien-grande-image-organe').live('click', afficherGrandeImageOrgane); |
//afficherOngletOrgane(null, 'fleur'); |
} |
}); |
// Affiche les n images ayant le plus de votes, pour l'organe $tag |
function afficherOngletOrgane(e, tag) { |
var onglets = $('div.onglet-organe'), |
contenu = $('#galerie-organes-contenu'), |
organeOnglet; |
if (tag === undefined) { |
tag = $(this).data('tag') |
} |
if ($(this).parent().hasClass('active')) { // replier |
$(this).parent().removeClass('active') |
contenu.hide(); |
return false; |
} |
onglets.each(function() { |
organeOnglet = $(this).data('tag'); |
var li = $('a.lien-images-organes[data-tag="' + organeOnglet + '"]').parent(); |
if (organeOnglet == tag) { |
$(this).show(); |
li.addClass('active'); |
} else { |
$(this).hide(); |
li.removeClass('active'); |
} |
}); |
contenu.show(); |
var premierLienGrandeImage = $('div.onglet-organe:visible').find('a.lien-grande-image-organe').first(), |
grandeImage = $('#grande-image-organe').find('img'); |
premierLienGrandeImage.trigger('click'); |
grandeImage.show('fast'); |
return false; |
} |
// Affiche en grand sous les miniatures l'image d'organe sur laquelle on a cliqué |
function afficherGrandeImageOrgane() { |
var grandeImage = $('#grande-image-organe').find('img'), |
source = $(this).find('img').attr('src'); |
source = source.replace('CRX2S', 'L'); // @FIXME cracra |
grandeImage.attr('src', source); |
// métadonnées |
var metadonnees = ['id-image', 'titre', 'description', 'localisation', 'auteur'], |
clef; |
for (var i = 0; i < metadonnees.length; i++) { |
clef = metadonnees[i]; |
$('#grande-image-legende-' + clef).html($(this).data(clef)); |
} |
$('#grande-image-legende-date').html(formaterDateVersFrancais($(this).data('date'))); |
$('#grande-image-legende-id-destinataire').attr('href', 'http://localhost/eflore/applications/eflore-consultation/popup.php?module=popup-contact&action=form&referentiel=bdtfx&id_destinataire=' + |
$(this).data('id-destinataire') + '&id_img=' + $(this).data('id-image')); |
} |
// transforme une date du type "2012-04-06" en "06 avril 2012" |
function formaterDateVersFrancais(date) { |
var mois = ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'], |
amj_hms = date.split(' '), |
amj = amj_hms[0].split('-'); |
return amj[2] + ' ' + mois[parseInt(amj[1]) - 1] + ' ' + amj[0]; |
} |
function redimensionnerOnglets() { |
var largeurTotale = $('#zone_onglets').width(); |
530,11 → 604,15 |
} |
} |
// ouvre le popup de galerie lors d'un clic sur l'illustration dans la fiche synthèse |
function gererClicIllustrationsFiche() { |
$('.illustration_cel').live('click', function() { |
var url_image = $(this).attr('src'); |
var titre = $('.nomenclature').first().text(); |
var url = urlPopup+"?module=popup-galerie&action=fiche&num_nom="+$(this).attr('data-num-nom')+"&titre="+encodeURIComponent(titre)+"&url_image="+encodeURIComponent(url_image)+"&referentiel="+REFERENTIEL;; |
//var url = urlPopup+"?module=popup-galerie&action=fiche&num_nom="+$(this).attr('data-num-nom')+"&titre="+encodeURIComponent(titre)+"&url_image="+encodeURIComponent(url_image)+"&referentiel="+REFERENTIEL; |
var url = urlPopup+"?module=popup-galerie-organes&action=fiche&num_nom="+$(this).attr('data-num-nom')+"&titre="+encodeURIComponent(titre)+"&url_image="+encodeURIComponent(url_image)+"&referentiel="+REFERENTIEL; |
//alert(url); |
//return false; |
window.open(url, $(this).attr('data-num-nom'), 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no, width='+(400)+', height='+(375)); |
}); |
/trunk/presentations/styles/eflore.css |
---|
98,6 → 98,21 |
.acceder-outil { |
font-size:0.85em; |
} |
/* @TODO mettre dans commun.css mais line-height déconne */ |
.acceder-outil-vert { |
display:inline-block; |
line-height: 25px; |
padding-left: 30px; |
padding-right: 10px; |
background:url("/sites/commun/generique/images/graphisme/icone_erable_blanc_vert.png") no-repeat scroll -1px -1px transparent; |
border-radius: 14px; -moz-border-radius:14px; -webkit-border-radius:14px; |
color:#6C6865; |
font-family:helveticaneue; |
font-size:12px; |
border: solid #d0d0d0 1px; |
} |
#zone-contenu.acceder-outil.img { |
margin-top:-2px; |
margin-bottom:-2px; |
287,7 → 302,7 |
hr.nettoyage{ |
clear:both; |
width:0; |
} |
} |
.debogage, .debogage pre{ |
white-space:pre-wrap; white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; |
1076,7 → 1091,7 |
text-align:left; |
padding:0; |
} |
.liste-illustrations{ |
.liste-illustrations { |
list-style-type:none; |
padding:0; |
} |
1093,6 → 1108,108 |
} |
#galerie-organes { |
width: 648px; |
margin-top: 10px; |
margin-bottom: 10px; |
background-color: #f0f0f0; |
border-radius: 10px; |
} |
.separator { |
display: inline-block; |
width: 10px; |
} |
.liste-illustrations li.organe-moyen { |
height: 230px; |
font-size: 13px; |
} |
.liste-illustrations li.caractere-moyen { |
height: 210px; |
} |
.liste-illustrations li p.absent-organes { |
height: 193px; |
width: 196px; |
margin: 2px 5px 5px; |
background-position: 50% 50%; |
} |
.liste-illustrations li p.absent-organes a.contribuer { |
height: 30px; |
padding-top: 146px; |
} |
.liste-illustrations li.icone-organe { |
width: 108px; |
height: auto; |
padding-top: 5px; |
padding-bottom: 5px; |
background-color: #ffffff; |
} |
.liste-illustrations li.icone-organe:first-of-type { |
border-radius: 10px 0 0 0; |
} |
.liste-illustrations li.icone-organe:last-of-type { |
border-radius: 0 10px 0 0; |
} |
.liste-illustrations li.icone-organe.active { |
background-color: #f0f0f0; |
} |
.liste-illustrations li.miniature-organe { |
width: 105px; |
height: auto; |
} |
#zone_contenu_corps img.icone-organe { |
height: 30px; |
margin: auto; |
border: none; |
} |
#zone_contenu_corps img.miniature-organe { |
margin: auto; |
} |
div.onglet-organe { |
margin: auto; |
width: 632px; |
} |
div.onglet-organe ul.liste-illustrations { |
margin-top: 8px; |
} |
.liste-illustrations li p.absent-mini { |
width: 60px; |
height: 60px; |
margin-right: 22px; |
font-size: .8em; |
background-image: url("../images/pasdephoto_petit.png"); |
} |
.liste-illustrations li p.absent-mini .contribuer { |
padding-top: 25px; |
} |
#grande-image-organe { |
margin-bottom: 15px; |
text-align: center; |
} |
#grande-image-legende { |
width: 600px; |
margin: auto; |
padding-bottom: 5px; |
} |
a.lien-images-organes { |
opacity: 0.2; |
} |
a.lien-images-organes.fourni { |
cursor: pointer; |
opacity: 1; |
} |
a.lien-grande-image-organe { |
cursor: pointer; |
} |
#illustrations-coste .liste-illustrations li { |
height: 196px; |
} |
/trunk/presentations/images/icones_tags/port.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/presentations/images/icones_tags/port.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/presentations/images/icones_tags/feuille.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/presentations/images/icones_tags/feuille.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/presentations/images/icones_tags/fruit.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/presentations/images/icones_tags/fruit.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/presentations/images/icones_tags/rameau.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/presentations/images/icones_tags/rameau.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/presentations/images/icones_tags/fleur.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/presentations/images/icones_tags/fleur.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/presentations/images/icones_tags/ecorce.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/presentations/images/icones_tags/ecorce.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/presentations/images/pasdephoto_petit.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/presentations/images/pasdephoto_petit.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/modules/fiche/squelettes/fiche_illustrations.tpl.html |
---|
1,6 → 1,6 |
<div id="illustrations"> |
<? if (isset($coste)) : ?> |
<h2>Illustration de la flore de Coste</h2> |
<h2>Illustration de la flore de Coste</h2> |
<div id="illustrations-coste"> |
<?php if (empty($coste['images']) == false) :?> |
21,9 → 21,94 |
<?php else : echo ' <br/> Aucune illustration. <br/> <br/>'; endif;?> |
</div> |
<? endif; ?> |
<? if (isset($organes)) : ?> |
<h2>Flora Data - Organes</h2> |
<div id="illustrations-organes"> |
<? if (empty($organes) == false) :?> |
<ul class="liste-illustrations"> |
<? foreach($organes as $tag => $image) : ?> |
<? if ($image != null) : ?> |
<li class="organe-moyen"> |
<?= ucfirst($tag); ?> |
<a class="lien-image-cel" href="http://localhost/eflore/applications/eflore-consultation/popup.php?module=popup-illustrations&action=fiche&referentiel=bdtfx&id=<?= $image['id_image'] ?>"> |
<img title="<?= $image['id_image'] ?>" data-num-nom="<?= $image['id_image'] ?>" |
alt="Photographie n°<?= $image['id_image'] ?> du taxon <?= $image['observation']['determination.ns'] ?>" |
src="<?= $image['binaire.href'] ?>" /> |
</a> |
</li> |
<? endif ?> |
<? endforeach ?> |
</ul> |
<? endif ?> |
<hr class="nettoyage" /> |
<a class="acceder-outil-vert lien-externe" |
href="http://localhost/widget:cel:saisie?referentiel=bdtfx&num_nom=<?= $nnr ?>&titre=Ajout d'une photo de <?= $nomComplet ?>" |
title="Ajouter une photographie au moyen du Carnet en Ligne"> |
Ajouter une photo |
</a> |
<? if (empty($organes) == false) : ?> |
<span class="separator"></span> |
<a class="acceder-outil-vert lien-externe" href="http://www.tela-botanica.org/eflore/del/del.html?masque.ns=<?= $nomComplet ?>#page_recherche_images~3" |
title="Participer au choix des photos d'organes"> |
Participer au choix |
</a> |
<? endif ?> |
<br/><br/> |
</div> |
<? endif ?> |
<!-- sous-squelette --> |
<?= $illustrationsOrganes ?> |
<br/> |
<? if (isset($caracteres)) : ?> |
<h2>Flora Data - Aide à la détermination</h2> |
<div id="illustrations-caracteres"> |
<? if (empty($caracteres) == false) : ?> |
<ul class="liste-illustrations"> |
<? foreach($caracteres as $image) : ?> |
<li class="caractere-moyen"> |
<? if ($image != null) : ?> |
<a class="lien-image-cel" href="http://localhost/eflore/applications/eflore-consultation/popup.php?module=popup-illustrations&action=fiche&referentiel=bdtfx&id=<?= $image['id_image'] ?>"> |
<img title="<?= $image['id_image'] ?>" data-num-nom="<?= $image['id_image'] ?>" |
alt="Photographie n°<?= $image['id_image'] ?> du taxon <?= $image['observation']['determination.ns'] ?>" |
src="<?= $image['binaire.href'] ?>" /> |
</a> |
<? else : ?> |
<!-- <p class="absent absent-organes"> |
Pas de photo |
<br> |
<a class="contribuer" onclick="window.open(this.href); return false;" title="Ajouter une photographie au moyen du Carnet en Ligne" href="http://localhost/widget:cel:saisie?referentiel=bdtfx"> Contribuer </a> |
</p> --> |
<? endif ?> |
</li> |
<? endforeach ?> |
</ul> |
<? endif ?> |
<hr class="nettoyage" /> |
<a class="acceder-outil-vert lien-externe" |
href="http://localhost/widget:cel:saisie?referentiel=bdtfx&num_nom=<?= $nnr ?>&titre=Ajout d'une photo de <?= $nomComplet ?>" |
title="Ajouter une photographie au moyen du Carnet en Ligne"> |
Ajouter une photo |
</a> |
<? if (empty($caracteres) == false) : ?> |
<span class="separator"></span> |
<a class="acceder-outil-vert lien-externe" href="http://www.tela-botanica.org/eflore/del/del.html?masque.ns=<?= $nomComplet ?>#page_recherche_images~1" |
title="Participer au choix des photos d'organes"> |
Participer au choix |
</a> |
<? endif ?> |
<br/><br/> |
</div> |
<br/> |
<? endif ?> |
<? if (isset($cel)) : ?> |
<h2>Flora Data</h2> |
<h2>Flora Data - Tout</h2> |
<div id="illustrations-cel"> |
<?php if (isset($cel['images'])) : ?> |
<ul class="liste-illustrations"> |
56,28 → 141,13 |
<?= $cel['meta']['titre']?> |
<a class="lien_metadonnees lien_popup" href="<?= $cel['meta']['url']; ?>">Voir toutes les metadonnées</a> |
</div> |
<div class="importance2"> |
<h3 class="rejoindre">Contribuer</h3> |
<p> |
Si vous souhaitez contribuer avec vos photographies personnelles, en acceptant de les mettre à disposition de |
la communauté sous une licence <a href="http://www.tela-botanica.org/page:licence">Creative Commons</a>, vous pouvez utiliser le |
<a href="http://www.tela-botanica.org/appli:cel" title="CEL" class="lien-externe">Carnet en Ligne</a> |
pour importer vos images dans eFlore. |
</p> |
<p> |
Pour vous aidez dans cette démarche, |
<a href="http://www.tela-botanica.org/wikini/eflore/wakka.php?wiki=AideCELVueGeneraleImages" class="lien-externe"> |
un mode d'emploi concernant l'ajout d'image est à votre disposition |
</a>. |
</p> |
<p> |
<a class="acceder-outil lien-externe" href="http://www.tela-botanica.org/page:cel" |
title="Ajouter une photographie au moyen du Carnet en Ligne"> |
Ajouter une photo |
</a> |
</p> |
</div> |
<? endif; ?> |
<a class="acceder-outil-vert lien-externe" |
href="http://localhost/widget:cel:saisie?referentiel=bdtfx&num_nom=<?= $nnr ?>&titre=Ajout d'une photo de <?= $nomComplet ?>" |
title="Ajouter une photographie au moyen du Carnet en Ligne"> |
Ajouter une photo |
</a> |
<br/><br/><br/> |
<? endif ?> |
<? if (isset($photoflora)) : ?> |
<h2>Photoflora </h2> |
115,5 → 185,8 |
<a class="lien_metadonnees lien_popup" href="<?= $photoflora['meta']['url']; ?>">Voir toutes les metadonnées</a> |
</div> |
<?php endif; ?> |
<script type="text/javascript"> |
$.event.trigger('ongletIllustrationsCharge'); |
</script> |
</div> |
/trunk/modules/fiche/squelettes/fiche_illustrations_organes.tpl.html |
---|
New file |
0,0 → 1,71 |
<? if (isset($organes) && (empty($organes) == false)) : ?> |
<div id="galerie-organes"> |
<ul class="liste-illustrations"> |
<?php foreach($organes as $tag => $image) : ?> |
<li class="icone-organe"> |
<a class="lien-images-organes<?php if (empty($image) == false) : ?> fourni<?php endif; ?>" data-tag="<?= $tag; ?>"> |
<img class="icone-organe" src="presentations/images/icones_tags/<?= $tag; ?>.png" alt="<?= $tag ?>" /> |
<?= $tag; ?> |
</a> |
</li> |
<?php endforeach; ?> |
</ul> |
<hr class="nettoyage" /> |
<div id="galerie-organes-contenu" style="display: none;"> |
<? foreach($organes as $tag => $image) : ?> |
<div class="onglet-organe" data-tag="<?= $tag; ?>"> |
<?php if (empty($organes[$tag]) == false) :?> |
<ul class="liste-illustrations"> |
<?php foreach($organes[$tag] as $image) : ?> |
<li class="miniature-organe"> |
<?php if ($image != null) : ?> |
<a class="lien-grande-image-organe" |
data-id-image="<?= $image['id_image'] ?>" data-titre="<?= $image['observation']['determination.ns'] ?>" |
data-description="<?= $image['determination.libelle'] ?>" data-localisation="<?= $image['station.libelle'] ?>" |
data-auteur="<?= $image['auteur.libelle'] ?>" data-id-destinataire="<?= $image['auteur.id'] ?>" |
data-date="<?= $image['date'] ?>"> |
<img class="miniature-organe" src="<?= $image['binaire.href']; ?>" alt="<?= $image['binaire.href']; ?>" /> |
</a> |
<?php else: ?> |
<p class="absent absent-mini"> |
Pas de photo |
<br> |
<a class="contribuer" onclick="window.open(this.href); return false;" |
title="Ajouter une photographie au moyen du Carnet en Ligne" |
href="http://localhost/widget:cel:saisie?referentiel=bdtfx&num_nom=<?= $nnr ?>&titre=Ajout d'une photo de <?= $nomComplet ?>"> |
Contribuer |
</a> |
</p> |
<?php endif; ?> |
</li> |
<?php endforeach; ?> |
</ul> |
<hr class="nettoyage" /> |
<?php else: ?> |
Aucune illustration pour l'organe "<?= $tag ?>" |
<?php endif; ?> |
</div> |
<?php endforeach; ?> |
<div id="grande-image-organe"> |
<img src="" alt="Grande image" /> |
</div> |
<div id="grande-image-legende"> |
<div> |
<dl> |
<dt>Photo n°</dt><dd id="grande-image-legende-id-image"></dd> |
<dt>Titre</dt><dd id="grande-image-legende-titre"><br></dd> |
<dt>Description</dt><dd id="grande-image-legende-description"><br></dd> |
<dt>Localisation</dt><dd id="grande-image-legende-localisation"><br></dd> |
<dt>Auteur</dt> |
<dd> |
<span id="grande-image-legende-auteur"></span> |
<a id="grande-image-legende-id-destinataire" href="" class="mailto">(Contacter ...)</a> |
</dd> |
<dt>Date d'observation</dt><dd id="grande-image-legende-date"><br></dd> |
<dt>Licence</dt><dd><a href="http://www.tela-botanica.org/page:licence" class="lien-externe">CC-BY-SA</a></dd> |
</dl> |
</div> |
</div> |
</div> |
</div> |
<? endif ?> |
/trunk/modules/fiche/formateurs/Illustrations.php |
---|
33,9 → 33,18 |
public function obtenirDonnees() { |
$this->donnees['nt'] = $this->nomCourant->getNt(); |
$this->donnees['nnr'] = $this->nomCourant->getNnr(); |
$this->donnees['nomSciRetenu'] = $this->nomCourant->getNomRetenu()->get('nom_sci_html'); |
$infosNomRetenu = $this->nomCourant->getNomRetenu()->getInfos(); |
$this->donnees['nomComplet'] = $infosNomRetenu['nom_complet']; |
$this->getPhotos(); |
$this->getDessin(); |
$this->getPhotosOrganes(); |
$this->getPhotosCaracteresIdentification(); |
$pso = $this->getPhotosSixOrganes(); |
$this->setCheminSquelette('modules/fiche/squelettes/'); // @FIXME le chemin devrait déjà être défini correctement !? |
$this->donnees['illustrationsOrganes'] = $this->getVue('fiche_illustrations_organes', |
array('organes' => $pso, 'nnr' => $this->donnees['nnr'], 'nomComplet' => $this->donnees['nomComplet'])); |
return $this->donnees; |
} |
125,6 → 134,68 |
} |
} |
} |
public function getPhotosSixOrganes() { |
$organes = array( |
'fleur' => array(), |
'feuille' => array(), |
'fruit' => array(), |
'ecorce' => array(), |
'port' => array(), |
'rameau' => array()); |
$nnr = $this->nomCourant->getNnr(); |
$infosOrganes = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CAPITALISATION, 6, 'CRX2S'); |
$vide = true; |
foreach ($infosOrganes as $tag => $organe) { |
$organes[$tag] = $organe; |
$nbImages = count($organe); |
if ($nbImages != 0) { |
$vide = false; |
for ($i = 6; $i > $nbImages; $i--) { |
$organes[$tag][] = null; |
} |
} |
} |
if ($vide) { |
$organes = array(); |
} |
return $organes; |
} |
public function getPhotosOrganes() { |
$organes = array( |
'fleur' => array(), |
'feuille' => array(), |
'fruit' => array(), |
'ecorce' => array(), |
'port' => array(), |
'rameau' => array()); |
$nnr = $this->nomCourant->getNnr(); |
$infosOrganes = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CAPITALISATION, 1); |
$vide = true; |
foreach ($infosOrganes as $tag => $organe) { |
$nbImages = count($organe); |
// une image par organe seulement |
$organes[$tag] = array_pop($organe); |
if ($nbImages != 0) { |
$vide = false; |
} |
} |
if ($vide) { |
$organes = array(); |
} |
$this->donnees['organes'] = $organes; |
} |
public function getPhotosCaracteresIdentification() { |
$caracteres = array(); |
$nnr = $this->nomCourant->getNnr(); |
$infosCaracteres = $this->images->getInfosMeilleuresImagesParTag($nnr, array_keys($organes), Eflore::PROTOCOLE_CARACTERES, 3); |
if (! empty($infosCaracteres) && ! empty($infosCaracteres[''])) { // le tag est vide, ici |
$caracteres = $infosCaracteres['']; |
} |
$this->donnees['caracteres'] = $caracteres; |
} |
// XXX: webservice: |
// /service:eflore:0.1/cel/images?masque.nn=XXX&referentiel=bdtfx&retour.format=CS&navigation.limite=801 |
131,7 → 202,8 |
private function initialiserPhotos($projet) { |
$this->images->setProjet($projet); |
$nnr = $this->nomCourant->getNnr(); |
return $this->images->getInfosImagesParIdsNoms(array($nnr)); |
$ret = $this->images->getInfosImagesParIdsNoms(array($nnr)); |
return $ret; |
} |
private function formaterListePhotos($projet, $images) { |
/trunk/modules/popup_illustrations/squelettes/popup_fiche_illustrations.tpl.html |
---|
10,7 → 10,7 |
<dt>Localisation</dt><dd><?=$image['station.commune'] ?><br /></dd> |
<dt>Auteur</dt> |
<dd> |
<?=$image['auteur.libelle']?> |
<a class="mailto" href="http://tela-botanica.org/profil:<?= $image['auteur.id'] ?>"><?=$image['auteur.libelle']?></a> |
<a class="mailto" href="<?= $urlContact ?>">(Contacter ...)</a> |
</dd> |
<dt>Date d'observation</dt><dd><?= $image['date'] ?><br /></dd> |