/trunk/modeles/StructureDao.php |
---|
23,8 → 23,20 |
public function getStructure($id) { |
$json = file_get_contents("http://www.tela-botanica.org/eflore/coel/jrest/CoelStructure/*/$id/*"); |
$donnees = json_decode($json, true); |
//Debug::printr($json); |
return $donnees[1]; |
} |
/** |
* Retourne l'ensemble des informations du personnel d'une structure. |
* |
* @param integer l'id de la structure. |
* @return array un tableau contenant les informations sur le personnel de la structure. |
*/ |
public function getPersonnel($id) { |
$json = file_get_contents("http://www.tela-botanica.org/eflore/coel/jrest/CoelStructureAPersonne/$id"); |
$donnees = json_decode($json, true); |
$this->nettoyerTableauDeTableauxAssoc($donnees); |
return $donnees; |
} |
} |
?> |
/trunk/bibliotheque/noyau/ColControleur.php |
---|
89,11 → 89,19 |
$this->sortie = array_merge($this->sortie, $sortie); |
} |
protected function construireTxtTruckSimple($chaine_a_analyser) { |
return $this->construireTxtTruck($chaine_a_analyser, false, false); |
} |
protected function construireTxtTruckSansMajuscule($chaine_a_analyser) { |
return $this->construireTxtTruck($chaine_a_analyser, false); |
} |
protected function construireTxtTruck($chaine_a_analyser, $majuscule = true) { |
protected function construireTxtTruckSansPointFinal($chaine_a_analyser) { |
return $this->construireTxtTruck($chaine_a_analyser, true, false); |
} |
protected function construireTxtTruck($chaine_a_analyser, $majuscule = true, $point_final = true) { |
$termes = array(); |
if ((!is_null($chaine_a_analyser)) && (trim($chaine_a_analyser) != '')) { |
$valeurs = explode(self::SEPARATEUR_VALEURS, $chaine_a_analyser); |
109,7 → 117,7 |
} |
} |
$chaine_a_retourner = $this->formaterTableauDeTxt($termes, $majuscule); |
$chaine_a_retourner = $this->formaterTableauDeTxt($termes, $majuscule, $point_final); |
return $chaine_a_retourner; |
} |
141,7 → 149,7 |
return $txt_a_retourner; |
} |
protected function formaterTableauDeTxt($tableau_de_txt, $majuscule = true) { |
protected function formaterTableauDeTxt($tableau_de_txt, $majuscule = true, $point_final = true) { |
$chaine_a_afficher = ''; |
$taille_du_tableau = count($tableau_de_txt); |
if ($taille_du_tableau > 0) { |
151,10 → 159,13 |
if ($i != $index_avt_dernier) { |
$chaine_a_afficher .= $mot.', '; |
} else { |
$chaine_a_afficher .= $this->nettoyerPointFinal($mot).'.'; |
$chaine_a_afficher .= $this->nettoyerPointFinal($mot); |
if ($point_final) { |
$chaine_a_afficher .= '.'; |
} |
} |
} |
} |
if ($majuscule) { |
$chaine_a_afficher = ucfirst($chaine_a_afficher); |
} |
/trunk/bibliotheque/noyau/ColModele.php |
---|
35,4 → 35,19 |
public function getLimiteNbre() { |
return $this->limite_nbre; |
} |
protected function nettoyerTableauDeTableauxAssoc(&$tableau) { |
foreach ($tableau as $cle => $valeur) { |
$this->nettoyerTableauAssoc($valeur); |
$tableau[$cle] = $valeur; |
} |
} |
protected function nettoyerTableauAssoc(&$tableau) { |
foreach ($tableau as $cle => $valeur) { |
if (is_numeric($cle) && is_int((integer) $cle)) { |
unset($tableau[$cle]); |
} |
} |
} |
} |
/trunk/squelettes/fiche_structure.tpl.html |
---|
46,6 → 46,42 |
</dl> |
<h2>Personnel</h2> |
<dl> |
<dt>Personnel des collections</dt> <dd><?=count($personnel)?></dd> |
</dl> |
<?php if (count($personnel) > 0) : ?> |
<h3>Membres du personnel</h3> |
<table> |
<thead> |
<tr> |
<th>Fonction</th> |
<th>Prénom</th> |
<th>Nom</th> |
<th>Tél. Fixe / Fax</th> |
<th>Courriel principal</th> |
<th>Statut</th> |
<th>Temps de travail</th> |
<th>Spécialité principale</th> |
<th>Contact ?</th> |
</tr> |
</thead> |
<tbody> |
<?php foreach ($personnel as $personne) : ?> |
<tr> |
<td><?=$personne['_fonction_']?></td> |
<td><?=$personne['cp_prenom']?></td> |
<td><?=$personne['cp_nom']?></td> |
<td><?=$personne['_tel_fax_']?></td> |
<td><?=$personne['_courriel_']?></td> |
<td><?=$personne['_statut_']?></td> |
<td><?=$personne['csap_bota_travail_hebdo_tps']?></td> |
<td><?=$personne['_specialite_']?></td> |
<td><?=$personne['_contact_']?></td> |
</tr> |
<?php endforeach; ?> |
</tbody> |
</table> |
<?php endif; ?> |
<h2>Conservation</h2> |
<h3>Formation du personnel à la conservation</h3> |
66,7 → 102,7 |
<dt>Locaux spécifiques aux collections</dt> <dd><?=$info['_stockage_local_']?></dd> |
<dt>Meubles spécifiques aux collections</dt> <dd><?=$info['_stockage_meuble_']?></dd> |
<dt>Paramêtres maîtrisés</dt> <dd><?=$info['_stockage_parametre_']?></dd> |
<dt>Conservation des collections en commun</dt> <dd><?=$info['_collection_commune_']?> <?=$info['_collection_autre_']?></dd> |
<dt>Conservation des collections en commun</dt> <dd><?=$info['_collection_commune_']?> <?=$info['_collection_commune_autre_']?></dd> |
<dt>Accès contrôlé</dt> <dd><?=$info['_acces_controle_']?></dd> |
</dl> |
83,6 → 119,28 |
<?php endif; ?> |
</dl> |
<h2>Valorisation</h2> |
<h3>Actions de valorisation</h3> |
<dl> |
<dt>Réalisation d'actions de valorisation</dt> <dd><?=$info['_action_']?> <?=$info['_action_info_']?></dd> |
<dt>Publications</dt> <dd><?=$info['csv_publication']?></dd> |
<dt>Autres collections</dt> <dd><?=$info['_collection_autre_']?></dd> |
<dt>Futures actions de valorisation</dt> <dd><?=$info['_action_future_']?> <?=$info['_action_future_info_']?></dd> |
</dl> |
<h2>Valorisation</h2> |
<h3>Accès & Usages</h3> |
<dl> |
<dt>Condition de visite</dt> <dd><?=$info['_visite_avec_motif_']?> <?=$info['_visite_avec_motif_info_']?></dd> |
<dt>Condition d'accès</dt> <dd><?=$info['_acces_ss_motif_']?> <?=$info['_acces_ss_motif_info_']?></dd> |
</dl> |
<h3>Recherches scientifiques</h3> |
<dl> |
<dt>Utilisation pour la recherche</dt> <dd><?=$info['_recherche_']?></dd> |
<?php if ($info['csv_mark_recherche'] == '1') : ?> |
<dt>Provenance des chercheurs</dt> <dd><?=$info['_recherche_provenance_']?></dd> |
<dt>Type de recherche</dt> <dd><?=$info['_recherche_type_']?></dd> |
<?php endif; ?> |
</dl> |
<hr /> |
<!-- FIN FICHE STRUCTURE --> |
/trunk/squelettes/collection.css |
---|
1,8 → 1,13 |
@CHARSET "UTF-8"; |
/*--------------------------------------------------------------------------------------------------------------*/ |
/* Général */ |
/*Titres*/ |
h2, h3{ |
margin:0; |
padding:1em 0 0 0;} |
/* Liste de définitions */ |
dl{ |
margin:1em 0; |
margin:0; |
padding:0;} |
dt{ |
background-color:#EEEEEE; |
15,7 → 20,8 |
dt:after{ |
content:" : ";} |
/* hack de commentaire avec un antislash pour ie5 mac \*/ |
h2, h3, dt { clear: both; } |
h2, h3, dt, hr { |
clear:both;} |
/* end hack */ |
dd{ |
float:left; |
23,6 → 29,32 |
margin:0 0 0 0; |
padding:.3em; |
border-top:1px solid #999;} |
/* Table */ |
table{ |
border:1px solid #1C3C78; |
border-collapse:collapse; |
width:100% !important;width:95%;/*Pour IE*/ |
margin:auto;} |
thead, tfoot{ |
background-color:#EEEEEE; |
border:1px solid #1C3C78;} |
tbody{ |
background-color:#FFFFFF; |
border:1px solid #1C3C78;} |
th{ |
font-family:monospace; |
border:1px dotted #1C3C78; |
padding:5px; |
background-color:#EEEEEE; |
width:25%;} |
td{ |
font-family:sans-serif; |
font-size:80%; |
border:1px solid #1C3C78; |
padding:5px; |
text-align:left;} |
caption{ |
font-family:sans-serif;} |
/*--------------------------------------------------------------------------------------------------------------*/ |
/* Présentation fiche */ |
.discretion{ |
/trunk/controleurs/Fiche.php |
---|
35,9 → 35,12 |
} else { |
$donnees['id'] = $_GET['id']; |
$donnees['info'] = $structureDao->getStructure($donnees['id']); |
$donnees['personnel'] = $structureDao->getPersonnel($donnees['id']); |
$this->traiterMetaDonnees($donnees['info']); |
$this->traiterDonneesStructure($donnees['info']); |
$this->traiterPersonnel($donnees['personnel']); |
$this->traiterDonneesStructureConservation($donnees['info']); |
$this->traiterDonneesStructureValorisation($donnees['info']); |
Debug::printr($donnees); |
$this->setSortie(self::RENDU_CORPS, $this->getVue('fiche_structure', $donnees)); |
} |
44,7 → 47,7 |
} |
private function traiterMetaDonnees(&$donnees) { |
$donnees['_modifier_par_'] = $this->traiterPersonne($donnees['cmhl_ce_modifier_par']); |
$donnees['_modifier_par_'] = $this->obtenirNomCompletPersonne($donnees['cmhl_ce_modifier_par']); |
$donnees['_etat_'] = $this->construireTxtListeOntologie($donnees['cmhl_ce_etat']); |
} |
95,8 → 98,8 |
$donnees['_stockage_meuble_'] = $this->construireTxtListeOntologie($donnees['csc_truk_stockage_meuble']); |
$donnees['_stockage_parametre_'] = $this->construireTxtListeOntologie($donnees['csc_truk_stockage_parametre']); |
$donnees['_collection_commune_'] = $this->formaterOuiNon($donnees['csc_mark_collection_commune']); |
$donnees['_collection_autre_'] = $this->construireTxtListeOntologie($donnees['csc_truk_collection_autre']); |
$donnees['_collection_autre_'] = $this->formaterParenthese($donnees['_collection_autre_']); |
$donnees['_collection_commune_autre_'] = $this->construireTxtListeOntologie($donnees['csc_truk_collection_autre']); |
$donnees['_collection_commune_autre_'] = $this->formaterParenthese($donnees['_collection_commune_autre_']); |
$donnees['_acces_controle_'] = $this->formaterOuiNon($donnees['csc_mark_acces_controle']); |
$donnees['_restauration_'] = $this->formaterOuiNon($donnees['csc_mark_restauration']); |
$donnees['_restauration_operation_'] = $this->construireTxtListeOntologie($donnees['csc_truk_restauration_operation']); |
109,12 → 112,57 |
$donnees['_traitement_liste_'] = $this->formaterParenthese($donnees['_traitement_liste_']); |
$donnees['_acquisition_collection_'] = $this->formaterOuiNon($donnees['csc_mark_acquisition_collection']); |
$donnees['_acquisition_echantillon_'] = $this->formaterOuiNon($donnees['csc_mark_acquisition_echantillon']); |
if ($donnees['csc_mark_acquisition_echantillon'] == '1') { |
$donnees['_acquisition_traitement_'] = $this->formaterOuiNon($donnees['csc_mark_acquisition_traitement']); |
if ($donnees['csc_mark_acquisition_traitement'] == '1') { |
$donnees['_acquisition_traitement_poison_'] = $this->construireTxtListeOntologie($donnees['csc_truk_acquisition_traitement_poison']); |
$donnees['_acquisition_traitement_insecte_'] = $this->construireTxtListeOntologie($donnees['csc_truk_acquisition_traitement_insecte']); |
} |
} |
} |
private function traiterPersonne($personne_id) { |
private function traiterDonneesStructureValorisation(&$donnees) { |
// liste 24 : Liste des actions de valorisation des collections |
Ontologie::chargerListe(1027); |
// liste 25 : Liste des continents habités incluant aussi le pays France |
Ontologie::chargerListe(1028); |
// liste 26 : Liste des types de recherche nécessitant la consultation de collection botanique |
Ontologie::chargerListe(1029); |
$donnees['_action_'] = $this->formaterOuiNon($donnees['csv_mark_action']); |
$donnees['_action_info_'] = $this->construireTxtListeOntologie($donnees['csv_truk_action']); |
$donnees['_action_info_'] = $this->formaterParenthese($donnees['_action_info_']); |
$donnees['_collection_autre_'] = $this->construireTxtListeOntologie($donnees['csv_collection_autre']); |
$donnees['_action_future_'] = $this->formaterOuiNon($donnees['csv_mark_action_future']); |
$donnees['_action_future_info_'] = $this->formaterParenthese($donnees['csv_action_future']); |
$donnees['_recherche_'] = $this->formaterOuiNon($donnees['csv_mark_recherche']); |
if ($donnees['csv_mark_recherche'] == '1') { |
$donnees['_recherche_provenance_'] = $this->construireTxtListeOntologie($donnees['csv_truk_recherche_provenance']); |
$donnees['_recherche_type_'] = $this->construireTxtListeOntologie($donnees['csv_truk_recherche_type']); |
} |
$donnees['_acces_ss_motif_'] = $this->formaterOuiNon($donnees['csv_mark_acces_ss_motif']); |
$donnees['_acces_ss_motif_info_'] = $this->formaterParenthese($donnees['csv_acces_ss_motif']); |
$donnees['_visite_avec_motif_'] = $this->formaterOuiNon($donnees['csv_mark_visite_avec_motif']); |
$donnees['_visite_avec_motif_info_'] = $this->formaterParenthese($donnees['csv_visite_avec_motif']); |
} |
private function traiterPersonnel(&$donnees) { |
// liste 09 : Liste des fonctions d'une personne au sein d'une structure |
Ontologie::chargerListe(1012); |
// liste 10 : Liste des statuts d'une personne au sein d'une structure |
Ontologie::chargerListe(1013); |
foreach ($donnees as &$personnel) { |
$personnel['_fonction_'] = $this->construireTxtListeOntologie($personnel['csap_ce_truk_fonction']); |
$personnel['_statut_'] = $this->construireTxtListeOntologie($personnel['csap_ce_truk_statut']); |
$personnel['_tel_fax_'] = $this->construireTxtTruckSimple($personnel['cp_truk_telephone']); |
$personnel['_courriel_'] = $this->construireTxtTruckSimple($personnel['cp_truk_courriel']); |
$personnel['_contact_'] = $this->formaterOuiNon($personnel['csap_mark_contact']); |
$personnel['_specialite_'] = $this->construireTxtListeOntologie($personnel['cp_ce_truk_specialite']); |
} |
} |
private function obtenirNomCompletPersonne($personne_id) { |
$personneDao = $this->getModele('PersonneDao'); |
$personne_nom = $personneDao->getPersonneNomComplet($personne_id); |
return $personne_nom; |