Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 307 → Rev 308

/trunk/presentations/scripts/fiche-synthese.js
202,8 → 202,6
 
var ongletSyntheseCharge = true;
function selectionnerOngletParDefautOuEnregistre() {
//TODO: verifier ici si un cookie est présent pour ouvrir l'onglet désiré
//
// Si un onglet est précisé dans l'url
// Récupération de l'adresse de l'onglet sélectionné
var urlVars = getUrlVars();
216,6 → 214,16
} else {
ongletSyntheseCharge = false;
}
// On réouvre le dernier onglet consulté, à voir si on garde ça en prod, en tout cas c'est
// pratique pendant le développement
if($.cookie('onglet_eflore') && $.cookie('onglet_eflore') != 'ui-tabs-1') {
$('#zone_onglets').tabs("select", '#'+$.cookie('onglet_eflore'));
} else {
selectionnerOngletSynthese();
$('.ui-tabs-panel').hide();
$('#synthese').show();
}
}
 
function afficherOngletsPourNiveau() {
262,6 → 270,7
$('#zone_contenu_fiche').hide();
// on cache la croix pour ne pas fermer l'onglet actuellement consulté
$(ui.tab).nextAll().css({visibility: "hidden"});
$.cookie('onglet_eflore', ancre);
} else {
if(ongletSyntheseCharge) {
// Si c'est l'onglet fiche, on le sélectionne artificiellement
268,6 → 277,7
selectionnerOngletSynthese();
$('.ui-tabs-panel').hide();
$('#zone_contenu_fiche').show();
$.cookie('onglet_eflore', ancre);
return false;
} else {
window.location = url;
/trunk/metier/api_0.1/NomsVernaculaires.php
20,6 → 20,13
$url = $this->formaterUrl($tpl, $params);
return $this->chargerDonnees($url);
}
public function getRechercheLimitee($num_tax) {
$tpl = Config::get('nomsVernaRechercheLimiteeTpl');
$params = array('valeur' => $num_tax, 'projet' => 'nvjfl');
$url = $this->formaterUrl($tpl, $params);
return $this->chargerDonnees($url);
}
 
public function getRechercheEtendue($nom, $type_resultat = '') {
$methode = 'getUrlRecherche'.$type_resultat;
/trunk/modules/fiche/formateurs/Ethnobotanique.php
46,8 → 46,8
 
public function getBloc() {
$nt = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
$nomsVerna = $this->nomsVernaculaires->getRechercheComplete($nt);
$donnees['nomsVernaNbre'] = count($nomsVerna['resultat']);
$nomsVerna = $this->nomsVernaculaires->getRechercheLimitee($nt);
$donnees['nomsVerna'] = array_slice($nomsVerna['resultat'], 0, 5);
return $donnees;
}
}
/trunk/modules/fiche/squelettes/fiche_synthese.tpl.html
54,7 → 54,9
<a class="lien-onglet-synthese" href="<?=$url;?>ethnobotanique">Ethnobotanique</a>
</h3>
<div id="contenu-0" class="contenu">
<p>Nombre de noms communs : <?=$ethnobotanique['nomsVernaNbre']?></p>
<?php foreach ($ethnobotanique['nomsVerna'] as $nom_verna) : ?>
<div> : <?= $nom_verna['nom_vernaculaire'].' ('.$nom_verna['code_langue'].')'; ?> </div>
<?php endforeach; ?>
</div>
</div>
</div>