/branches/v5.10-vilmorin/metier/api_0.1/Images.php |
---|
104,7 → 104,21 |
$images = (empty($donnees['resultats']) == false) ? $donnees['resultats'] : array(); |
return $this->formaterResultatImages($images); |
} |
public function getInfosImagesParFicheEtSentier($tagFiche, $sentier) { |
$tpl = Config::get('smartFloreIllustrationsParSentier'); |
$url = $this->formaterUrl($tpl, array('tagFiche' => $tagFiche, 'sentier' => $sentier)); |
$donnees = $this->chargerDonnees($url); |
return $donnees['illustrations'] ?? false; |
} |
public function getInfosImageParId($imageId) { |
$tpl = Config::get('baseUrlServicesCelTpl'); |
$urlTpl = sprintf($tpl, 'CelImage').'/image?imgId=%d'; |
$url = sprintf($urlTpl, $imageId); |
return $this->chargerDonnees($url); |
} |
public function getInfosImagesTaxons() { |
$pas = 800; |
$idsTaxons = explode(',', $this->nntaxon); |
303,4 → 317,4 |
return implode(" > ", $localiteFmt); |
} |
} |
?> |
?> |
/branches/v5.10-vilmorin/configurations/config.defaut.ini |
---|
227,6 → 227,7 |
texteFormateSectionWikiTpl = "{ref:texteFormateWikiTpl}&txt.section.titre={sectionTitre}" |
smartFloreWikiTpl = "http://www.tela-botanica.org/wikini/eFloreRedactionTest/api/rest/0.5/pages/SmartFlore" |
smartFloreIllustrationsParSentier = http://www.tela-botanica.org/smart-form/services/Sentiers.php/sentier-illustration-fiche/?sentierTitre={sentier}&ficheTag=SmartFlore{tagFiche} |
wikipediaLienPageTpl = "http://{langue}.wikipedia.org/wiki/{id}" |
/branches/v5.10-vilmorin/modules/mobile/sources/Illustrations.php |
---|
40,6 → 40,10 |
if (!empty($dessin)) { |
array_push($this->donnees, $dessin); |
} |
$images = $this->addSmartFloreImages(); |
if (!empty($images)) { |
$this->donnees = array_merge(array_values($images), $this->donnees); |
} |
return $this->donnees; |
} |
111,5 → 115,29 |
return $img; |
} |
public function addSmartFloreImages() { |
$img = []; |
$tagFiche = strtoupper($this->conteneur->getParametre('referentiel'))."nt" |
.$this->conteneur->getNomCourant()->getNomSelectionne()->get('num_taxonomique') |
; |
$sentier = urldecode($_GET['sentier']); |
if ($sentier && $tagFiche) { |
$images = $this->images->getInfosImagesParFicheEtSentier($tagFiche, $sentier); |
if ($images) { |
foreach ($images as $image) { |
$retour = $this->images->getInfosImageParId($image['id']); |
$auteur = $retour['pseudo_utilisateur'] ?? 'Auteur inconnu'; |
$img[$image['id']]['src'] = $image['url']; |
$img[$image['id']]['legende']['titre'] = $auteur; |
$img[$image['id']]['legende']['texte'] = " "; |
} |
} |
} |
return $img; |
} |
} |
?> |
?> |
/branches/v5.10-vilmorin/modules/fiche/squelettes/fiche_accueil.tpl.html |
---|
1,10 → 1,10 |
<script type="text/Javascript"> |
<script type="text/javascript"> |
var ongletsDefaut = [<?= $blocs; ?>]; |
</script> |
<div id="bloc-fiche" class="importance1"> |
<h1><span ><?=$nom_retenu?></span><span class="famille" style="float: right;"><?=($famille != '') ? $famille : '';?></span></h1> |
<div id="zone_onglets" class="ui-tabs ui-widget ui-widget-content ui-corner-all"> |
<? $url = htmlentities('index.php?referentiel=bdtfx&niveau=1&module=fiche&action=fiche&num_nom='.$num_nom.'&type_nom='.$type_nom.'&nom='.$nom.'&onglet=');?> |
<? $url = htmlentities('index.php?referentiel=bdtfx&module=fiche&action=fiche&num_nom='.$num_nom.'&type_nom='.$type_nom.'&nom='.$nom.'&onglet=');?> |
<ul id="onglets" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> |
<li id="onglet_synthese" class="ui-state-default ui-corner-top <?= ($onglet == 'synthese') ? 'ui-tabs-selected ui-state-active' : '' ;?>"> |
<a class="lien-onglet lien-statique" href="<?=$url;?>synthese">Accueil</a> |
/branches/v5.10-vilmorin |
---|
Property changes: |
Modified: svn:mergeinfo |
Merged /trunk:r1585-1590 |