Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 1410 → Rev 1409

/trunk/modules/mobile/sources/Texte.php
30,8 → 30,6
$url_wiki = $this->obtenirUrlWikini();
$obj = json_decode(file_get_contents($url_wiki));
//echo '<pre>'.print_r($obj, true).'</pre>';exit;
$this->donnees['corps'] = $obj->{'texte'};
if (strpos($this->format, "html") != false) {
$this->obtenirCorpsHtml();
42,8 → 40,7
if ($this->donnees['corps'] != "") {
$this->donnees['corps'] = preg_split('/===/', $this->donnees['corps'], -1, PREG_SPLIT_NO_EMPTY);
$this->extraireInfosTableauCorps();
$this->donnees['titre'] = $this->donnees['corps'][0];
if (strpos($this->format, "html") != false) {
$this->obtenirTitreHtml();
} else {
54,24 → 51,7
return $this->donnees;
}
private function extraireInfosTableauCorps() {
$this->donnees['titre'] = array_shift($this->donnees['corps']);
$this->donnees['sources'] = array_pop($this->donnees['corps']);
// array_pop "gratuit" pour supprimer la case qui ne contient que le terme "sources"
array_pop($this->donnees['corps']);
$corps_fmt = array();
// Le tableau contient un titre de section puis son contenu, puis le titre de la section suivante
// puis son contenu on dépile les éléments deux par deux pour faire un tableau associatif pas trop relou à afficher
for($i = 0; $i < count($this->donnees['corps']); $i = $i+2) {
$corps_fmt[$this->donnees['corps'][$i]] = $this->donnees['corps'][$i + 1];
}
$this->donnees['corps'] = $corps_fmt;
}
//formater pour AppUrls ?
public function obtenirUrlWikini() {
$titre = urlencode("Fiche simplifiée Smart'flore");
/trunk/modules/mobile/Mobile.php
5,9 → 5,9
*
* @category PHP 5.2
* @package eflore-consultation
* @author Isabelle NEMBROT
* @author Aurélien PERONNET <aurelien@tela-botanica.org>
* @copyright 2015 Tela-Botanica
* @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$
14,6 → 14,7
*/
class Mobile extends aControleur {
 
private $theme = 'pyracantha';
private $parametres = array();
private $conteneur = null;
private $num_nom = 0;
47,6 → 48,7
$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);
61,15 → 63,19
}
 
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['lien'] = $this->url->obtenirUrlMobile($this->parametres['num_nom']);
$donnees['lien_fiche'] = $this->url->obtenirUrlFiche($this->parametres['num_nom']);
 
$this->setSortie(self::RENDU_CORPS, $this->getVue('smartflore', $donnees), true);
$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() {
80,7 → 86,7
$taxons = new Taxons($this->conteneur);
$donnees['permalien_num_nom'] = $taxons->getUrlPermalienNumNom($referentiel, 1, $num_nom);
 
$sources = array('illustrations', 'texte', 'nomsCommuns');
$sources = array('illustrations', 'repartition', 'texte', 'floraison', 'nomsCommuns');
foreach ($sources as $source) {
$nom_classe = ucfirst($source);
$classe = new $nom_classe($this->conteneur);
89,5 → 95,14
 
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;
}
}
?>
/trunk/modules/mobile/presentations/css/smartflore.css
File deleted
/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/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; }
/trunk/modules/mobile/presentations/js/mobile.js
1,20 → 1,31
$(document).ready(function() {
$(document).ready(function() {
// Popover
$('.btn-pop').popover();
$('#smartflore-illustrations-galerie-carousel').carousel()
$('#smartflore-footer-button-sources').click(function() {
voirSources();
});
// CSS switcher
$('.toggle-button').click(function(e) {
$('link#custom-css').attr('href', $(this).attr('CssUrl'));
return false;
});
function voirSources() {
var w = window.open();
var html = $("#smartflore-sources").html();
$(w.document.body).html(html);
// 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
});
}
//TODO gérer la fonction de swipe sur le téléphone
// Slider images : bootstrap
/*if (document.getElementById('slider-pictures')) {
if (document.getElementById('slider-pictures')) {
$('#slider-pictures').hide();
$('#slider-pictures').swiperight(function() {
$('#slider-pictures').carousel('prev');
22,5 → 33,133
$('#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/squelettes/smartflore.tpl.html
File deleted
\ No newline at end of file
/trunk/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://resources.tela-botanica.org/tb/img/16x16/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>
/trunk/modules/mobile/squelettes/theme_gentiana_niveau1.tpl.html
New file
0,0 → 1,177
<?
$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']) != '&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">
<? if ($repartition['carte'] != null) : ?>
<div class="wrapper_carte">
<ul id="galerie_carte" class="gallery">
<li>
<a href="<?= $repartition['carte'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['carte'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
</a>
</li>
</ul>
</div>
<? endif; ?>
</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 ($repartition['carte'] != null) /* 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 &amp; 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['carte'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['carte'] ?>" 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>
/trunk/modules/mobile/squelettes/theme_gentiana2_niveau1.tpl.html
New file
0,0 → 1,194
<?
$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">
<? if ($repartition['carte'] != null) : ?>
<div class="wrapper_carte">
<ul id="galerie_carte" class="gallery">
<li>
<a href="<?= $repartition['carte'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['carte'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
</a>
</li>
</ul>
</div>
<? endif; ?>
</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']) != '&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; ?>
<? 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['carte'])) /* 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 &amp; 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['carte'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['carte'] ?>" 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>
/trunk/modules/mobile/squelettes/theme_pyracantha_niveau1.tpl.html
New file
0,0 → 1,204
<?
$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">&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 plantes ?</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) : ?>
<? if ($repartition['carte'] != null) : ?>
<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['carte'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['carte'] ?>" class="" title="Carte de répartition" alt="Carte de répartition" />
</a>
</li>
</ul>
</div>
<? endif; ?>
<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 ($repartition['carte'] != null) /* 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 &amp; 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['carte'] ?>" rel="external">
<img style="width:190px; height:178px" src="<?= $repartition['carte'] ?>" 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; ?>