/branches/v5.3-cordier/modules/mobile/sources/Texte.php |
---|
New file |
0,0 → 1,108 |
<?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); |
$this->donnees['nom-commun'] = $this->donnees['titre'][0]; // sauf erreur ? parser le wikini serait peut-être plus adapté |
} |
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]; |
} |
} |
?> |
/branches/v5.3-cordier/modules/mobile/sources/Floraison.php |
---|
New file |
0,0 → 1,196 |
<?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(); |
$texte = array_pop($texte['resultats']); |
if ($texte) { |
$coste['titre'] = $texte['titre']; |
// TODO: réintroduire les modif' effectuées sur modules/fiche/formateurs/Description.php |
// -les joies du code copié/collé- |
$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']); |
} |
} |
} |
} |
?> |
/branches/v5.3-cordier/modules/mobile/sources/Illustrations.php |
---|
New file |
0,0 → 1,114 |
<?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(); |
$this->images->setApi(Images::API_DEL); |
} |
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() { |
$listePhotos = $this->images->getInfosImagesGalerieMobile($this->nomCourant->getNnr()); |
foreach($listePhotos as $index) { |
$this->formaterListePhotos($index); |
} |
} |
private function formaterListePhotos($images) { |
$infosImg['src'] = $images['binaire.href']; |
$obs = $images['observation']; |
if ($obs['auteur.nom'] != '') { |
$infosImg['legende']['titre'] = $obs['auteur.nom']; |
if ($obs['auteur.prenom'] != '') { |
$infosImg['legende']['titre'] .= ' '.$obs['auteur.prenom']; |
} |
} else { |
$infosImg['legende']['titre'] = "Anonyme"; |
} |
if ($obs['date_observation'] != '') { |
$infosImg['legende']['titre'] .= ", le ".$this->formaterDateImg($obs['date_observation']); |
} |
if ($obs['zone_geo'] != '') { |
$infosImg['legende']['texte'] = $obs['zone_geo']; |
if ($obs['lieudit'] != '') { |
$infosImg['legende']['texte'] .= ' ('.$obs['lieudit'].')'; |
} |
} else { |
$infosImg['legende']['texte'] = " "; |
} |
array_push($this->donnees, $infosImg); |
} |
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->setApi(Eflore::API_EFLORE)->getInfosImagesTaxons(); |
$this->images->setApi(Eflore::API_DEL); |
if (count($costeImg) != 0) { |
$img['src'] = $costeImg[key($costeImg)]['binaire.href']; |
$img['legende']['titre'] = "Illustration de Coste"; |
$img['legende']['texte'] = " "; |
} |
} |
return $img; |
} |
} |
?> |
/branches/v5.3-cordier/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; |
} |
} |
?> |
/branches/v5.3-cordier/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('570x534'); |
//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->getUrlDataSvg(); |
} |
} |
?> |
/branches/v5.3-cordier/modules/mobile/Mobile.php |
---|
New file |
0,0 → 1,108 |
<?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() { |
$this->parametres['num_nom'] = isset($_GET['num_nom']) ? $_GET['num_nom'] : ''; |
$this->parametres['nom'] = isset($_GET['nom']) ? $_GET['nom'] : ''; |
$this->parametres['type_nom'] = isset($_GET['type_nom']) ? $_GET['type_nom'] : 'nom_scientifique'; |
$this->theme = isset($_GET['theme']) ? $_GET['theme'] : $this->theme; |
$referentiel = isset($_GET['referentiel']) ? $_GET['referentiel'] : ''; |
Registre::set('parametres.referentiel', $referentiel); |
$this->parametres['referentiel'] = $referentiel; |
$niveau = isset($_GET['niveau']) ? $_GET['niveau'] : '1'; |
Registre::set('parametres.niveau', $niveau); |
} |
public function executerActionParDefaut() { |
$this->executerFiche(); |
} |
public function executerFiche(){ |
$niveau = Registre::get('parametres.niveau'); |
$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['url_absolue'] = "http://".$_SERVER['SERVER_NAME'].'/'.$_SERVER['REQUEST_URI']; |
$donnees['contenu_onglet'] = $this->getVue($squelette, $donnees); |
$donnees['lien'] = $this->url->obtenirUrlMobile($this->parametres['num_nom']); |
$this->setSortie(self::RENDU_CORPS, $this->getVue('fiche', $donnees), true); |
//print_r($donnees); |
} |
public function obtenirDonnees() { |
$donnees = array(); |
$num_nom = $this->nomCourant->getNns(); |
$referentiel = $this->conteneur->getParametre('referentiel'); |
$taxons = new Taxons($this->conteneur); |
$donnees['permalien_num_nom'] = $taxons->getUrlPermalienNumNom($referentiel, 1, $num_nom); |
$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() { |
$theme = $this->theme; |
if (strcmp($this->theme, 'pyracantha') >= 0) { |
$theme = 'pyracantha_blanc'; |
} |
$lien = "modules/mobile/presentations/css/$theme.css"; |
return $lien; |
} |
} |
?> |
/branches/v5.3-cordier/modules/mobile/presentations/css/gentiana.css |
---|
New file |
0,0 → 1,102 |
.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; } |
.padding-left-01em { padding-left: 0.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: 120pp; |
height: 120px; |
margin-left: auto; |
margin-right: auto; |
overflow: hidden; |
} |
.wrapper img { |
height: 120px; |
width: auto; |
} |
.wrapper_demi { height: 59px; } |
.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; } |
/branches/v5.3-cordier/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; |
} |
/branches/v5.3-cordier/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; |
} |
/branches/v5.3-cordier/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; |
} |
/branches/v5.3-cordier/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); |
} |
/branches/v5.3-cordier/modules/mobile/presentations/icones/altitude.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/branches/v5.3-cordier/modules/mobile/presentations/icones/altitude.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/branches/v5.3-cordier/modules/mobile/presentations/icones/zoom.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/branches/v5.3-cordier/modules/mobile/presentations/icones/zoom.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/branches/v5.3-cordier/modules/mobile/presentations/logos/tela.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/branches/v5.3-cordier/modules/mobile/presentations/logos/tela.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/branches/v5.3-cordier/modules/mobile/presentations/logos/tela_transparent.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/branches/v5.3-cordier/modules/mobile/presentations/logos/tela_transparent.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/branches/v5.3-cordier/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 |
/branches/v5.3-cordier/modules/mobile/presentations/less/gentiana.less |
---|
New file |
0,0 → 1,155 |
@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; |
} |
} |
} |
.wrapper_demi { |
height: 59px; |
} |
#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; |
} |
/branches/v5.3-cordier/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 |
/branches/v5.3-cordier/modules/mobile/presentations/less/functions.less |
---|
New file |
0,0 → 1,45 |
@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; } |
.padding-left-01em { padding-left: 0.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 |
/branches/v5.3-cordier/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; |
} |
/branches/v5.3-cordier/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; |
} |
/branches/v5.3-cordier/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; |
} |
/branches/v5.3-cordier/modules/mobile/squelettes/fiche.tpl.html |
---|
New file |
0,0 → 1,61 |
<!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"> |
<div id="up"> |
<?= $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> |
</div> |
</div> <!-- Fin du bloc 'Haut de Page' --> |
</body> |
</html> |
/branches/v5.3-cordier/modules/mobile/squelettes/theme_gentiana_niveau1.tpl.html |
---|
New file |
0,0 → 1,176 |
<? |
$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; |
?> |
<header class="row-fluid"> |
<div id="tela" class="padding-05em"> |
<div class="text-center titre"> |
<? if (isset($texte['nom-commun'])) : ?> |
<?= $texte['nom-commun']; ?> |
<? elseif ($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']) != ' ') : ?> |
<? $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"> |
<ul id="galerie_carte" class="gallery"> |
<li> |
<a href="<?= $repartition['chorodep'] ?>" rel="external"> |
<img style="width:190px; height:178px" src="<?= $repartition['chorodep'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" /> |
</a> |
</li> |
</ul> |
</div> |
</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; ?> |
<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 (isset($repartition['chorodep'])) /* affichage de la chorologie quand même, en l'absence de fiche Smartflore */ : ?> |
<div class="row-fluid infos"> |
<div data-target="#c9" data-toggle="collapse" class="btn btn-block couleur1-bg"> |
<h4 class="padding-left-1em"> |
<i class="icon-home pull-left"></i> |
Écologie & habitat</h4> |
</div> |
<div class="in collapse" id="c9" style="height: auto;"> |
<div class="bg couleur1-bg"> |
<div class="textes"> |
<div class="span6 margin-right-05em"> Carte de répartition <br> |
<ul class="gallery style-none margin-center" id="galerie_carte"> |
<li> |
<a href="<?= $repartition['chorodep'] ?>" rel="external"> |
<img style="width:190px; height:178px" src="<?= $repartition['chorodep'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" /> |
</a> |
</li> |
</ul> |
</div> |
<div class="clearfix"></div> |
</div><!-- Fin de la zone de texte --> |
</div> |
</div><!-- Fin de la zone déroulante --> |
</div> |
<? endif; ?> |
<? 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> |
/branches/v5.3-cordier/modules/mobile/squelettes/theme_gentiana2_niveau1.tpl.html |
---|
New file |
0,0 → 1,193 |
<? |
$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; |
?> |
<header class="row-fluid"> |
<div id="tela" class="padding-05em"> |
<div class="text-center titre"> |
<? if (isset($texte['nom-commun'])) : ?> |
<?= $texte['nom-commun']; ?> |
<? elseif ($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-center margin-right-05em"> |
<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 style="width:190px; height:178px" src="<?= $repartition['chorodep'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" /> |
</a> |
</li> |
</ul> |
</div> |
</div> |
<div class="span6 bordered"> |
<div class="wrapper wrapper_demi"> |
<ul id="galerie_images" class="gallery"> |
<? if (count($illustrations) != 0) : ?> |
<? for($i = 0; $i < count($illustrations); $i++) : ?> |
<? if (trim($illustrations[$i]['legende']['texte']) != ' ') : ?> |
<? $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; ?> |
<? else: ?> |
Aucune image. |
<? endif; ?> |
</ul> |
</div> |
</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 (isset($repartition['chorodep'])) /* affichage de la chorologie quand même, en l'absence de fiche Smartflore */ : ?> |
<div class="row-fluid infos"> |
<div data-target="#c9" data-toggle="collapse" class="btn btn-block couleur1-bg"> |
<h4 class="padding-left-1em"> |
<i class="icon-home pull-left"></i> |
Écologie & habitat</h4> |
</div> |
<div class="in collapse" id="c9" style="height: auto;"> |
<div class="bg couleur1-bg"> |
<div class="textes"> |
<div class="span6 margin-right-05em"> Carte de répartition <br> |
<ul class="gallery style-none margin-center" id="galerie_carte"> |
<li> |
<a href="<?= $repartition['chorodep'] ?>" rel="external"> |
<img style="width:190px; height:178px" src="<?= $repartition['chorodep'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" /> |
</a> |
</li> |
</ul> |
</div> |
<div class="clearfix"></div> |
</div><!-- Fin de la zone de texte --> |
</div> |
</div><!-- Fin de la zone déroulante --> |
</div> |
<? endif; ?> |
<? 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> |
/branches/v5.3-cordier/modules/mobile/squelettes/theme_pyracantha_niveau1.tpl.html |
---|
New file |
0,0 → 1,202 |
<? |
$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 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 (isset($texte['nom-commun'])) : ?> |
<?= $texte['nom-commun']; ?> |
<? elseif ($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="<?= $url_absolue ?>#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">‹</a> |
<a class="right carousel-control" href="#slider-pictures" data-slide="next">›</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 (stristr($texte['corps'][$index], 'cologie') != false || stristr($texte['corps'][$index], 'cologie') != false) : ?> |
<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 style="width:190px; height:178px" 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 (isset($repartition['chorodep'])) /* affichage de la chorologie quand même, en l'absence de fiche Smartflore */ : ?> |
<div class="row-fluid infos"> |
<div data-target="#c9" data-toggle="collapse" class="btn btn-block couleur1-bg"> |
<h4 class="padding-left-1em"> |
<i class="icon-home pull-left"></i> |
Écologie & habitat</h4> |
</div> |
<div class="in collapse" id="c9" style="height: auto;"> |
<div class="bg couleur1-bg"> |
<div class="textes"> |
<div class="span6 margin-right-05em"> Carte de répartition <br> |
<ul class="gallery style-none margin-center" id="galerie_carte"> |
<li> |
<a href="<?= $repartition['chorodep'] ?>" rel="external"> |
<img style="width:190px; height:178px" src="<?= $repartition['chorodep'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" /> |
</a> |
</li> |
</ul> |
</div> |
<div class="clearfix"></div> |
</div><!-- Fin de la zone de texte --> |
</div> |
</div><!-- Fin de la zone déroulante --> |
</div> |
<? endif; ?> |
<? 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; ?> |