Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

No changes between revisions

Ignore whitespace Rev 989 → Rev 990

/trunk/configurations/config.defaut.ini
137,6 → 137,8
 
; +------------------------------------------------------------------------------------------------------+
; Autres urls
urlApiChart = "http://chart.apis.google.com/chart"
urlQrCodeTpl = "http://www.tela-botanica.org/tmp/eflore_v5_cache/qrcode/%s"
baseUrlServicesAnnuaireTpl = "http://www.tela-botanica.org/service:annuaire:%s"
baseUrlServicesCelTpl = "http://www.tela-botanica.org/service:cel:%s"
 
221,12 → 223,9
statutsZoneGeoTpl = "{ref:baseUrlApiEflore}/statuts/?masque.nn={id}&retour.format=zone_geo"
 
; +------------------------------------------------------------------------------------------------------+
; chemin vers outil de conversion pdf
WKHTMLTOPDF = "/usr/local/bin/wkhtmltopdf"
; Chemin vers outil de conversion pdf
WKHTMLTOPDF = "wkhtmltopdf"
 
; chemin de stockage temporaire pour les Html & les PDF
dossier_pdf = "/home/mathilde/web/serveur/cache/eflore/pdf/"
 
; +------------------------------------------------------------------------------------------------------+
;permaliens
permalienNumNomTpl = "http://{ref:domaine}/{ref_tax}-nn-{id}";
233,8 → 232,15
permalienTaxonTpl = "http://{ref:domaine}/{ref_tax}/{ref_version}-nt-{id}";
 
; +------------------------------------------------------------------------------------------------------+
; Gestion du cache et des dossiers de stockage
; Active (true) ou désactive (false) le cache
cache = false
; chemin du cache
chemincache = "/home/aurelien/web/tmp/eflore/"
chemincache = "/home/telabotap/www/tmp/eflore_v5_cache/"
; durée du cache
dureecache = "php:0"
dureecache = "php:60*60*24*365"
 
; chemin de stockage temporaire pour les Html & les PDF
dossier_pdf = "{ref:chemincache}pdf/"
; chemin de stockage temporaire pour les QrCode
dossierQrCode = "{ref:chemincache}qrcode/"
/trunk/modules/fiche/Fiche.php
124,17 → 124,29
$description = new Description($this->conteneur);
$taxons = new Taxons($this->conteneur);
$referentiel = $this->conteneur->getParametre('referentiel');
$urlMobile = $this->url->obtenirUrlMobile($this->parametres['num_nom'], $this->parametres['type_nom'], $this->parametres['nom']);
$donnees = array('wikipedia' => $description->getUrlWikipedia(),
'export_pdf' => $this->ajouterLienModuleExport(),
'permalien_num_nom' => $taxons->getUrlPermalienNumNom($referentiel, 1, $this->conteneur->getNomCourant()->getNns()),
'permalien_taxon' => $taxons->getUrlPermalienTaxon($referentiel, 1, $this->conteneur->getNomCourant()->getNt()),
'nn' => $this->conteneur->getNomCourant()->getNns(),
'nt' => $this->conteneur->getNomCourant()->getNt(),
'wiki' => $description->getLienWikini(),
'nom_retenu' => $this->nom_retenu->get('nom_sci'));
'export_pdf' => $this->ajouterLienModuleExport(),
'permalien_num_nom' => $taxons->getUrlPermalienNumNom($referentiel, 1, $this->conteneur->getNomCourant()->getNns()),
'permalien_taxon' => $taxons->getUrlPermalienTaxon($referentiel, 1, $this->conteneur->getNomCourant()->getNt()),
'nn' => $this->conteneur->getNomCourant()->getNns(),
'nt' => $this->conteneur->getNomCourant()->getNt(),
'wiki' => $description->getLienWikini(),
'nom_retenu' => $this->nom_retenu->get('nom_sci'),
'mobile' => $urlMobile,
'qr_code_png' => $this->obtenirUrlQrCode($urlMobile)
);
$this->setSortie(self::RENDU_CORPS, $this->getVue('fiche_pied_page', $donnees), true);
}
private function obtenirUrlQrCode($urlMobile) {
$qr = $this->conteneur->getQrCode();
$qr->setUrl(htmlspecialchars_decode($urlMobile));
$idQrCode = $this->conteneur->getNomCourant()->getNns();
$urlQrCode = $qr->dessiner($idQrCode);
return $urlQrCode;
}
public function executerOnglet(){
$this->viderSorties();
$donnees = $this->obtenirDonnees();
/trunk/modules/fiche/squelettes/fiche_pied_page.tpl.html
3,6 → 3,11
<h2>Téléchargements</h2>
<div class="conteneur_telechargements">
<?= $export_pdf; ?>
<br />
<span>QR Code Version Mobile</span>
<a href="<?= $mobile; ?>">
<img src="<?= $qr_code_png; ?>" alt="QR Code" />
</a>
</div>
</div>
<div class="droite infos_liens_permanents">
12,37 → 17,45
<h2>Liens permanents :</h2>
<div class="conteneur_permalien">
<span>Nom séléctionné :</span>
<span class="conteneur_permalien">
<a class="lien_externe" href="<?=htmlentities($permalien_num_nom)?>" title="Lien permanent vers <?=$nom_retenu;?>">
<?=htmlentities($permalien_num_nom)?>
</a>
</span>
<span>Nom sélectionné :</span>
<span class="conteneur_permalien">
<a class="lien_externe" href="<?=htmlentities($permalien_num_nom)?>" title="Lien permanent vers <?=$nom_retenu;?>">
<?=htmlentities($permalien_num_nom)?>
</a>
</span>
</div>
<!-- <div class="conteneur_permalien">
<span class="titre_lien_permanent">Taxon :</span>
<span>
<a class="lien_externe" href="<?=htmlentities($permalien_taxon)?>" title="Lien permanent vers ce taxon">
<?=htmlentities($permalien_taxon)?>
</a>
</span>
<span class="titre_lien_permanent">Taxon :</span>
<span>
<a class="lien_externe" href="<?=htmlentities($permalien_taxon)?>" title="Lien permanent vers ce taxon">
<?=htmlentities($permalien_taxon)?>
</a>
</span>
</div> -->
<div class="conteneur_permalien">
<span>Fiche wikipedia :</span>
<span class="description conteneur_permalien">
<a class="lien_externe" href="<?=htmlentities($wikipedia['lien'])?>" title="voir la page de ce taxon sur wikipedia (s'ouvre dans une nouvelle fenêtre)">
<?=htmlentities($wikipedia['lien'])?>
</a>
</span>
<span>Fiche wikipedia :</span>
<span class="description conteneur_permalien">
<a class="lien_externe" href="<?=htmlentities($wikipedia['lien'])?>" title="voir la page de ce taxon sur wikipedia (s'ouvre dans une nouvelle fenêtre)">
<?=htmlentities($wikipedia['lien'])?>
</a>
</span>
</div>
<div class="conteneur_permalien">
<span>Fiche wikini :</span>
<span class="description conteneur_permalien">
<a class="lien_externe" href="<?=htmlentities($wiki)?>" title="voir la page de ce taxon sur le wiki flora (s'ouvre dans une nouvelle fenêtre)">
<?=htmlentities($wiki)?>
</a>
</span>
<span>Fiche wikini :</span>
<span class="description conteneur_permalien">
<a class="lien_externe" href="<?=htmlentities($wiki)?>" title="voir la page de ce taxon sur le wiki flora (s'ouvre dans une nouvelle fenêtre)">
<?=htmlentities($wiki)?>
</a>
</span>
</div>
<div class="conteneur_permalien">
<span>Fiche mobile :</span>
<span class="description conteneur_permalien">
<a class="lien_externe" href="<?= $mobile; ?>" title="voir la version mobile de ce taxon (s'ouvre dans une nouvelle fenêtre)">
Version nomade
</a>
</span>
</div>
</div>
<hr class="nettoyage" />
</div>
/trunk/modules/mobile/Mobile.php
New file
0,0 → 1,123
<?php
// declare(encoding='UTF-8');
/**
* Classe mère du module Mobile.
*
* @category PHP 5.2
* @package eflore-consultation
* @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 Mobile extends aControleur {
 
private $theme = 'pyracantha';
private $parametres = array();
private $conteneur = null;
private $num_nom = 0;
private $nom_courant = null;
private $nom_retenu = '';
private $url;
 
public function initialiser() {
$this->capturerParametres();
$this->conteneur = new Conteneur($this->parametres);
$this->url = $this->conteneur->getAppUrls();
$this->nomCourant = $this->conteneur->getNomCourant();
$this->nom_retenu = $this->conteneur->getNomCourant()->getNomRetenu();
spl_autoload_register(array($this, 'chargerClassesSources'));
}
private function chargerClassesSources($classe) {
$base = dirname(__FILE__).DS;
$cheminSources = $base.'sources'.DS;
$dossiers = array($base, $cheminSources);
foreach ($dossiers as $chemin) {
$fichierATester = $chemin.$classe.'.php';
if (file_exists($fichierATester)) {
include_once $fichierATester;
return null;
}
}
}
 
private function capturerParametres() {
if (isset($_GET['num_nom'])) {
$this->parametres['num_nom'] = $_GET['num_nom'];
}
if (isset($_GET['nom'])) {
$this->parametres['nom'] = $_GET['nom'];
}
if (isset($_GET['type_nom'])) {
$this->parametres['type_nom'] = $_GET['type_nom'];
}
if (isset($_GET['referentiel'])) {
$this->parametres['referentiel'] = $_GET['referentiel'];
Registre::set('parametres.referentiel', $_GET['referentiel']);
}
if (isset($_GET['niveau'])) {
Registre::set('parametres.niveau', $_GET['niveau']);
}
if (isset($_GET['theme'])) {
$this->theme = $_GET['theme'];
}
}
public function executerActionParDefaut() {
$this->executerFiche();
}
 
public function executerFiche(){
$niveau = isset($_GET['niveau']) ? $_GET['niveau'] : '1';
$squelette = 'theme_'.$this->theme.'_niveau'.$niveau;
$donnees = $this->parametres;
$donnees['nom_retenu'] = $this->nom_retenu->get('nom_sci_html').' '.$this->nom_retenu->get('auteur');
$donnees['famille'] = $this->nom_retenu->getTaxonSupRang('180');
$donnees = array_merge($this->obtenirDonnees(), $donnees);
$donnees['css'] = $this->obtenirLienCss();
$donnees['contenu_onglet'] = $this->getVue($squelette, $donnees);
$donnees['lien'] = $this->url->obtenirUrlMobile($this->parametres['num_nom'], $this->parametres['type_nom'], $this->parametres['nom']);
$this->setSortie(self::RENDU_CORPS, $this->getVue('fiche', $donnees), true);
$this->ajouterPiedDePage();
//print_r($donnees);
}
public function obtenirDonnees() {
$donnees = array();
$num_nom = $this->nomCourant->getNns();
$referentiel = $this->conteneur->getParametre('referentiel');
$sources = array('illustrations', 'repartition', 'texte', 'floraison', 'nomsCommuns');
foreach ($sources as $source) {
$nom_classe = ucfirst($source);
$classe = new $nom_classe($this->conteneur);
$donnees[$source] = $classe->getDonnees();
}
 
return $donnees;
}
private function obtenirLienCss() {
$lien = 'modules/mobile/presentations/css/';
if (strcmp($this->theme, 'pyracantha') >= 0) {
$lien .= 'pyracantha_blanc.css';
} else {
$lien .= 'gentiana.css';
}
return $lien;
}
public function ajouterPiedDePage() {
$taxons = new Taxons($this->conteneur);
$referentiel = $this->conteneur->getParametre('referentiel');
$donnees = array('permalien_num_nom' => $taxons->getUrlPermalienNumNom($referentiel, 1, $this->conteneur->getNomCourant()->getNns()));
$this->setSortie(self::RENDU_CORPS, $this->getVue('fiche_pied_page', $donnees), true);
}
}
?>
/trunk/modules/mobile/presentations/logos/tela.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/trunk/modules/mobile/presentations/logos/tela.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/trunk/modules/mobile/presentations/logos/tela_transparent.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/trunk/modules/mobile/presentations/logos/tela_transparent.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/trunk/modules/mobile/presentations/less/README
New file
0,0 → 1,6
1./ Installer les paquets de LESS (sous Mageia: ruby-less)
Dans la description, il doit y avoir une mention du mot "CSS".
 
2./ En ligne de commande, se déplacer dans le dossier contenant les fichiers LESS.
Pour convertir le fichier "fichier.less" en "fichier.css", la commande est :
lessc fichier.less > fichier.css
/trunk/modules/mobile/presentations/less/functions.less
New file
0,0 → 1,44
@gris: #6B7071;
@orange: #ED7826;
@orange-moyen: #F3B88F;
@rouge: rgb(225, 96, 57);
@vert-fonce: #256226;
@vert-moyen: #88AB1C;
@violet: rgb(176, 77, 255);
 
.align-center { text-align: center; }
.margin-center {
margin-left: auto;
margin-right: auto;
}
.margin-bottom-05em { margin-bottom: 0.5em; }
.margin-right-05em { margin-right: 0.5em; }
.margin-top-05em { margin-top: 0.5em; }
 
.padding-05em { padding: 0.5em; }
.padding-left-1em { padding-left: 1em; }
 
.small-caps { font-variant:small-caps; }
 
.gradient(@color_start:'', @position_start:'', @color_end:'', @position_end:'') {
background-image: linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -o-linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -moz-linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -webkit-linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -ms-linear-gradient(top, @color_start 0%, @color_end 100%);
 
background-image: -webkit-gradient(linear, @position_start, @position_end, color-stop(0, @color_start), color-stop(1, @color_end));
 
height: 16px;
display: block;
}
 
.shadow(@color:'', @decalage-x: 0pt, @decalage-y: 1px, @fondu: 1px) {
text-shadow: @decalage-x @decalage-y @fondu @color;
}
 
.border-radius(@radius: 2em) {
border-radius: @radius;
-moz-border-radius: @radius;
-webkit-border-radius: @radius;
}
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/trunk/modules/mobile/presentations/less/pyracantha_blanc.less
New file
0,0 → 1,94
@import "pyracantha.less";
 
.couleur1-bg { background: white; }
.couleur2-bg { background: white; }
 
 
body {
background: white;
}
 
 
header {
background: @vert-moyen;
}
 
 
.tela {
img {
@width: 60px;
width: @width;
max-width: @width;
}
}
 
 
.titre {
color: white;
.shadow(@orange);
}
 
 
.infos {
 
.bg {
padding: 0.2em;
border-radius: 0pt 0pt 1em 1em;
}
.btn {
padding: 0pt;
border-radius: 1em 1em 0pt 0pt;
}
.collapse {
width: 100%;
}
h4 {
color: @orange;
}
.textes {
padding: 0.5em 1em;
.border-radius(2em);
-webkit-overflow-scrolling: touch;
h4 {
color: @vert-fonce;
.shadow(@vert-moyen, 2px, 1px, 1px);
}
}
}
 
 
.resume {
color: black;
}
 
 
.gradient-bas {
@top: left top;
@bottom: left bottom;
@color_start: @vert-moyen;
@color_end: white;
background-image: linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -o-linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -moz-linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -webkit-linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -ms-linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -webkit-gradient(linear, @top, @bottom, color-stop(0, @color_start), color-stop(1, @color_end));
}
 
.en-savoir-plus {
color: white;
background: @vert-moyen;
}
 
.haut-de-page {
color: white;
background: black;
}
/trunk/modules/mobile/presentations/less/pyracantha.less
New file
0,0 → 1,166
@import "functions.less";
 
.gradient-bas {
height: 16px;
display: block;
}
 
footer {
height: 60px;
width: 100%;
left: 0;
right: 0;
bottom: 0;
position: fixed;
z-index: 1000;
color: white;
background: black;
a, a:visited {
color: white;
}
}
 
.tela {
margin-right: 0.5em;
}
 
.titre {
font-style: italic;
font-size: 130%;
font-weight: bold;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
 
.sci {
font-style: italic;
}
 
#div-infos-latin, #div-infos-famille {
.margin-center;
.btn {
width: 99%;
padding-left: 0pt;
padding-right: 0pt;
box-shadow: 0pt 2px 3px black;
}
a {
font-size: 16px;
}
}
 
#div-infos-famille {
margin-top: -1em;
}
#div-illustrations {
.border-radius(2em);
background: white;
margin-top: -1em;
padding-top: 20px;
padding-bottom: 20px;
}
 
 
#galerie_carte {
list-style-type: none;
}
 
@height: 260px;
#slider-pictures {
max-width: 320px;
.margin-center;
.carousel {
margin-bottom: 0pt;
}
.carousel-control {
background: none;
}
 
 
.carousel-inner > .item > img {
width: 320px;
max-height: 310px;
}
.carousel-indicators {
li {
background: @vert-fonce;
}
.active {
background: @orange;
}
}
.carousel-caption {
padding: 10px;
position: static;
h4 {
font-size: 100%;
}
p {
font-size: 90%;
}
}
 
img {
.margin-center;
}
}
 
 
#gstn-img {
max-height: 120px;
margin: 0.5em 0pt 1em 0pt;
display: inline-block;
img {
border: #EAEAEA 2px solid;
width: 100px;
}
 
 
.zoom {
margin-top: 40px;
width: 20px;
border: none;
}
}
 
 
.resume {
.align-center;
margin-top: 1em;
margin-bottom: 1em;
font-size: 16px;
}
 
 
.bas-de-page {
margin-top: 1em;
margin-bottom: 1em;
}
 
.en-savoir-plus {
float: left;
text-shadow: 0pt 0pt 0pt black;
}
 
.haut-de-page {
float: right;
}
/trunk/modules/mobile/presentations/less/pyracantha_vert.less
New file
0,0 → 1,92
@import "pyracantha.less";
 
.couleur1-bg { background: #9ac342; }
.couleur2-bg { background: #88ab1c; }
 
 
body {
background: white;
}
 
 
header {
background: @vert-moyen;
}
 
 
.tela {
img {
@width: 60px;
width: @width;
max-width: @width;
}
}
 
 
.titre {
color: white;
.shadow(@orange);
}
 
 
.infos {
 
.bg {
padding: 0.2em;
border-radius: 0pt 0pt 1em 1em;
}
.btn {
padding: 0pt;
border-radius: 1em 1em 0pt 0pt;
}
.collapse {
width: 100%;
}
.textes {
padding: 0.5em 1em;
.border-radius(2em);
background: white;
-webkit-overflow-scrolling: touch;
h4 {
color: @vert-fonce;
.shadow(@vert-moyen, 2px, 1px, 1px);
}
}
}
 
 
.resume {
color: black;
}
 
 
.gradient-bas {
@top: left top;
@bottom: left bottom;
@color_start: @vert-moyen;
@color_end: white;
background-image: linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -o-linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -moz-linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -webkit-linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -ms-linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -webkit-gradient(linear, @top, @bottom, color-stop(0, @color_start), color-stop(1, @color_end));
}
 
.en-savoir-plus {
color: white;
background: @violet;
}
 
.haut-de-page {
color: white;
background: black;
}
/trunk/modules/mobile/presentations/less/pyracantha_tela.less
New file
0,0 → 1,97
@import "pyracantha.less";
 
.couleur1-bg { background: @orange; }
.couleur2-bg { background: @vert-moyen; }
 
 
body {
background: @vert-fonce;
}
 
 
header {
background: white;
}
 
 
.tela {
img {
@width: 80px;
width: @width;
max-width: @width;
}
}
 
 
.titre {
color: black;
.shadow(@orange);
}
 
 
.infos {
 
.bg {
padding: 1em;
.border-radius(2em);
}
.btn {
padding: 0pt;
.border-radius(2em);
}
.collapse {
width: 100%;
}
@max-height: 220px;
.textes {
padding: 1em;
.border-radius(2em);
max-height: @max-height;
overflow: auto;
background: @orange-moyen;
-webkit-overflow-scrolling: touch;
h4 {
color: @vert-fonce;
.shadow(@vert-moyen, 2px, 1px, 1px);
}
}
}
 
 
 
.resume {
color: white;
}
 
 
.gradient-bas {
@top: left top;
@bottom: left bottom;
@color_start: white;
@color_end: @vert-fonce;
background-image: linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -o-linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -moz-linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -webkit-linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -ms-linear-gradient(top, @color_start 0%, @color_end 100%);
background-image: -webkit-gradient(linear, @top, @bottom, color-stop(0, @color_start), color-stop(1, @color_end));
}
 
.en-savoir-plus {
color: white;
background: @violet;
}
 
.haut-de-page {
color: white;
background: black;
}
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/trunk/modules/mobile/presentations/less/gentiana.less
New file
0,0 → 1,150
@import "functions.less";
 
.couleur1-bg { background: @orange; }
.couleur2-bg { background: @vert-moyen; }
.bordered { border: 1px solid @vert-fonce; }
 
.accordion {
h4 {
margin-left: -1em;
}
}
.accordion-group {
margin: 0pt;
}
.accordion-heading {
padding-left: 1em;
}
.btn-large {
padding: 10px;
font-size: 17px;
}
 
body {
color: black;
background: white;
}
 
header {
.couleur2-bg;
color: white;
#tela {
background: url("../logos/tela_transparent.png") no-repeat 2px 6px;
}
.titre {
font-style: italic;
font-size: 130%;
font-weight: bold;
.shadow(@orange);
}
}
.gradient-bas {
@top: left top;
@bottom: left bottom;
.gradient(@vert-moyen, @top, white, @bottom);
}
 
footer {
display: none;
}
 
 
.sci {
font-style: italic;
}
 
#principal {
margin-bottom: -1em;
padding-left: 0.5em;
a:hover {
text-decoration: none;
}
h4 {
font-size: 17px;
color: @orange;
.shadow(white, 2px, 1px, 1px);
}
}
 
#canvas_fleur, #canvas_fruit {
width: 100%;
}
#floraison_value, #fructification_value {
display: none;
}
 
 
.wrapper {
@square: 120px;
width: @square;
height: @square;
.margin-center;
overflow: hidden;
img {
height: @square;
width: auto;
}
ul {
margin: 0pt;
}
}
 
.wrapper_carte {
.margin-center;
ul {
margin: 0pt;
}
 
#galerie_carte {
img {
.bordered;
}
}
}
#galerie_carte {
list-style-type: none;
}
.bas-de-page {
margin-top: 1em;
margin-bottom: 1em;
}
.en-savoir-plus {
margin-left: 0.2em;
float: left;
.couleur2-bg;
color: white;
text-shadow: 0pt 0pt 0pt black;
}
.en-savoir-plus:hover, .en-savoir-plus:visited {
text-decoration: none;
}
 
 
.haut-de-page {
margin-right: 0.2em;
float: right;
background: black;
color: white;
}
.haut-de-page:hover, .haut-de-page:visited {
text-decoration: none;
}
 
 
/trunk/modules/mobile/presentations/css/gentiana.css
New file
0,0 → 1,100
.align-center { text-align: center; }
.margin-center {
margin-left: auto;
margin-right: auto;
}
.margin-bottom-05em { margin-bottom: 0.5em; }
.margin-right-05em { margin-right: 0.5em; }
.margin-top-05em { margin-top: 0.5em; }
.padding-05em { padding: 0.5em; }
.padding-left-1em { padding-left: 1em; }
.small-caps { font-variant: small-caps; }
.couleur1-bg { background: #ed7826; }
.couleur2-bg { background: #88ab1c; }
.bordered { border: 1px solid #256226; }
.accordion h4 { margin-left: -1em; }
.accordion-group { margin: 0pt; }
.accordion-heading { padding-left: 1em; }
.btn-large {
padding: 10px;
font-size: 17px;
}
body {
color: black;
background: white;
}
header {
background: #88ab1c;
color: white;
}
header #tela { background: url("../logos/tela_transparent.png") no-repeat 2px 6px; }
header .titre {
font-style: italic;
font-size: 130%;
font-weight: bold;
text-shadow: 0pt 1px 1px #ed7826;
}
.gradient-bas {
background-image: linear-gradient(top, '' 0%, '' 100%);
background-image: -o-linear-gradient(top, '' 0%, '' 100%);
background-image: -moz-linear-gradient(top, '' 0%, '' 100%);
background-image: -webkit-linear-gradient(top, '' 0%, '' 100%);
background-image: -ms-linear-gradient(top, '' 0%, '' 100%);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #88ab1c), color-stop(1, white));
height: 16px;
display: block;
}
footer { display: none; }
.sci { font-style: italic; }
#principal {
margin-bottom: -1em;
padding-left: 0.5em;
}
#principal a:hover { text-decoration: none; }
#principal h4 {
font-size: 17px;
color: #ed7826;
text-shadow: 2px 1px 1px white;
}
#canvas_fleur, #canvas_fruit { width: 100%; }
#floraison_value, #fructification_value { display: none; }
.wrapper {
width: 120px;
height: 120px;
margin-left: auto;
margin-right: auto;
overflow: hidden;
}
.wrapper img {
height: 120px;
width: auto;
}
.wrapper ul { margin: 0pt; }
.wrapper_carte {
margin-left: auto;
margin-right: auto;
}
.wrapper_carte ul { margin: 0pt; }
.wrapper_carte #galerie_carte img { border: 1px solid #256226; }
#galerie_carte { list-style-type: none; }
.bas-de-page {
margin-top: 1em;
margin-bottom: 1em;
}
.en-savoir-plus {
margin-left: 0.2em;
float: left;
background: #88ab1c;
color: white;
text-shadow: 0pt 0pt 0pt black;
}
.en-savoir-plus:hover { text-decoration: none; }
.en-savoir-plus:visited { text-decoration: none; }
.haut-de-page {
margin-right: 0.2em;
float: right;
background: black;
color: white;
}
.haut-de-page:hover { text-decoration: none; }
.haut-de-page:visited { text-decoration: none; }
/trunk/modules/mobile/presentations/css/pyracantha_blanc.css
New file
0,0 → 1,179
.align-center { text-align: center; }
.margin-center {
margin-left: auto;
margin-right: auto;
}
.margin-bottom-05em { margin-bottom: 0.5em; }
.margin-right-05em { margin-right: 0.5em; }
.margin-top-05em { margin-top: 0.5em; }
.padding-05em { padding: 0.5em; }
.padding-left-1em { padding-left: 1em; }
.small-caps { font-variant: small-caps; }
.btn-large {
padding: 10px;
font-size: 17px;
}
.gradient-bas {
height: 16px;
display: block;
}
footer {
height: 60px;
width: 100%;
left: 0;
right: 0;
bottom: 0;
position: fixed;
z-index: 1000;
color: white;
background: black;
}
footer a { color: white; }
footer a:visited { color: white; }
.tela { margin-right: 0.5em; }
.titre {
font-style: italic;
font-size: 130%;
font-weight: bold;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.sci { font-style: italic; }
#div-infos { background: #88ab1c; }
#div-infos-latin {
margin-left: auto;
margin-right: auto;
}
#div-infos-latin .btn {
width: 99%;
padding-left: 0pt;
padding-right: 0pt;
box-shadow: 0pt 2px 3px black;
}
#div-infos-latin a { font-size: 16px; }
#div-infos-famille {
margin-left: auto;
margin-right: auto;
}
#div-infos-famille .btn {
width: 99%;
padding-left: 0pt;
padding-right: 0pt;
box-shadow: 0pt 2px 3px black;
}
#div-infos-famille a { font-size: 16px; }
#div-infos-famille { margin-top: -1em; }
#div-illustrations {
border-radius: 2em;
-moz-border-radius: 2em;
-webkit-border-radius: 2em;
background: white;
margin-top: -1em;
padding-top: 20px;
padding-bottom: 20px;
}
#galerie_carte { list-style-type: none; }
#slider-pictures {
max-width: 320px;
margin-left: auto;
margin-right: auto;
}
#slider-pictures .carousel { margin-bottom: 0pt; }
#slider-pictures .carousel-control { background: none; }
#slider-pictures .carousel-inner > .item > img {
width: 320px;
max-height: 310px;
}
#slider-pictures .carousel-indicators li { background: #256226; }
#slider-pictures .carousel-indicators .active { background: #ed7826; }
#slider-pictures .carousel-caption {
padding: 10px;
position: static;
}
#slider-pictures .carousel-caption h4 { font-size: 100%; }
#slider-pictures .carousel-caption p { font-size: 90%; }
#slider-pictures img {
margin-left: auto;
margin-right: auto;
}
#gstn-img {
max-height: 120px;
margin: 0.5em 0pt 1em 0pt;
display: inline-block;
}
#gstn-img img {
border: #eaeaea 2px solid;
width: 100px;
}
#gstn-img .zoom {
margin-top: 40px;
width: 20px;
border: none;
}
.resume {
text-align: center;
margin-top: 1em;
margin-bottom: 1em;
font-size: 16px;
}
.bas-de-page {
margin-top: 1em;
margin-bottom: 1em;
}
.en-savoir-plus {
float: left;
text-shadow: 0pt 0pt 0pt black;
}
.haut-de-page { float: right; }
.couleur1-bg, .couleur2-bg, body { background: white; }
header { background: #88ab1c; }
.tela img {
width: 60px;
max-width: 60px;
}
.titre {
color: white;
text-shadow: 0pt 1px 1px #ed7826;
}
.infos .bg {
padding: 0.2em;
border-radius: 0pt 0pt 1em 1em;
}
.infos .btn {
padding: 0pt;
border-radius: 1em 1em 0pt 0pt;
}
.infos .collapse { width: 100%; }
.infos h4 { color: #ed7826; }
.infos .textes {
padding: 0.5em 1em;
border-radius: 2em;
-moz-border-radius: 2em;
-webkit-border-radius: 2em;
-webkit-overflow-scrolling: touch;
}
.infos .textes h4 {
color: #256226;
text-shadow: 2px 1px 1px #88ab1c;
}
.resume { color: black; }
.gradient-bas {
background-image: linear-gradient(top, #88ab1c 0%, white 100%);
background-image: -o-linear-gradient(top, #88ab1c 0%, white 100%);
background-image: -moz-linear-gradient(top, #88ab1c 0%, white 100%);
background-image: -webkit-linear-gradient(top, #88ab1c 0%, white 100%);
background-image: -ms-linear-gradient(top, #88ab1c 0%, white 100%);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #88ab1c), color-stop(1, white));
}
.en-savoir-plus {
margin-left: 0.2em;
float: left;
color: white;
background: #88ab1c;
}
.haut-de-page {
margin-right: 0.2em;
float: right;
color: white;
background: black;
}
/trunk/modules/mobile/presentations/css/pyracantha_vert.css
New file
0,0 → 1,181
.align-center { text-align: center; }
.margin-center {
margin-left: auto;
margin-right: auto;
}
.margin-bottom-05em { margin-bottom: 0.5em; }
.margin-right-05em { margin-right: 0.5em; }
.margin-top-05em { margin-top: 0.5em; }
.padding-05em { padding: 0.5em; }
.padding-left-1em { padding-left: 1em; }
.small-caps { font-variant: small-caps; }
.btn-large {
padding: 10px;
font-size: 17px;
}
.gradient-bas {
height: 16px;
display: block;
}
footer {
height: 60px;
width: 100%;
left: 0;
right: 0;
bottom: 0;
position: fixed;
z-index: 1000;
color: white;
background: black;
}
footer a { color: white; }
footer a:visited { color: white; }
.tela { margin-right: 0.5em; }
.titre {
font-style: italic;
font-size: 130%;
font-weight: bold;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.sci { font-style: italic; }
#div-infos { background: #88ab1c; }
#div-infos-latin {
margin-left: auto;
margin-right: auto;
}
#div-infos-latin .btn {
width: 99%;
padding-left: 0pt;
padding-right: 0pt;
box-shadow: 0pt 2px 3px black;
}
#div-infos-latin a { font-size: 16px; }
#div-infos-famille {
margin-left: auto;
margin-right: auto;
}
#div-infos-famille .btn {
width: 99%;
padding-left: 0pt;
padding-right: 0pt;
box-shadow: 0pt 2px 3px black;
}
#div-infos-famille a { font-size: 16px; }
#div-infos-famille { margin-top: -1em; }
#div-illustrations {
border-radius: 2em;
-moz-border-radius: 2em;
-webkit-border-radius: 2em;
background: white;
margin-top: -1em;
padding-top: 20px;
padding-bottom: 20px;
}
#galerie_carte { list-style-type: none; }
#slider-pictures {
max-width: 320px;
margin-left: auto;
margin-right: auto;
}
#slider-pictures .carousel { margin-bottom: 0pt; }
#slider-pictures .carousel-control { background: none; }
#slider-pictures .carousel-inner > .item > img {
width: 320px;
max-height: 310px;
}
#slider-pictures .carousel-indicators li { background: #256226; }
#slider-pictures .carousel-indicators .active { background: #ed7826; }
#slider-pictures .carousel-caption {
padding: 10px;
position: static;
}
#slider-pictures .carousel-caption h4 { font-size: 100%; }
#slider-pictures .carousel-caption p { font-size: 90%; }
#slider-pictures img {
margin-left: auto;
margin-right: auto;
}
#gstn-img {
max-height: 120px;
margin: 0.5em 0pt 1em 0pt;
display: inline-block;
}
#gstn-img img {
border: #eaeaea 2px solid;
width: 100px;
}
#gstn-img .zoom {
margin-top: 40px;
width: 20px;
border: none;
}
.resume {
text-align: center;
margin-top: 1em;
margin-bottom: 1em;
font-size: 16px;
}
.bas-de-page {
margin-top: 1em;
margin-bottom: 1em;
}
.en-savoir-plus {
float: left;
text-shadow: 0pt 0pt 0pt black;
}
.haut-de-page { float: right; }
.couleur1-bg { background: #9ac342; }
.couleur2-bg { background: #88ab1c; }
body { background: white; }
header { background: #88ab1c; }
.tela img {
width: 60px;
max-width: 60px;
}
.titre {
color: white;
text-shadow: 0pt 1px 1px #ed7826;
}
.infos .bg {
padding: 0.2em;
border-radius: 0pt 0pt 1em 1em;
}
.infos .btn {
padding: 0pt;
border-radius: 1em 1em 0pt 0pt;
}
.infos .collapse { width: 100%; }
.infos .textes {
padding: 0.5em 1em;
border-radius: 2em;
-moz-border-radius: 2em;
-webkit-border-radius: 2em;
background: white;
-webkit-overflow-scrolling: touch;
}
.infos .textes h4 {
color: #256226;
text-shadow: 2px 1px 1px #88ab1c;
}
.resume { color: black; }
.gradient-bas {
background-image: linear-gradient(top, #88ab1c 0%, white 100%);
background-image: -o-linear-gradient(top, #88ab1c 0%, white 100%);
background-image: -moz-linear-gradient(top, #88ab1c 0%, white 100%);
background-image: -webkit-linear-gradient(top, #88ab1c 0%, white 100%);
background-image: -ms-linear-gradient(top, #88ab1c 0%, white 100%);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #88ab1c), color-stop(1, white));
}
.en-savoir-plus {
margin-left: 0.2em;
float: left;
color: white;
background: #b04dff;
}
.haut-de-page {
margin-right: 0.2em;
float: right;
color: white;
background: black;
}
/trunk/modules/mobile/presentations/css/pyracantha_tela.css
New file
0,0 → 1,187
.align-center { text-align: center; }
.margin-center {
margin-left: auto;
margin-right: auto;
}
.margin-bottom-05em { margin-bottom: 0.5em; }
.margin-right-05em { margin-right: 0.5em; }
.margin-top-05em { margin-top: 0.5em; }
.padding-05em { padding: 0.5em; }
.padding-left-1em { padding-left: 1em; }
.small-caps { font-variant: small-caps; }
.btn-large {
padding: 10px;
font-size: 17px;
}
.gradient-bas {
height: 16px;
display: block;
}
footer {
height: 60px;
width: 100%;
left: 0;
right: 0;
bottom: 0;
position: fixed;
z-index: 1000;
color: white;
background: black;
}
footer a { color: white; }
footer a:visited { color: white; }
.tela { margin-right: 0.5em; }
.titre {
font-style: italic;
font-size: 130%;
font-weight: bold;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.sci { font-style: italic; }
#div-infos { background: white; }
#div-infos-latin {
margin-left: auto;
margin-right: auto;
}
#div-infos-latin .btn {
width: 99%;
padding-left: 0pt;
padding-right: 0pt;
box-shadow: 0pt 2px 3px black;
}
#div-infos-latin a { font-size: 16px; }
#div-infos-famille {
margin-left: auto;
margin-right: auto;
}
#div-infos-famille .btn {
width: 99%;
padding-left: 0pt;
padding-right: 0pt;
box-shadow: 0pt 2px 3px black;
}
#div-infos-famille a { font-size: 16px; }
#div-infos-famille { margin-top: -1em; }
#div-illustrations {
border-radius: 2em;
-moz-border-radius: 2em;
-webkit-border-radius: 2em;
background: white;
margin-top: -1em;
padding-top: 20px;
padding-bottom: 20px;
}
#galerie_carte { list-style-type: none; }
#slider-pictures {
max-width: 320px;
margin-left: auto;
margin-right: auto;
}
#slider-pictures .carousel { margin-bottom: 0pt; }
#slider-pictures .carousel-control { background: none; }
#slider-pictures .carousel-inner > .item > img {
width: 320px;
max-height: 310px;
}
#slider-pictures .carousel-indicators li { background: #256226; }
#slider-pictures .carousel-indicators .active { background: #ed7826; }
#slider-pictures .carousel-caption {
padding: 10px;
position: static;
}
#slider-pictures .carousel-caption h4 { font-size: 100%; }
#slider-pictures .carousel-caption p { font-size: 90%; }
#slider-pictures img {
margin-left: auto;
margin-right: auto;
}
#gstn-img {
max-height: 120px;
margin: 0.5em 0pt 1em 0pt;
display: inline-block;
}
#gstn-img img {
border: #eaeaea 2px solid;
width: 100px;
}
#gstn-img .zoom {
margin-top: 40px;
width: 20px;
border: none;
}
.resume {
text-align: center;
margin-top: 1em;
margin-bottom: 1em;
font-size: 16px;
}
.bas-de-page {
margin-top: 1em;
margin-bottom: 1em;
}
.en-savoir-plus {
float: left;
text-shadow: 0pt 0pt 0pt black;
}
.haut-de-page { float: right; }
.couleur1-bg { background: #ed7826; }
.couleur2-bg { background: #88ab1c; }
body { background: #256226; }
header { background: white; }
.tela img {
width: 80px;
max-width: 80px;
}
.titre {
color: black;
text-shadow: 0pt 1px 1px #ed7826;
}
.infos .bg {
padding: 1em;
border-radius: 2em;
-moz-border-radius: 2em;
-webkit-border-radius: 2em;
}
.infos .btn {
padding: 0pt;
border-radius: 2em;
-moz-border-radius: 2em;
-webkit-border-radius: 2em;
}
.infos .collapse { width: 100%; }
.infos .textes {
padding: 1em;
border-radius: 2em;
-moz-border-radius: 2em;
-webkit-border-radius: 2em;
max-height: 220px;
overflow: auto;
background: #f3b88f;
-webkit-overflow-scrolling: touch;
}
.infos .textes h4 {
color: #256226;
text-shadow: 2px 1px 1px #88ab1c;
}
.resume { color: white; }
.gradient-bas {
background-image: linear-gradient(top, white 0%, #256226 100%);
background-image: -o-linear-gradient(top, white 0%, #256226 100%);
background-image: -moz-linear-gradient(top, white 0%, #256226 100%);
background-image: -webkit-linear-gradient(top, white 0%, #256226 100%);
background-image: -ms-linear-gradient(top, white 0%, #256226 100%);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, white), color-stop(1, #256226));
}
.en-savoir-plus {
margin-left: 0.2em;
float: left;
color: white;
background: #b04dff;
}
.haut-de-page {
margin-right: 0.2em;
float: right;
color: white;
background: black;
}
/trunk/modules/mobile/presentations/js/mobile.js
New file
0,0 → 1,165
$(document).ready(function() {
// Popover
$('.btn-pop').popover();
// CSS switcher
$('.toggle-button').click(function(e) {
$('link#custom-css').attr('href', $(this).attr('CssUrl'));
return false;
});
// Slider images : photoswipe
if (document.getElementById('galerie_carte')) {
var psc = $('#galerie_carte a').photoSwipe({
enableMouseWheel: false ,
enableKeyboard: false,
preventSlideshow: true
});
}
if (document.getElementById('galerie_images')) {
var psi = $('#galerie_images a').photoSwipe({
enableMouseWheel: false ,
enableKeyboard: false ,
captionAndToolbarAutoHideDelay: 0
});
}
// Slider images : bootstrap
if (document.getElementById('slider-pictures')) {
$('#slider-pictures').hide();
$('#slider-pictures').swiperight(function() {
$('#slider-pictures').carousel('prev');
});
$('#slider-pictures').swipeleft(function() {
$('#slider-pictures').carousel('next');
});
}
});
 
/*----------------------------------------------------------------------------------------------------------*/
// POPOVER
var nbrPopup = 0,
popupOuverte = false;
 
function gestionPopover() {
if (popupOuverte && nbrPopup != 0) {
$('.btn-pop').popover('hide');
popupOuverte = false;
}
nbrPopup++;
}
 
function resetPopover() {
nbrPopup = 0;
popupOuverte = true;
}
 
/*----------------------------------------------------------------------------------------------------------*/
// SLIDER BOOTSTRAP
function gestionSlider() {
if ($('#slider-pictures').is(':visible')) {
$('#gstn-img').show();
$('#slider-pictures').hide();
} else {
$('#gstn-img').hide();
$('#slider-pictures').show();
}
}
 
/*----------------------------------------------------------------------------------------------------------*/
// CANVAS FLORAISON, FRUCTIFICATION
var moisAbbr = new Array('J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D', ''),
intervalle = false;
 
function dessinCanvas(canvas, color, valeur) {
var ctx = canvas.getContext('2d'),
i = 0,
arr = getTableauMois(valeur),
index0 = arr[0],
index1 = -1,
size = canvas.width;
if (intervalle) {
index1 = arr[arr.length - 1];
}
for (var abscisse = 10; abscisse < size; abscisse += (size/13)) {
ctx.beginPath();
ctx.moveTo(abscisse, 0);
ctx.lineTo(abscisse, 55);
ctx.stroke();
 
if (in_array(i, arr)) {
if (i == index0 && index1 != -1) {
var linearGradient = ctx.createLinearGradient(abscisse, 10, abscisse+30, 10);
linearGradient.addColorStop(0, "#fff");
linearGradient.addColorStop(1, color);
ctx.beginPath();
ctx.fillStyle = linearGradient;
ctx.moveTo(abscisse, 25);
ctx.lineTo(abscisse+(size/13), 25);
ctx.lineTo(abscisse+(size/13), 10);
ctx.lineTo(abscisse, 25);
ctx.fill();
} else {
if (i == index1) {
var linearGradient = ctx.createLinearGradient(abscisse, 10, abscisse+25, 10);
 
linearGradient.addColorStop(0, color);
linearGradient.addColorStop(1, "#fff");
ctx.beginPath();
ctx.fillStyle = linearGradient;
ctx.moveTo(abscisse, 10);
ctx.lineTo(abscisse, 25);
ctx.lineTo(abscisse+(size/13), 25);
ctx.lineTo(abscisse, 10);
ctx.fill();
} else {
ctx.fillStyle = color;
ctx.fillRect(abscisse, 10, (size/13), 15);
}
}
}
ctx.font = '20px Georgia';
ctx.fillStyle = '#000';
ctx.fillText(moisAbbr[i++], abscisse + 5, 50);
}
}
 
function getTableauMois(elt) {
var arr = new Array(),
temp = elt.split('-');
 
if (typeof temp[1] === 'undefined') {
arr.push(elt);
} else {
intervalle = true;
temp[0] = parseInt(temp[0]);
temp[1] = parseInt(temp[1]);
if (temp[0] < temp[1]) {
for (var c = temp[0]; c <= temp[1]; c++) {
arr.push(c);
}
} else {
for (var c = temp[0]; c < 12; c++) {
arr.push(c);
}
for (var c = 0; c <= temp[1]; c++) {
arr.push(c);
}
}
}
return arr;
}
 
function in_array(needle, haystack) {
var inArray = 0;
for (var i in haystack) {
if (haystack[i] == needle) {
inArray++;
}
}
return (inArray != 0);
}
/trunk/modules/mobile/presentations/icones/altitude.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/trunk/modules/mobile/presentations/icones/altitude.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/trunk/modules/mobile/presentations/icones/zoom.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/trunk/modules/mobile/presentations/icones/zoom.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/trunk/modules/mobile/squelettes/fiche.tpl.html
New file
0,0 → 1,82
<!DOCTYPE html>
<html>
<head>
<title>Smart'Flore</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-script-type" content="text/javascript" />
<meta http-equiv="content-language" content="fr" />
<meta http-equiv="cache-control" content="no-cache">
<!-- Favicones -->
<link rel="shortcut icon" type="image/x-icon" href="http://www.tela-botanica.org/favicon.ico" />
<!-- Viewport -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
 
<!-- CSS -->
<link href="http://www.tela-botanica.org/commun/jquery/photoswipe/3.0.5/photoswipe.css" type="text/css" rel="stylesheet" />
<link href="http://www.tela-botanica.org/commun/bootstrap/2.3.1/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="<?= $css ?>" rel="stylesheet" type="text/css" id="custom-css" />
 
<!-- Javascript -->
<script src="http://www.tela-botanica.org/commun/jquery/1.7.1/jquery-1.7.1.min.js"></script>
<script src="http://www.tela-botanica.org/commun/jquery/photoswipe/3.0.5/klass.min.js"></script>
<script src="http://www.tela-botanica.org/commun/jquery/photoswipe/3.0.5/code.photoswipe.jquery-3.0.5.min.js"></script>
<script src="http://www.tela-botanica.org/commun/bootstrap/2.3.1/js/bootstrap.min.js"></script>
<script src="modules/mobile/presentations/js/mobile.js"></script>
<style>
.btn {border-radius:2em;}
.container-fluid {padding: 0px;}
[class*="span"] {margin-left: 0px;}
.accordion {margin-top: 1em;}
.accordion-heading .accordion-toggle {padding: 0pt 10px;}
</style>
</head>
 
 
<body class="container-fluid">
<?= $contenu_onglet; ?>
 
<div class="row-fluid bas-de-page">
<a href="<?= $permalien_num_nom; ?>" class="btn btn-large en-savoir-plus">
En savoir plus
<i class="icon-share"></i>
</a>
<a href="#up" class="btn btn-large haut-de-page">
<i class="icon-chevron-up icon-white"></i>
Haut de page
</a>
<div class="clearfix"></div>
<span class="conteneur_permalien">
<a href="<?= $lien ?>&theme=pyracantha"> Thème 1 </a>
<br />
<a href="<?= $lien ?>&theme=gentiana"> Thème 2 </a>
<br />
<a href="<?= $lien ?>&theme=gentiana2"> Thème 3 </a>
</span>
</div>
 
</div> <!-- Fin du bloc 'Haut de Page' -->
<footer>
<div class="row-fluid bas-de-page">
<div class="span3 margin-left-05em">
<a class="toggle-button" CssUrl="modules/mobile/presentations/css/pyracantha_tela.css">Skin Tela</a>
</div>
<div class="span3 margin-right-05em">
<a class="toggle-button" CssUrl="modules/mobile/presentations/css/pyracantha_vert.css">Skin Vert</a>
</div>
<div class="span3 margin-right-05em">
<a class="toggle-button" CssUrl="modules/mobile/presentations/css/pyracantha_blanc.css">Skin Blanc</a>
</div>
</div>
</footer>
</body>
</html>
/trunk/modules/mobile/squelettes/theme_gentiana_niveau1.tpl.html
New file
0,0 → 1,154
<?
$txt_latin = "Le nom latin est utilisé en sciences pour nommer un être vivant,
ou un groupe d'êtres vivants. On l'appelle aussi nom scientifique ou encore
nom savant, car il n'est pas employé couramment et parfois difficile à
retenir.";
$txt_famille = "Une famille rassemble des êtres vivants proches, qui se ressemblent, malgré leurs
différences. Les familles botaniques sont ainsi utilisées pour classer les végétaux et pour
estimer les similitudes ou affinités qu'il peut y avoir entre différentes plantes.";
 
$icones = array('icon-eye-open', 'icon-book', 'icon-certificate', 'icon-home', 'icon-flag');
$index_icones = 0;
$nb_onglets = 0;
?>
<div id="up">
<header class="row-fluid">
<div id="tela" class="padding-05em">
<div class="text-center titre">
<? if ($nomsCommuns[0]['nom_vernaculaire'] != '') : ?>
<?= $nomsCommuns[0]['nom_vernaculaire'] ?>
<? else : ?>
<? if ($texte['titre'][0] != '') : ?>
<?= $texte['titre'][0]; ?>
<? else : ?>
Aucun nom commun défini.
<? endif; ?>
<? endif; ?>
</div>
<div class="align-center">
<? if ($nom_retenu != '') : ?>
<?= $nom_retenu; ?>
<? else : ?>
Aucun nom scientifique.
<? endif; ?>
<? if ($famille != '') : ?>
(<span class="small-caps"><?= $famille; ?>)</span>
<? endif; ?>
</div>
</div>
</header>
<span class="gradient-bas"></span>
<div id="" class="row-fluid">
<div class="span6">
<div class="wrapper">
<ul id="galerie_images" class="gallery">
<? if (count($illustrations) != 0) : ?>
<? for($i = 0; $i < count($illustrations); $i++) : ?>
<? if (trim($illustrations[$i]['legende']['texte']) != '&nbsp;') : ?>
<? $alt = $illustrations[$i]['legende']['titre'].' ('.$illustrations[$i]['legende']['texte'].')'; ?>
<? else : ?>
<? $alt = $illustrations[$i]['legende']['titre']; ?>
<? endif; ?>
<li>
<a href="<?= $illustrations[$i]['src'] ?>" rel="external">
<img src="<?= $illustrations[$i]['src'] ?>" alt="<?= $alt; ?>" />
</a>
</li>
<? endfor; ?>
<? endif; ?>
</ul>
</div>
</div>
<div class="span6">
<div class="wrapper_carte half-width">
<ul id="galerie_carte" class="gallery">
<li>
<a href="<?= $repartition['chorodep'] ?>" rel="external">
<img src="<?= $repartition['chorodep'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="row-fluid margin-top-05em padding-left-01em">
<div class="span12 bordered">
<i class="margin-top-03em margin-left-03em icon-leaf pull-left"></i>
<div class="margin-left-05em pull-left">Floraison</div>
<? if ($floraison['floraison'] != -1) : ?>
<canvas id="canvas_fleur" height="60"></canvas>
<span id="floraison_value"><?= $floraison['floraison'] ?></span>
<? else : ?>
<br />Aucune information.
<? endif; ?>
</div>
</div>
 
<div class="row-fluid margin-top-05em padding-left-01em">
<div class="span12 bordered">
<i class="margin-top-03em margin-left-03em icon-asterisk pull-left"></i>
<div class="margin-left-05em pull-left">Fructification</div>
<? if ($floraison['fructification'] != -1) : ?>
<canvas id="canvas_fruit" height="60"></canvas>
<span id="fructification_value"><?= $floraison['fructification'] ?></span>
<? else : ?>
<br />Aucune information.
<? endif; ?>
</div>
</div>
</div>
<script type="text/javascript">
var fleur = document.getElementById('floraison_value'),
fruit = document.getElementById('fructification_value');
if (fleur) {
dessinCanvas(document.getElementById('canvas_fleur'), '#00F', fleur.innerHTML);
}
if (fruit) {
dessinCanvas(document.getElementById('canvas_fruit'), '#F00', fruit.innerHTML);
}
</script>
 
<div class="clearfix"></div>
<div id="principal">
<? if (count($texte['corps']) > 1) : ?>
<?= $texte['corps'][2]; ?>
<div class="accordion" id="accordion2">
<? for($c = 3; $c < count($texte['corps'])-1; $c+=2) : ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse_<?= $c; ?>">
<h4>
<i class="<?= $icones[$index_icones++]; ?> margin-left-1em margin-top-03em"></i>
<?= $texte['corps'][$c]; ?>
</h4>
</a>
</div>
<div id="collapse_<?= $c; ?>" class="accordion-body collapse">
<div class="accordion-inner">
<?= $texte['corps'][$c+1]; ?>
</div>
</div>
</div>
<? endfor; ?>
</div>
<? else : ?>
<? if ($floraison['coste']['description']['texte'] != '') : ?>
<?= $floraison['coste']['description']['texte']; ?>
<? else : ?>
<? if (count($floraison['baseflor']) > 1) : ?>
<? foreach ($floraison['baseflor'] as $index => $texte) : ?>
<? if ($floraison['baseflor'][$index] != '') : ?>
<?= $index.' : '.$texte; ?> <br />
<? endif; ?>
<? endforeach; ?>
<? else : ?>
<?= $txt_vide; ?>
<? endif; ?>
<? endif; ?>
<? endif; ?>
</div>
</div>
/trunk/modules/mobile/squelettes/theme_gentiana2_niveau1.tpl.html
New file
0,0 → 1,165
<?
$txt_latin = "Le nom latin est utilisé en sciences pour nommer un être vivant,
ou un groupe d'êtres vivants. On l'appelle aussi nom scientifique ou encore
nom savant, car il n'est pas employé couramment et parfois difficile à
retenir.";
$txt_famille = "Une famille rassemble des êtres vivants proches, qui se ressemblent, malgré leurs
différences. Les familles botaniques sont ainsi utilisées pour classer les végétaux et pour
estimer les similitudes ou affinités qu'il peut y avoir entre différentes plantes.";
 
$icones = array('icon-eye-open', 'icon-book', 'icon-certificate', 'icon-home', 'icon-flag');
$index_icones = 0;
 
$nb_onglets = 0;
?>
<div id="up">
 
<header class="row-fluid">
<div id="tela" class="padding-05em">
<div class="text-center titre">
<? if ($nomsCommuns[0]['nom_vernaculaire'] != '') : ?>
<?= $nomsCommuns[0]['nom_vernaculaire'] ?>
<? else : ?>
Aucun nom commun défini.
<? endif; ?>
</div>
<div class="align-center">
<? if ($nom_retenu != '') : ?>
<?= $nom_retenu; ?>
<? else : ?>
Aucun nom scientifique.
<? endif; ?>
<? if ($famille != '') : ?>
(<span class="small-caps"><?= $famille; ?>)</span>
<? endif; ?>
</div>
</div>
</header>
<span class="gradient-bas"></span>
<div class="row-fluid">
<div class="span12">
<div class="row-fluid">
<div class="span5 margin-bottom-05em margin-right-02em margin-center">
<div class="wrapper margin-left-03em">
<ul id="galerie_images" class="gallery">
<? if (count($illustrations) != 0) : ?>
<? for($i = 0; $i < count($illustrations); $i++) : ?>
<? if (trim($illustrations[$i]['legende']['texte']) != '&nbsp;') : ?>
<? $alt = $illustrations[$i]['legende']['titre'].' ('.$illustrations[$i]['legende']['texte'].')'; ?>
<? else : ?>
<? $alt = $illustrations[$i]['legende']['titre']; ?>
<? endif; ?>
<li>
<a href="<?= $illustrations[$i]['src'] ?>" rel="external">
<img src="<?= $illustrations[$i]['src'] ?>" alt="<?= $alt; ?>" />
</a>
</li>
<? endfor; ?>
<? endif; ?>
</ul>
</div>
<div class="row-fluid margin-top-05em padding-left-01em" id="icons">
<div class="span6">
<div class="wrapper_carte">
<ul id="galerie_carte" class="gallery">
<li>
<a href="<?= $repartition['chorodep'] ?>" rel="external">
<img src="<?= $repartition['chorodep'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
</a>
</li>
</ul>
</div>
</div>
<div class="span6 bordered">
<img src="modules/mobile/presentations/icones/altitude.png"/>
</div>
</div>
<? if ($floraison['floraison'] != -1) : ?>
<div class="row-fluid margin-top-05em padding-left-01em">
<div class="span12 bordered">
<i class="margin-top-03em margin-left-03em icon-leaf pull-left"></i>
<div class="margin-left-05em pull-left">Floraison</div>
<canvas id="canvas_fleur" height="60"></canvas>
<span id="floraison_value"><?= $floraison['floraison'] ?></span>
</div>
</div>
<? endif; ?>
 
<? if ($floraison['fructification'] != -1) : ?>
<div class="row-fluid margin-top-05em padding-left-01em">
<div class="span12 bordered">
<i class="margin-top-03em margin-left-03em icon-asterisk pull-left"></i>
<div class="margin-left-05em pull-left">Fructification</div>
<canvas id="canvas_fruit" height="60"></canvas>
<span id="fructification_value"><?= $floraison['fructification'] ?></span>
</div>
</div>
<? endif; ?>
</div>
<script type="text/javascript">
var fleur = document.getElementById('floraison_value'),
fruit = document.getElementById('fructification_value');
if (fleur) {
dessinCanvas(document.getElementById('canvas_fleur'), '#00F', fleur.innerHTML);
}
if (fruit) {
dessinCanvas(document.getElementById('canvas_fruit'), '#F00', fruit.innerHTML);
}
</script>
<div id="principal">
<? if (count($texte['corps']) > 1) : ?>
<?= $texte['corps'][2]; ?>
<div class="clearfix">
<h4>
<i class="<?= $icones[$index_icones++]; ?> margin-left-1em margin-top-03em"></i>
<?= $texte['corps'][3]; ?>
</h4>
<?= $texte['corps'][4]; ?>
</div>
<div class="accordion" id="accordion2">
<? for($c = 3; $c < count($texte['corps'])-1; $c+=2) : ?>
<? if ($c != 3) : ?>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse_<?= $c; ?>">
<h4>
<i class="<?= $icones[$index_icones++]; ?> margin-left-1em margin-top-03em"></i>
<?= $texte['corps'][$c]; ?>
</h4>
</a>
</div>
<div id="collapse_<?= $c; ?>" class="accordion-body collapse">
<div class="accordion-inner">
<?= $texte['corps'][$c+1]; ?>
</div>
</div>
</div>
<? endif; ?>
<? endfor; ?>
</div>
<? else : ?>
<? if ($floraison['coste']['description']['texte'] != '') : ?>
<?= $floraison['coste']['description']['texte']; ?>
<? else : ?>
<? if (count($floraison['baseflor']) > 1) : ?>
<? foreach ($floraison['baseflor'] as $index => $texte) : ?>
<? if ($floraison['baseflor'][$index] != '') : ?>
<?= $index.' : '.$texte; ?> <br />
<? endif; ?>
<? endforeach; ?>
<? else : ?>
<?= $txt_vide; ?>
<? endif; ?>
<? endif; ?>
<? endif; ?>
</div>
</div>
</div> <!-- span12 englobant -->
</div>
/trunk/modules/mobile/squelettes/theme_pyracantha_niveau1.tpl.html
New file
0,0 → 1,174
<?
$txt_latin = "<div onclick='gestionPopover();'>
Le nom latin est utilisé en sciences pour nommer un être vivant,
ou un groupe d'êtres vivants. On l'appelle aussi nom scientifique ou encore
nom savant, car il n'est pas employé couramment et parfois difficile à retenir.
</div>";
$txt_famille = "<div onclick='gestionPopover();'>
Une famille rassemble des êtres vivants proches, qui se ressemblent, malgré leurs
différences. Les familles botaniques sont ainsi utilisées pour classer les végétaux et pour
estimer les similitudes ou affinités qu'il peut y avoir entre différentes plantes.
</div>";
 
$icones = array('icon-eye-open', 'icon-book', 'icon-certificate', 'icon-home', 'icon-flag');
$index_icones = 0;
 
$txt_vide = "Aucune donnée disponible.";
$nb_onglets = 0;
?>
<div id="up" onclick="gestionPopover();">
<header class="row-fluid">
<div class="padding-05em">
<div class="tela pull-left">
<a href="http://tela-botanica.org" rel="external" title="Retour à Tela-Botanica.org">
<img src="modules/mobile/presentations/logos/tela.png" alt="Logo Tela" />
</a>
</div>
<div class="text-center titre">
<? if ($nomsCommuns[0]['nom_vernaculaire'] != '') : ?>
<?= $nomsCommuns[0]['nom_vernaculaire'] ?>
<? else : ?>
<? if ($texte['titre'][0] != '') : ?>
<?= $texte['titre'][0]; ?>
<? else : ?>
Aucun nom commun défini.
<? endif; ?>
<? endif; ?>
</div>
</div>
</header>
<div id="div-infos">
<div id="div-infos-latin" class="row-fluid">
<div class="align-center">
<a href="#div-infos-latin" class="btn btn-large btn-pop"
data-content="<?= $txt_latin; ?>" data-html="true"
data-placement="bottom" data-toggle="popover"
data-original-title="<div onclick='gestionPopover();'>Pourquoi un nom latin ?</div>"
onclick="resetPopover();">
<? if ($nom_retenu != '') : ?>
<?= $nom_retenu; ?>
<? else : ?>
Aucun nom scientifique.
<? endif; ?>
</a>
</div>
</div>
<div id="div-illustrations" class="row-fluid">
<? if (count($illustrations) != 0) : ?>
<div class="align-center" onclick="gestionSlider();">
<a href="#btn-latin" class="" id="gstn-img">
<img src="<?= $illustrations[0]['src'] ?>" alt="Miniature" class="pull-left">
<img src="modules/mobile/presentations/icones/zoom.png" class="zoom pull-left"/>
<img src="<?= $illustrations[1]['src'] ?>" alt="Miniature" class="pull-left">
</a>
</div>
<div id="slider-pictures" class="carousel slide margin-top-05em">
<button class="btn btn-large" onclick="gestionSlider();">
<i class="icon-remove pull-left"></i>
</button>
<ol class="carousel-indicators">
<? for($i = 0; $i < count($illustrations); $i++) : ?>
<li data-target="#slider-pictures" data-slide-to="<?= $i ?>" class="<?= ($i == 0) ? 'active' : ''; ?>"></li>
<? endfor; ?>
</ol>
<div class="carousel-inner">
<? for($i = 0; $i < count($illustrations); $i++) : ?>
<div class="item <?= ($i == 0) ? ' active' : ''; ?>">
<img src="<?= $illustrations[$i]['src'] ?>" alt="Image_<?= $i ?>" >
<div class="carousel-caption">
<h4><?= $illustrations[$i]['legende']['titre'] ?></h4>
<p><?= $illustrations[$i]['legende']['texte'] ?></p>
</div>
</div>
<? endfor; ?>
</div>
<a class="left carousel-control" href="#slider-pictures" data-slide="prev">&lsaquo;</a>
<a class="right carousel-control" href="#slider-pictures" data-slide="next">&rsaquo;</a>
</div>
<? endif; ?>
</div>
<div id="div-infos-famille" class="row-fluid">
<div class="align-center">
<a href="#div-infos-famille" class="btn btn-large btn-pop" data-content="<?= $txt_famille; ?>"
data-placement="bottom" data-toggle="popover" data-html="true"
data-original-title="<div onclick='gestionPopover();'>Pourquoi une famille de plante ?</div>"
onclick="resetPopover();">
<? if ($famille != '') : ?>
Famille des <span class="small-caps"><?= $famille; ?></span>
<? else : ?>
<span class="none">En savoir plus sur les familles de plante</span>
<? endif; ?>
</a>
</div>
</div>
</div>
<span class="gradient-bas"></span>
<?= $floraison['coste']['texte']; ?>
<div class="resume">
<? if (count($texte['corps']) > 1) : ?>
<?= $texte['corps'][2]; ?>
</div>
<? for($index = 3; $index < count($texte['corps'])-1; $index+=2) : ?>
<? if (isset($texte['corps'][$c+1])) :
$nb_onglets++;
$class = ($nb_onglets % 2 == 0) ? "couleur1-bg" : "couleur2-bg";
?>
<div class="row-fluid infos">
<div class="btn btn-block <?= $class ?>" data-toggle="collapse" data-target="#c<?= $index ?>">
<h4 class="padding-left-1em">
<i class="<?= $icones[$index_icones++]; ?> pull-left"></i>
<?= $texte['corps'][$index]; ?>
</h4>
</div>
<div id="c<?= $index ?>" class="collapse">
<div class="bg <?= $class ?>">
<div class="textes">
<? if ($index == 9) : ?>
<div class="span6 margin-right-05em">
Carte de répartition <br />
<ul id="galerie_carte" class="gallery style-none margin-center">
<li>
<a href="<?= $repartition['chorodep'] ?>" rel="external">
<img src="<?= $repartition['chorodep'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
</a>
</li>
</ul>
</div>
<div class="">
<?= $texte['corps'][$index+1]; ?>
</div>
<div class="clearfix"></div>
<? else : ?>
<?= $texte['corps'][$index+1]; ?>
<? endif; ?>
</div> <!-- Fin de la zone de texte -->
</div>
</div> <!-- Fin de la zone déroulante -->
</div> <!-- Fin du bloc infos -->
<? endif; ?>
<? endfor; ?>
<? else : ?>
<? if ($floraison['coste']['description']['texte'] != '') : ?>
<?= $floraison['coste']['description']['texte']; ?>
<? else : ?>
<? if (count($floraison['baseflor']) > 1) : ?>
<? foreach ($floraison['baseflor'] as $index => $texte) : ?>
<? if ($floraison['baseflor'][$index] != '') : ?>
<?= $index.' : '.$texte; ?> <br />
<? endif; ?>
<? endforeach; ?>
<? else : ?>
<?= $txt_vide; ?>
<? endif; ?>
<? endif; ?>
</div>
<? endif; ?>
/trunk/modules/mobile/sources/Texte.php
New file
0,0 → 1,107
<?php
// declare(encoding='UTF-8');
/**
* Classe Mobile Wikini.
*
* @category PHP 5.2
* @package eflore-consultation
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @author Delphine CAUQUIL <delphine@tela-botanica.org>
* @author Isabelle NEMBROT <isabelle.nembrot@tela-botanica.org>
* @copyright 2013 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 Texte extends aControleur {
 
private $conteneur = null;
private $donnees = array();
private $format = "text/html";
 
public function __construct(Conteneur $conteneur) {
$this->conteneur = $conteneur;
$this->nomCourant = $this->conteneur->getNomCourant();
parent::__construct();
}
public function getDonnees() {
$url_wiki = $this->obtenirUrlWikini();
$obj = json_decode(file_get_contents($url_wiki));
$this->donnees['corps'] = $obj->{'texte'};
if (strpos($this->format, "html") != false) {
$this->obtenirCorpsHtml();
} else {
$this->obtenirCorpsPlain();
}
if ($this->donnees['corps'] != "") {
$this->donnees['corps'] = preg_split('/===/', $this->donnees['corps'], -1, PREG_SPLIT_NO_EMPTY);
$this->donnees['titre'] = $this->donnees['corps'][0];
if (strpos($this->format, "html") != false) {
$this->obtenirTitreHtml();
} else {
$this->obtenirTitrePlain();
}
}
return $this->donnees;
}
//formater pour AppUrls ?
public function obtenirUrlWikini() {
$titre = urlencode("Fiche simplifiée Smart'flore");
$url_wiki = "http://www.tela-botanica.org/wikini/eFloreRedaction/api/rest/0.5/pages/SmartFlore"
.strtoupper($this->conteneur->getParametre('referentiel'))."nt".$this->nomCourant->getNomSelectionne()->get('num_taxonomique')
."?txt.format=".$this->format."&txt.section.titre=".$titre;
return ($url_wiki);
}
private function obtenirCorpsHtml() {
$a_remplacer = array('<h3>', '</h3>');
$this->donnees['corps'] = str_replace($a_remplacer, "===", $this->donnees['corps']);
}
private function obtenirCorpsPlain() {
$a_enlever = array(Chr(10).'=', '='.Chr(10), Chr(10).''.Chr(10));
$this->donnees['corps'] = str_replace($a_enlever, '', $this->donnees['corps']);
$this->donnees['corps'] = str_replace(Chr(10), '<br />', $this->donnees['corps']);
}
private function obtenirTitreHtml() {
$a_remplacer = array('<b>', '</b>', '(<br />', '<br />)');
$this->donnees['titre'] = str_replace($a_remplacer, '<br />', $this->donnees['titre']);
$a_enlever = array(Chr(10).'<br />', '<br />'.Chr(10), Chr(10).''.Chr(10), '<br />'.Chr(10).'<br />'.Chr(10));
$this->donnees['titre'] = str_replace($a_enlever, '', $this->donnees['titre']);
$this->separer_NomCommun_NomSci();
}
 
private function separer_NomCommun_NomSci() {
$this->donnees['titre'] = str_replace('<br />', '::', $this->donnees['titre']);
$this->donnees['titre'] = preg_split("/::/", $this->donnees['titre'], -1, PREG_SPLIT_NO_EMPTY);
}
private function obtenirTitrePlain() {
$this->donnees['titre'] = str_replace('**', '<br />', $this->donnees['titre']);
$a_remplacer = array('(<br />', '<br />)', '<br /><br />');
$this->donnees['titre'] = str_replace($a_remplacer, '<br />', $this->donnees['titre']);
$this->separer_NomCommun_NomSci();
$this->separer_NomSci_NomAuteur();
}
 
private function separer_NomSci_NomAuteur() {
$nom_sci = str_replace('//', '::', $this->donnees['titre'][1]);
$nom_sci = preg_split("/::/", $nom_sci, -1, PREG_SPLIT_NO_EMPTY);
$this->donnees['titre'][1] = "<i>".$nom_sci[0]."</i> ".$nom_sci[1];
}
}
?>
/trunk/modules/mobile/sources/Floraison.php
New file
0,0 → 1,193
<?php
// declare(encoding='UTF-8');
/**
* Classe mère du module Liste.
*
* @category PHP 5.2
* @package eflore-consultation
* @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 Floraison extends aControleur {
 
private $conteneur = null;
private $nomCourant = null;
private $textes = null;
private $meta = null;
private $wikini = null;
private $informations = null;
private $mois = array('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août',
'septembre', 'octobre', 'novembre', 'décembre');
private $CosteFormate;
private $CosteTexte;
private $referentiel = 'bdtfx';
private $donnees = array();
 
public function __construct(Conteneur $conteneur) {
$this->conteneur = $conteneur;
$this->nomCourant = $this->conteneur->getNomCourant();
$this->referentiel = $this->conteneur->getParametre('referentiel');
$this->textes = $this->conteneur->getApiTextes();
$this->wikini = $this->conteneur->getApiWikini();
$this->meta = $this->conteneur->getApiMetaDonnees();
$this->informations = $this->conteneur->getApiInformations();
$this->appUrls = $this->conteneur->getAppUrls();
}
public function getDonnees() {
$this->getCoste();
if (isset($this->CosteFormate['floraison'])) {
$this->donnees['floraison'] = $this->getIndiceMois($this->CosteFormate['floraison']);
} else {
$this->getFloraisonBaseflor();
}
if (isset($this->CosteFormate['fructification'])) {
$this->donnees['fructification'] = $this->getIndiceMois($this->CosteFormate['fructification']);
} else {
$this->donnees['fructification'] = -1;
}
return $this->donnees;
}
private function getCoste() {
$coste = array();
$this->textes->setProjet('coste');
$this->textes->setId('bdtfx.nn:'.$this->nomCourant->getNnr());
$texte = $this->textes->getTexte();
if ($texte) {
$coste['titre'] = $texte['titre'];
$coste['description'] = $this->mettreEnFormeCoste($texte['texte']);
}
$this->donnees['coste'] = $coste;
}
private function getIndiceMois($elt) {
$mois = array('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août',
'septembre', 'octobre', 'novembre', 'décembre');
$indice_mois = -1;
$elt = $this->nettoyerTexte($elt);
$arr = preg_split('/-/', $elt, -1, PREG_SPLIT_NO_EMPTY);
if (isset($arr[1])) {
$mois1 = $this->getIndiceMois($arr[0]);
$mois2 = $this->getIndiceMois($arr[1]);
$indice_mois = $mois1.'-'.$mois2;
} else {
for ($i = 0; $i < count($mois); $i++) {
if ($elt == $mois[$i]) {
$indice_mois = $i;
}
}
}
return $indice_mois;
}
private function nettoyerTexte($texte) {
$texte = trim($texte);
$a_effacer = array('.', ' ', 'de');
$texte = str_replace($a_effacer, '', $texte);
 
$texte = strtolower($texte);
return $texte;
}
 
private function getFloraisonBaseflor() {
$baseflor = array();
$this->informations->setProjet('baseflor');
$this->informations->setBdnt($this->conteneur->getParametre('referentiel'));
$this->informations->setNum_nom($this->conteneur->getParametre('num_nom'));
$informations = $this->informations->getInformationsDescription();
if ($informations){
$baseflor['chorologie'] = isset($informations['chorologie']) ? $informations['chorologie'] : '';
$baseflor['inflorescence'] = isset($informations['inflorescence']) ? $informations['inflorescence'] : '';
$baseflor['sexualite'] = isset($informations['sexualite']) ? $informations['sexualite'] : '';
$baseflor['ordre_maturation'] = isset($informations['ordre_maturation']) ? $informations['ordre_maturation'] : '';
$baseflor['pollinisation'] = isset($informations['pollinisation']) ? $informations['pollinisation'] : '';
$baseflor['dissemination'] = isset($informations['dissemination']) ? $informations['dissemination'] : '';
$baseflor['fruit'] = isset($informations['fruit']) ? $informations['fruit'] : '';
$baseflor['couleur_fleur'] = isset($informations['couleur_fleur']) ? $informations['couleur_fleur'] : '';
$baseflor['macule'] = isset($informations['macule']) ? $informations['macule'] : '';
$baseflor['type_bio'] = isset($informations['type_bio']) ? $informations['type_bio'] : '';
$baseflor['form_vegetale'] = isset($informations['form_vegetale']) ? $informations['form_vegetale'] : '';
$baseflor['floraison'] = isset($informations['floraison']) ? $informations['floraison'] : '';
}
$this->donnees['baseflor'] = $baseflor;
$this->donnees['floraison'] = $baseflor['floraison'];
}
 
 
public function mettreEnFormeCoste($texte){
$this->CosteFormate = array();
$this->CosteTexte = $texte;
//decouper elements remarquables avant le texte
$this->separerNomScientifique_a_NomCommun();
$this->CosteTexte = preg_replace('/\//','',$this->CosteTexte);
//decouper elements remarquables après le texte
$this->separerEcologie_a_Usages();
//le morceau qui reste est le gros de la description
$this->CosteTexte = str_replace(';','<br /> -','- '.$this->CosteTexte);
$this->CosteTexte = str_replace('–','',$this->CosteTexte);
$this->CosteFormate['texte'] = htmlspecialchars_decode(htmlentities($this->CosteTexte, ENT_NOQUOTES, 'UTF-8'), ENT_NOQUOTES);
return $this->CosteFormate;
}
 
public function separerNomScientifique_a_NomCommun(){
if ( preg_match('/\*\*(.+)\*\*([^–]*)–/', $this->CosteTexte, $retour)){
/* !! attention on enlève un tiret cadratin – pas un trait d'union - !! */
$a_enlever = array('/–/','/\./' );
$this->CosteFormate['nom_scientifique'] = preg_replace($a_enlever,'',$retour[1]);
if(preg_match('/\((.+)\)/',$retour[2],$synonymes)){
$this->CosteFormate['synonymes'] = $synonymes[1];
} else {
$this->CosteFormate['nom_scientifique'] .= $retour[2];
}
$this->CosteTexte = str_replace($retour[0],'',$this->CosteTexte);
}
/* !! attention il y a un espace avant les // du début !! */
if ( preg_match('/^ \/\/([^\/\/]+)\/\//', $this->CosteTexte, $retour)){
$a_enlever = array('/–/','/\./' );
$this->CosteFormate['nom_commun'] = preg_replace($a_enlever,'',$retour[1]);
$this->CosteTexte = str_replace($retour[0],'',$this->CosteTexte);
}
}
 
public function separerEcologie_a_Usages(){
if ( preg_match('/\.[ ]*([A-ZÉÀÈ].+)$/',$this->CosteTexte, $retour)){
$this->CosteFormate['ecologie'] = $retour[1];
$this->CosteTexte = str_replace($retour[0],'.',$this->CosteTexte);
if (isset($this->CosteFormate['ecologie']) && preg_match('/–(.+)/', $this->CosteFormate['ecologie'] , $retour)){
$this->CosteFormate['repartition'] = $retour[1];
$this->CosteFormate['ecologie'] = str_replace($retour[0],'',$this->CosteFormate['ecologie']);
}
if (isset($this->CosteFormate['repartition']) && preg_match('/=(.+)$/', $this->CosteFormate['repartition'], $retour)){
$this->CosteFormate['floraison'] = $retour[1];
$this->CosteFormate['repartition'] = str_replace($retour[0],'',$this->CosteFormate['repartition']);
}
if (isset($this->CosteFormate['floraison']) && preg_match('/–(.+)$|\n(.+)$/',$this->CosteFormate['floraison'], $retour)){
$this->CosteFormate['usages'] = isset($retour[1]) ? $retour[1] : $retour[2];
$this->CosteFormate['floraison'] = str_replace($retour[0],'.',$this->CosteFormate['floraison']);
}
if (isset($this->CosteFormate['floraison']) && preg_match('/([Ff]l\.) (.+)/',$this->CosteFormate['floraison'], $retour)){
$this->CosteFormate['floraison'] = $retour[2];
$this->CosteFormate['floraison'] = str_replace($retour[1],'',$this->CosteFormate['floraison']);
}
if (isset($this->CosteFormate['floraison']) && preg_match('/([Ff]r\.) (.+)/',$this->CosteFormate['floraison'], $retour)){
$this->CosteFormate['fructification'] = $retour[2];
$this->CosteFormate['floraison'] = str_replace($retour[0],'',$this->CosteFormate['floraison']);
$this->CosteFormate['floraison'] = str_replace(',','',$this->CosteFormate['floraison']);
$this->CosteFormate['fructification'] = str_replace($retour[1],'',$this->CosteFormate['fructification']);
$this->CosteFormate['fructification'] = str_replace('.','',$this->CosteFormate['fructification']);
}
}
}
}
?>
/trunk/modules/mobile/sources/Illustrations.php
New file
0,0 → 1,120
<?php
// declare(encoding='UTF-8');
/**
* Classe mère du module Liste.
*
* @category PHP 5.2
* @package eflore-consultation
* @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 Illustrations extends aControleur {
 
private $conteneur = null;
private $nomCourant = null;
private $images = null;
private $appUrls = null;
private $meta = null;
private $referentiel = 'bdtfx';
private $donnees = array();
 
public function __construct(Conteneur $conteneur) {
$this->conteneur = $conteneur;
$this->nomCourant = $this->conteneur->getNomCourant();
$this->referentiel = $this->conteneur->getParametre('referentiel');
$this->images = $this->conteneur->getApiImages();
$this->appUrls = $this->conteneur->getAppUrls();
$this->meta = $this->conteneur->getApiMetaDonnees();
}
 
public function getDonnees() {
$this->donnees = array();
$this->getPhotos();
$dessin = $this->addDessin();
if (!empty($dessin)) {
array_push($this->donnees, $dessin);
}
 
return $this->donnees;
}
public function getPhotos() {
$projets[] = Config::get($this->referentiel.'.baseImages');
$projets[] = Config::get($this->referentiel.'.baseImagesSupp');
foreach ($projets as $projet) {
if ($projet != "") {
$images = $this->initialiserPhotos($projet);
$this->formaterListePhotos($projet, $images);
}
}
}
private function initialiserPhotos($projet) {
$this->images->setProjet($projet);
$nnr = $this->nomCourant->getNnr();
return $this->images->getInfosImagesParIdsNoms(array($nnr));
}
private function formaterListePhotos($projet, $images) {
$max = Config::get('pictures.number.max');
foreach ($images as $idImg => $img) {
$infosImg['src'] = htmlentities($img['binaire.href']);
if ($img['auteur.libelle'] != '') {
$infosImg['legende']['titre'] = htmlentities($img['auteur.libelle']);
} else {
$infosImg['legende']['titre'] = "Anonyme";
}
if ($img['date'] != '') {
$infosImg['legende']['titre'] .= ", le ".htmlentities($this->formaterDateImg($img['date']));
}
if ($img['station.libelle'] != '') {
$infosImg['legende']['texte'] = htmlentities($img['station.libelle']);
} else {
$infosImg['legende']['texte'] = "&nbsp;";
}
array_push($this->donnees, $infosImg);
if (--$max <= 0) {
return null;
}
}
}
 
private function formaterDateImg($date) {
$dateFmt = $date;
if ($date == '0000-00-00' || $date == '1970-01-01 01:01:01') {
$dateFmt = 'inconnue';
} else {
$dateFmt = strftime('%e %B %Y', strtotime($date));
}
return $dateFmt;
}
public function addDessin() {
$img = array();
$projet = Config::get($this->referentiel.'.baseDessins');
if ($projet != "") {
$dessin = array();
$tax = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
$this->images->setProjet($projet);
$this->images->setNnTaxon($tax);
$costeImg = $this->images->getInfosImagesTaxons();
if (count($costeImg) != 0) {
$img['src'] = $costeImg[key($costeImg)]['binaire.href'];
$img['legende']['titre'] = "Illustration de Coste";
$img['legende']['texte'] = "&nbsp;";
}
}
 
return $img;
}
}
?>
/trunk/modules/mobile/sources/NomsCommuns.php
New file
0,0 → 1,40
<?php
// declare(encoding='UTF-8');
/**
* Classe mère du module Liste.
*
* @category PHP 5.2
* @package eflore-consultation
* @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 NomsCommuns extends aControleur {
 
private $conteneur = null;
private $nomCourant = null;
private $nomsVernaculaires = null;
private $referentiel = 'bdtfx';
private $donnees = array();
 
public function __construct(Conteneur $conteneur) {
$this->conteneur = $conteneur;
$this->nomCourant = $this->conteneur->getNomCourant();
$this->nomsVernaculaires = $this->conteneur->getApiNomsVernaculaires();
$this->referentiel = $this->conteneur->getParametre('referentiel');
}
public function getDonnees() {
$nt = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
$projet = Config::get($this->referentiel.'.referentielVerna');
if ($projet != '') {
$nomsVerna = $this->nomsVernaculaires->getRechercheLimitee($projet, $nt);
$this->donnees = (isset($nomsVerna['resultat']) && is_array($nomsVerna['resultat'])) ? array_slice($nomsVerna['resultat'], 0, 1) : array();
}
return $this->donnees;
}
}
?>
/trunk/modules/mobile/sources/Repartition.php
New file
0,0 → 1,47
<?php
// declare(encoding='UTF-8');
/**
* Classe mère du module Liste.
*
* @category PHP 5.2
* @package eflore-consultation
* @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 Repartition extends aControleur {
 
private $conteneur = null;
private $nomCourant = null;
private $donnees = array();
private $cartes;
public function __construct(Conteneur $conteneur) {
$this->conteneur = $conteneur;
$this->nomCourant = $this->conteneur->getNomCourant();
$this->cartes = $this->conteneur->getApiCartes();
}
 
public function getDonnees() {
$donnees['chorodep'] = $this->getChorodepMiniature();
return $donnees;
}
private function getChorodepMiniature() {
$this->cartes->setProjet('chorodep');
$this->cartes->setLargeur('190x178');
//TODO: démochir ce code
// Chargement des nn des synonymes pour obtenir une carte plus complète
$noms = $this->conteneur->getApiNoms();
$syns = $noms->getSynonymes($this->nomCourant->getNnr());
$nns_syns = array_keys($syns['resultat']);
$nns_syns[] = $this->nomCourant->getNnr();
$id = 'nn:'.implode(',', $nns_syns);
$this->cartes->setId($id);
return $this->cartes->getUrlPng();
}
}
?>
/trunk/bibliotheque/QrCode.php
New file
0,0 → 1,74
<?php
/**
* BarcodeQR - Code QR Barcode Image Generator (PNG)
*
* @package BarcodeQR
* @category BarcodeQR
* @name BarcodeQR
* @version 1.0
* @author Shay Anderson 05.11
* @link http://www.shayanderson.com/php/php-qr-code-generator-class.htm
* @license http://www.gnu.org/licenses/gpl.html GPL License
* This is free software and is distributed WITHOUT ANY WARRANTY
*/
final class QrCode {
 
private $API_CHART_URL = '';
private $taille = '150';
private $contenu;
private $urlQrCodeTpl;
private $dossierQrCode;
 
public function __construct($conteneur) {
$this->API_CHART_URL = $conteneur->getParametre('urlApiChart');
$this->dossierQrCode = $conteneur->getParametre('dossierQrCode');
$this->urlQrCodeTpl = $conteneur->getParametre('urlQrCodeTpl');
}
 
/**
* URL code
*
* @param string $url
*/
public function setUrl($url = '') {
$this->contenu = $url;
}
/**
* Taille du QRcode en pixel. Cela sera forcément un carré.
*
* @param string $taille
*/
public function setTaille($taille) {
$this->taille = $taille;
}
/**
* Generate QR code image
*
* @param string $filename
* @return bool
*/
public function dessiner($idQrCode = null) {
if (!preg_match('/\.png$/i', $idQrCode)) {
$idQrCode .= '.png';
}
$cheminImg = $this->dossierQrCode.$idQrCode;
if (file_exists($cheminImg) == false) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->API_CHART_URL);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, "chs={$this->taille}x{$this->taille}&cht=qr&chl=".urlencode($this->contenu));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$img = curl_exec($ch);
curl_close($ch);
file_put_contents($cheminImg, $img);
}
$urlQrCode = sprintf($this->urlQrCodeTpl, $idQrCode);
return $urlQrCode;
}
}
?>
/trunk/bibliotheque/Conteneur.php
129,6 → 129,18
}
return $this->partages['Bdd'];
}
public function getCache($dossierStockage = null) {
if (!isset($this->partages['Cache'])){
$params = array(
'mise_en_cache' => $this->getParametre('cache'),
'stockage_chemin' => is_null($dossierStockage) ? $this->getParametre('chemincache') : $dossierStockage,
'duree_de_vie' => $this->getParametre('dureecache')
);
$this->partages['Cache'] = new CacheSimple($params);
}
return $this->partages['Cache'];
}
 
public function getRestClient() {
if (!isset($this->partages['RestClient'])){
136,5 → 148,12
}
return $this->partages['RestClient'];
}
public function getQrCode() {
if (!isset($this->partages['QrCode'])){
$this->partages['QrCode'] = new QrCode($this);
}
return $this->partages['QrCode'];
}
}
?>
/trunk/bibliotheque/AppUrls.php
1,15 → 1,17
<?php
class AppUrls {
private $urlBase = null;
private $urlMobile = null;
private $urlBaseDossier = null;
private $urlCourante = null;
private $urlRedirection = null;
private $urlPopUp = null;
 
public function __construct(Url $urlBase = null, Url $urlBaseDossier = null, Url $urlPopUp = null) {
public function __construct(Url $urlBase = null, Url $urlBaseDossier = null, Url $urlPopUp = null, Url $urlMobile = null) {
$this->urlBase = (is_null($urlBase)) ? Registre::get('eFlore.urlBase') : $urlBase;
$this->urlBaseDossier = (is_null($urlBaseDossier)) ? Registre::get('eFlore.urlBaseDossier') : $urlBaseDossier;
$this->urlPopUp = (is_null($urlPopUp)) ? Registre::get('eFlore.urlPopUp') : $urlPopUp;
$this->urlMobile = (is_null($urlMobile)) ? Registre::get('eFlore.urlMobile') : $urlMobile;
}
 
public function obtenirUrlBase() {
167,6 → 169,26
$url = $this->urlBase->getURL();
return $url;
}
public function getParametresUrlMobile() {
$parametres = array(
'referentiel' => Registre::get('parametres.referentiel'),
'niveau' => 1,
'module' => 'mobile',
'action' => 'fiche'
);
return $parametres;
}
public function obtenirUrlMobile($numNom, $type_nom = 'nom_vernaculaire', $nom = '') {
$parametres = $this->getParametresUrlMobile();
$parametres['num_nom'] = $numNom;
$parametres['type_nom'] = $type_nom;
$parametres['nom'] = $nom;
$this->urlMobile->setRequete($parametres);
$url = $this->urlMobile->getURL();
return $url;
}
 
public function getParametresUrlMetaDonnees() {
$parametres = array(
/trunk/controleurs/AppControleur.php
107,6 → 107,7
Registre::set('eFlore.urlCourante', self::getUrlCourante());
Registre::set('eFlore.urlRedirection', self::getUrlRedirection());
Registre::set('eFlore.urlPopUp', new Url(Config::get('base_url_application_popup')));
Registre::set('eFlore.urlMobile', new Url(Config::get('base_url_mobile')));
 
Registre::set('parametres.referentiel', self::$parametres['referentiel']);
Registre::set('parametres.module', self::$parametres['module']);
/trunk/index_mobile.php
New file
0,0 → 1,10
<?php
// declare(encoding='UTF-8');
/** Inclusion du fichier principal de l'application*/
require_once 'eflore.php';
 
echo AppControleur::getContenuCorps();
echo AppControleur::getContenuPied();
//echo AppControleur::getChrono();
//echo AppControleur::getExceptions();
?>