Subversion Repositories eFlore/Applications.coel-consultation

Compare Revisions

Ignore whitespace Rev 116 → Rev 117

/trunk/controleurs/FichePersonne.php
39,10 → 39,12
$donnees['id'] = $_GET['id'];
$donnees['info'] = $this->personneDao->getPersonne($donnees['id']);
$donnees['publications'] = $this->personneDao->getPersonneAPublication($donnees['id']);
$donnees['collections'] = $this->personneDao->getPersonneACollection($donnees['id']);
// Traitement des données
$this->traiterDonneesPersonne($donnees['info']);
$this->traiterDonneesPersonneAPublication($donnees['publications']);
$this->traiterDonneesPersonneACollection($donnees['collections']);
$this->postraiterDonnees($donnees);
$donnees['metadonnees'] = $this->traiterMetaDonnees($donnees['info']);
109,4 → 111,14
$publication['_role_'] = $this->construireTxtListeOntologie($publication['cpuap_id_role']);
}
}
private function traiterDonneesPersonneACollection(&$collections) {
// liste 27 : Liste des relations entre une collection et une personne
Ontologie::chargerListe(1030);
foreach ($collections as &$collection) {
$collection['_role_'] = $this->construireTxtListeOntologie($collection['ccap_id_role']);
$collection['_url_'] = $this->obtenirUrlFicheCollection($collection['ccap_id_collection']);
}
}
}
/trunk/modeles/PersonneDao.php
15,6 → 15,7
class PersonneDao extends ColModele {
const SERVICE_PERSONNE = 'CoelPersonne';
const SERVICE_PERSONNE_A_PUBLICATION = 'CoelPublicationAPersonne';
const SERVICE_PERSONNE_A_COLLECTION = 'CoelCollectionAPersonne';
 
/**
* Retourne l'ensemble des information d'une personne.
45,10 → 46,23
$url = $this->url_jrest.self::SERVICE_PERSONNE_A_PUBLICATION."/*/$id_personne/2361,2362,2363";
$json = file_get_contents($url);
$donnees = json_decode($json, true);
$this->nettoyerTableauDeTableauxAssoc($donnees['publicationsAPersonne']);
return $donnees['publicationsAPersonne'];
}
/**
* Retourne l'ensemble des collections liées à une personne.
*
* @param integer l'id de la personne.
* @return array un tableau contenant les informations sur les collections liées à la personne.
*/
public function getPersonneACollection($id_personne) {
$url = $this->url_jrest.self::SERVICE_PERSONNE_A_COLLECTION."/*/*/$id_personne";
$url .= '?orderby='.urlencode("cc_nom ASC");
$json = file_get_contents($url);
$donnees = json_decode($json, true);
return $donnees['collectionsAPersonne'];
}
public function getPersonneNomComplet($id) {
$nom_complet = '';
$donnees = $this->getPersonne($id);
/trunk/squelettes/fiche_personne.tpl.html
13,7 → 13,7
<li><a href="#col-per-adresse">Adresses</a></li>
<li><a href="#col-per-info-nat">Informations naturalistes</a></li>
<li><a href="#col-per-publication">Publications liées</a></li>
<!-- A IMPLEMENTER <li><a href="#col-per-collection">Collections liées</a></li> -->
<li><a href="#col-per-collection">Collections liées</a></li>
<li><a href="#col-per-image">Images</a></li>
<li><a href="#col-per-meta">Méta-données</a></li>
</ul>
130,13 → 130,32
<?php endif; ?>
<hr class="nettoyeur"/>
</div>
<!-- A IMPLEMENTER
<div id="col-per-collection">
<h2>Collections liées</h2>
 
<?php if (count($collections) > 0) : ?>
<table>
<thead>
<tr>
<th>Collection</th>
<th>Relation</th>
</tr>
</thead>
<tbody>
<?php foreach ($collections as $collection) : ?>
<tr>
<td><a href="<?=$collection['_url_']?>"><?=$collection['cc_nom']?></a></td>
<td><?=$collection['_role_']?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else : ?>
<p>Aucune</p>
<?php endif; ?>
<hr class="nettoyeur"/>
</div>
-->
 
<div id="col-per-image">
<h2>Images</h2>
<?php if (count($info['_logos_']) > 0) : ?>