Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

No changes between revisions

Ignore whitespace Rev 960 → Rev 1095

/branches/v5.1-prillieux/modules/fiche_metadonnees/FicheMetadonnees.php
New file
0,0 → 1,49
<?php
// declare(encoding='UTF-8');
/**
* Classe mère du module fiche metadonnées.
*
* @category PHP 5.2
* @package eflore-consultation
* @author Aurélien Peronnet <aurelien@tela-botanica.org>
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @author Delphine CAUQUIL <delphine@tela-botanica.org>
* @copyright 2011 Tela-Botanica
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
* @version $Id$
*/
class FicheMetadonnees extends aControleur {
 
private $projet = '';
private $serviceMetaDonnees;
 
public function __construct($metadonnees = null) {
$this->capturerParametres();
$this->serviceMetaDonnees = (is_null($this->serviceMetaDonnees)) ? new MetaDonnees($this->projet) : $metadonnees;
}
 
public function executerActionParDefaut() {
$this->executerAffichageMetaDonnees();
}
 
public function chargerMetadonneesHtml() {
$donnees['metadonnees'] = $this->serviceMetaDonnees->getMetaDonnees();
$html = $this->getVue(dirname(__FILE__).'/squelettes/metadonnees', $donnees);
return $html;
}
 
public function executerAffichageMetaDonnees($donnees) {
header('Content-type: text/html; charset=UTF-8');
$html = $this->chargerMetadonneesHtml();
echo $html;
exit;
}
 
private function capturerParametres() {
if (isset($_GET['projet'])) {
$this->projet = $_GET['projet'];
}
}
}
?>
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/branches/v5.1-prillieux/modules/fiche_metadonnees/squelettes/metadonnees.tpl.html
New file
0,0 → 1,21
<div id="metadonnees">
<ul>
<? foreach ($metadonnees as $donnee) : ?>
<? foreach ($donnee as $cle => $valeur) : ?>
<li><span class="intitule_metadonnee"><?= $cle ?> :</span>
<?php if(is_array($valeur)) { ?>
<? foreach ($valeur[0] as $sous_cle => $sous_valeur) : ?>
<ul class="sous-liste-metadonnees">
<li><span class="intitule_metadonnee"><?= $sous_cle ?> :</span>
<span class="valeur_metadonnee"><?= $sous_valeur ?></span>
</li>
</ul>
<? endforeach; ?>
<?php } else { ?>
<span class="valeur_metadonnee"><?= $valeur ?></span>
<?php } ?>
</li>
<? endforeach; ?>
<? endforeach; ?>
</ul>
</div>