Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 3163 → Rev 3164

/trunk/widget/modules/manager/squelettes/css/manager.css
1,18 → 1,39
@CHARSET "UTF-8";
 
form {
font-family: Muli,sans-serif;
float: none;
width: 48%;
 
h1#widget-titre::before {
content: "";
display: block;
height: 100%;
position: absolute;
left: -5rem;
width: 0.4rem;
 
}
 
h1#widget-titre {
font-size: 2.6rem;
font-weight: 700;
line-height: 3.2rem;
margin: 0;
position: relative;
color: #232323;
font-family: Ubuntu,sans-serif;
}
 
#group-settings-form {
font-family: Muli,sans-serif;
float: none;
}
 
h2 {
font-family: Muli,sans-serif;
font-family: Muli,sans-serif;
font-size: 21.5px;
font-weight: 700;
line-height: 1.15;
}
 
label {
#group-settings-form label {
color: #606060;
display: block;
font-size: 1.5rem;
21,41 → 42,141
font-weight: 700;
}
 
h1#widget-titre::before {
content: "";
display: block;
height: 100%;
left: -5rem;
position: absolute;
width: 0.4rem;
#group-settings-form .register-section input[required],
#group-settings-form .register-section select[required] {
border: 0.2rem solid rgba(0, 159, 184, 0.5);
}
 
h1#widget-titre {
font-size: 2.6rem;
font-weight: 700;
line-height: 3.2rem;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0;
#group-settings-form select {
background-color: #fff;
border: 0.1rem solid #ddd;
}
 
#group-settings-form select,
#group-settings-form select[required] {
border-radius: 0.3rem;
padding:0.5rem;
-webkit-appearance: none;
-moz-appearance: none;
-ms-appearance: none;
-o-appearance: none;
appearance: none;
width: 100%;
color:#333;
text-transform:none;
}
 
#group-settings-form .select-wrapper {
position: relative;
color: #232323;
font-family: Ubuntu,sans-serif;
}
 
.droite {
#group-settings-form .select-wrapper::after {
content: '⌄';
font-size: 3rem;
font-weight: 900;
position: absolute;
top: 0;
right: 0.5rem;
color: #606060;
pointer-events: none;
}
 
#group-settings-form #langue{
width: 100%;
border: 0.1rem solid #ddd;
border-radius: 0.3rem;
padding: 1rem;
overflow: visible;
}
 
 
div.widget-blocks {
box-sizing: border-box;
padding: 1rem;
}
 
.message {
background-color: #f8f5ef;
color: #232323;
float: right;
padding-bottom: 1rem;
padding-left: 1rem;
padding-right: 1rem;
padding-top: 1rem;
width: 48%;
padding: 1rem;
margin: 1rem;
}
 
iframe.widget-renderer {
 
border:none;
margin: 1rem;
height: 300rem;
min-height: 100%;
width: 100%;
pointer-events: none;
overflow: hidden
}
 
#group-settings-form input#add_fields.button {
background-color: #009fb8;
}
 
.clear {
clear: both;
height: 0; overflow: hidden; /* Précaution pour IE 7 */
}
height: 0;
overflow: hidden; /* Précaution pour IE 7 */
}
 
.register-section{
margin-bottom: 1rem;
}
 
 
/* styles de base si JS est activé */
.js #group-settings-form .input-file-container {
position: relative;
width: 225px;
}
.js #group-settings-form .label-file {
display: block;
padding: 14px 45px;
background: #009FB8;
color: #fff !important;
font-size: 1em;
transition: all .4s;
cursor: pointer;
border-radius: 0.2em;
}
.js #group-settings-form .input-file {
position: absolute;
top: 0; left: 0;
width: 225px;
padding: 14px 0;
opacity: 0;
cursor: pointer;
}
 
/* quelques styles d'interactions */
.js #group-settings-form .input-file:hover + .label-file,
.js #group-settings-form .input-file:focus + .label-file,
.js #group-settings-form .label-file:hover,
.js #group-settings-form .label-file:focus {
background: #3071A9;
color: #fff;
}
 
/* styles du retour visuel */
#group-settings-form .file-return {
margin: 0;
}
#group-settings-form .file-return:not(:empty) {
margin: 1em 0;
}
.js #group-settings-form .file-return {
font-style: italic;
font-size: .9em;
font-weight: bold;
}
/* on complète l'information d'un contenu textuel
uniquement lorsque le paragraphe n'est pas vide */
.js #group-settings-form .file-return:not(:empty):before {
content: "Selected file: ";
font-style: normal;
font-weight: normal;
}
/trunk/widget/modules/manager/squelettes/manager.tpl.html
28,30 → 28,29
 
<!-- Favicones -->
<link rel="shortcut icon" type="image/x-icon" href="https://resources.tela-botanica.org/tb/img/16x16/favicon.ico" />
 
<!-- Jquery -->
<script type="text/javascript" src="https://www.tela-botanica.org/commun/jquery/1.7.1/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="https://www.tela-botanica.org/commun/jquery/jquery-ui/1.8.17/js/jquery-ui-1.8.17.custom.min.js"></script>
<script type="text/javascript" src="https://www.tela-botanica.org/commun/jquery/jquery-ui/1.8.17/js/jquery.ui.datepicker-fr.js"></script>
<script type="text/javascript" src="https://www.tela-botanica.org/commun/jquery/validate/1.9.0/jquery.validate.js"></script>
<script type="text/javascript" src="https://www.tela-botanica.org/commun/jquery/validate/1.9.0/messages_fr.js"></script>
<script type="text/javascript" src="https://www.tela-botanica.org/commun/jquery/form/2.95/jquery.form.min.js"></script>
<script src="https://resources.tela-botanica.org/bootstrap/3.1.0/js/bootstrap.min.js"></script>
<script type="text/javascript" src="http://localhost/commun/jquery/1.7.1/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="http://localhost/commun/jquery/jquery-ui/1.8.17/js/jquery-ui-1.8.17.custom.min.js"></script>
<script type="text/javascript" src="http://localhost/commun/jquery/jquery-ui/1.8.17/js/jquery.ui.datepicker-fr.js"></script>
<script type="text/javascript" src="http://localhost/commun/jquery/validate/1.9.0/jquery.validate.js"></script>
<script type="text/javascript" src="http://localhost/commun/jquery/validate/1.9.0/messages_fr.js"></script>
<script type="text/javascript" src="http://localhost/commun/jquery/form/2.95/jquery.form.min.js"></script>
<script type="text/javascript" src="http://localhost/commun/bootstrap/3.1.0/js/bootstrap.min.js"></script>
 
<!-- Barre de navigation -->
<?php if ($bar !== false): ?>
<script src="<?=$url_script_navigation?>"></script>
<script src="<?php echo $url_script_navigation; ?>"></script>
<?php endif; ?>
 
 
<!-- CSS -->
<link href="https://www.tela-botanica.org/commun/jquery/jquery-ui/1.8.18/css/smoothness/jquery-ui-1.8.18.custom.css" rel="stylesheet" type="text/css" media="screen" />
<!-- <link href="http://www.tela-botanica.org/commun/bootstrap/2.0.2/css/bootstrap.min.css" rel="stylesheet" type="text/css" media="screen" /> -->
<link rel="stylesheet" type="text/css" href="https://resources.tela-botanica.org/bootstrap/3.1.0/css/bootstrap.min.css" />
<link id="telabotanica-style-css" rel="stylesheet" href="https://beta.tela-botanica.org/preprod/wp-content/themes/telabotanica/dist/bundle.css?ver=4.7.5" type="text/css" media="all">
<link href="<?= $url_base; ?>modules/manager/squelettes/css/manager.css" rel="stylesheet" type="text/css" media="screen" />
<link href="http://localhost/commun/jquery/jquery-ui/1.8.18/css/smoothness/jquery-ui-1.8.18.custom.css" rel="stylesheet" type="text/css" media="screen" />
<!-- <link href="http://localhost/commun/bootstrap/2.0.2/css/bootstrap.min.css" rel="stylesheet" type="text/css" media="screen" /> -->
<link href="<?php echo $url_base; ?>modules/manager/squelettes/css/manager.css" rel="stylesheet" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://localhost/commun/bootstrap/3.1.0/css/bootstrap.min.css" />
<link id="telabotanica-style-css" rel="stylesheet" href="https://www.tela-botanica.org/wp-content/themes/telabotanica/dist/bundle.css?ver=4.9.7" type="text/css" media="all">
 
<!-- Google Analytics -->
<?php if($prod): ?>
<?php include "analytics.html"; ?>
58,53 → 57,53
<?php endif; ?>
</head>
 
<body>
<?php if ($bar !== false): ?>
<div id="tb-navigation" data-courant="widget-cel-export" data-squelette="bootstrap3" data-mode="prod">
</div>
<br/>
<?php endif; ?>
<body>
<?php if ($bar !== false): ?>
<div id="tb-navigation" data-courant="widget-cel-export" data-squelette="bootstrap3" data-mode="prod">
</div>
<br/>
<?php endif; ?>
 
<div id="zone-appli" class="container">
<h1 id="widget-titre" class="widget-titre"> Gestion des widgets de saisie du CEL</h1>
<ul>
<?php foreach ($donnees['widget'] as $donnee) { ?>
<?php foreach ($donnees['widget'] as $donnee) { ?>
<li class="component-tools-item">
<?= '<img class="component-tools-item-icon" src="'.$donnee['logo'].'" alt="'.$donnee['projet'].'" style="width:10rm;">';?>
<?php echo '<img class="component-tools-item-icon" src="'.$donnee['logo'].'" alt="'.$donnee['projet'].'" style="width:10rm;">';?>
<div style="">
<h4 class="component-tools-item-title">
<a href="https://beta.tela-botanica.org/preprod/flore/" target=""><?= $donnee['projet']." : ".$donnee['titre']; ?></a>
<a href="https://www.tela-botanica.org/flore/" target=""><?= $donnee['projet']." : ".$donnee['titre']; ?></a>
</h4>
<div class="component component-buttons as-seamless" style="float:right;">
<a class="button orange" href="<?= $widgetUrlTpl; ?>?mode=modification&projet=<?= $donnee['projet']; ?>&langue=<?= $donnee['langue']; ?>" target="" title="Espace projets">
<a class="button orange" href="<?php echo $widgetUrlTpl; ?>?mode=modification&projet=<?php echo $donnee['projet']; ?>&langue=<?php echo $donnee['langue']; ?>" target="" title="Espace projets">
<span class="button-text">Modifier le widget</span>
</a>
<a class="button standard" href="<?= $widgetUrlTpl; ?>?mode=creation&projet=<?= $donnee['projet']; ?>&langue=<?= $donnee['langue']; ?>" target="" title="Créer un projet">
<a class="button standard" href="<?php echo $widgetUrlTpl; ?>?mode=creation&projet=<?php echo $donnee['projet']; ?>&langue=<?php echo $donnee['langue']; ?>" target="" title="Créer un projet">
<span class="button-text">Créer à partir</span>
</a>
</div>
</div>
<div class="component-tools-item-description"><?= $donnee['description']; ?></div>
<div class="component-tools-item-description"><?php echo $donnee['description']; ?></div>
<div class="component-tools-item-link">
<a href="https://www.tela-botanica.org/widget:cel:saisie?projet=<?= $donnee['projet']; ?>" target="" style="color: #e16e37">
<a href="https://localhost/widget:cel:saisie?projet=<?php echo $donnee['projet']; ?>" target="" style="color: #e16e37">
<span>Saisie</span>
</a>
<a href="http://www.tela-botanica.org/widget:cel:cartoPoint?projet=<?= $donnee['projet']; ?>" target="" style="color: #918a6f">
<a href="http://localhost/widget:cel:cartoPoint?projet=<?php echo $donnee['projet']; ?>" target="" style="color: #918a6f">
<span>Carto</span>
</a>
<a href="http://www.tela-botanica.org/widget:cel:photo?projet=<?= $donnee['projet']; ?>" target="" style="color: #964e75">
<a href="http://localhost/widget:cel:photo?projet=<?php echo $donnee['projet']; ?>" target="" style="color: #964e75">
<span>Photo</span>
</a>
<a href="http://www.tela-botanica.org/widget:cel:observation?projet=<?= $donnee['projet']; ?>" target="" style="color: #b2cb43">
<a href="http://localhost/widget:cel:observation?projet=<?php echo $donnee['projet']; ?>" target="" style="color: #b2cb43">
<span>Observation</span>
</a>
<a href="http://www.tela-botanica.org/widget:cel:export?projet=<?= $donnee['projet']; ?>" target="" style="color: #009fb8">
<a href="http://localhost/widget:cel:export?projet=<?php echo $donnee['projet']; ?>" target="" style="color: #009fb8">
<span>Export</span>
</a>
<a href="http://www.tela-botanica.org/appli:pictoflora?projet=<?= $donnee['projet']; ?>" target="" style="color: #927fa2">
<a href="http://localhost/appli:pictoflora?projet=<?php echo $donnee['projet']; ?>" target="" style="color: #927fa2">
<span>PictoFlora</span>
</a>
<a href="http://www.tela-botanica.org/appli:identiplante?projet=<?= $donnee['projet']; ?>" target="" style="color: #f25a52">
<a href="http://localhost/appli:identiplante?projet=<?php echo $donnee['projet']; ?>" target="" style="color: #f25a52">
<span>IdentiPlante</span>
</a>
</div>
112,10 → 111,10
<?php } ?>
</ul>
<div class="component component-buttons as-seamless">
<a class="button standard" href="<?= $widgetUrlTpl; ?>?mode=creation" target="_blank" title="">
<a class="button standard" href="<?php echo $widgetUrlTpl; ?>?mode=creation" target="_blank" title="">
<span class="button-text">Créer un nouveau widget</span>
</a>
</div>
</div>
</body>
</html>
</html>
/trunk/widget/modules/manager/squelettes/creation.tpl.html
1,168 → 1,195
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?= $mode; ?> de widget de saisie du CeL</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 name="revisit-after" content="15 days" />
<meta name="robots" content="index,follow" />
<meta name="author" content="Tela Botanica" />
<meta name="keywords" content="Tela Botanica, CEL" />
<meta name="description" content="Gestion des widgets de saisie du carnet en ligne" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<title><?php echo $mode; ?> de widget de saisie du CeL</title>
 
<!-- OpenGraph pour Facebook, Pinterest, Google+ -->
<meta property="og:type" content="website" />
<meta property="og:title" content="Gestion des widgets de saisie du CeL" />
<meta property="og:site_name" content="Tela Botanica" />
<meta property="og:description" content="Gestion des widgets de saisie du Carnet en Ligne" />
<meta property="og:image" content="http://resources.tela-botanica.org/tb/img/256x256/carre_englobant.png" />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="256" />
<meta property="og:image:height" content="256" />
<meta property="og:locale" content="fr_FR" />
<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 name="revisit-after" content="15 days" />
<meta name="robots" content="index,follow" />
<meta name="author" content="Tela Botanica" />
<meta name="keywords" content="Tela Botanica, CEL" />
<meta name="description" content="Gestion des widgets de saisie du carnet en ligne" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
 
<!-- Favicones -->
<link rel="shortcut icon" type="image/x-icon" href="http://resources.tela-botanica.org/tb/img/16x16/favicon.ico" />
<!-- Jquery -->
<script type="text/javascript" src="http://www.tela-botanica.org/commun/jquery/1.7.1/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="http://www.tela-botanica.org/commun/jquery/jquery-ui/1.8.17/js/jquery-ui-1.8.17.custom.min.js"></script>
<script type="text/javascript" src="http://www.tela-botanica.org/commun/jquery/jquery-ui/1.8.17/js/jquery.ui.datepicker-fr.js"></script>
<script type="text/javascript" src="http://www.tela-botanica.org/commun/jquery/validate/1.9.0/jquery.validate.js"></script>
<script type="text/javascript" src="http://www.tela-botanica.org/commun/jquery/validate/1.9.0/messages_fr.js"></script>
<script type="text/javascript" src="http://www.tela-botanica.org/commun/jquery/form/2.95/jquery.form.min.js"></script>
<script src="http://resources.tela-botanica.org/bootstrap/3.1.0/js/bootstrap.min.js"></script>
<!-- OpenGraph pour Facebook, Pinterest, Google+ -->
<meta property="og:type" content="website" />
<meta property="og:title" content="Gestion des widgets de saisie du CeL" />
<meta property="og:site_name" content="Tela Botanica" />
<meta property="og:description" content="Gestion des widgets de saisie du Carnet en Ligne" />
<meta property="og:image" content="https://resources.tela-botanica.org/tb/img/256x256/carre_englobant.png" />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="256" />
<meta property="og:image:height" content="256" />
<meta property="og:locale" content="fr_FR" />
 
<!-- Barre de navigation -->
<?php if ($bar !== false): ?>
<script src="<?=$url_script_navigation?>"></script>
<?php endif; ?>
<!-- CSS -->
<!-- <link href="http://www.tela-botanica.org/commun/jquery/jquery-ui/1.8.18/css/smoothness/jquery-ui-1.8.18.custom.css" rel="stylesheet" type="text/css" media="screen" />
<!-- <link href="http://www.tela-botanica.org/commun/bootstrap/2.0.2/css/bootstrap.min.css" rel="stylesheet" type="text/css" media="screen" /> -->
<!-- <link rel="stylesheet" type="text/css" href="http://resources.tela-botanica.org/bootstrap/3.1.0/css/bootstrap.min.css" />
-->
<link id="telabotanica-style-css" rel="stylesheet" href="https://beta.tela-botanica.org/preprod/wp-content/themes/telabotanica/dist/bundle.css?ver=4.7.5" type="text/css" media="all">
<link href="<?= $url_base; ?>modules/manager/squelettes/css/manager.css" rel="stylesheet" type="text/css" media="screen" />
<!-- Google Analytics -->
<?php if($prod): ?>
<?php include "analytics.html"; ?>
<?php endif; ?>
<!-- Favicones -->
<link rel="shortcut icon" type="image/x-icon" href="https://resources.tela-botanica.org/tb/img/16x16/favicon.ico" />
 
<!-- Jquery -->
<script type="text/javascript" src="http://localhost/commun/jquery/1.7.1/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="http://localhost/commun/jquery/jquery-ui/1.8.17/js/jquery-ui-1.8.17.custom.min.js"></script>
<script type="text/javascript" src="http://localhost/commun/jquery/jquery-ui/1.8.17/js/jquery.ui.datepicker-fr.js"></script>
<script type="text/javascript" src="http://localhost/commun/jquery/validate/1.9.0/jquery.validate.js"></script>
<script type="text/javascript" src="http://localhost/commun/jquery/validate/1.9.0/messages_fr.js"></script>
<script type="text/javascript" src="http://localhost/commun/jquery/form/2.95/jquery.form.min.js"></script>
<script type="text/javascript" src="http://localhost/commun/bootstrap/3.1.0/js/bootstrap.min.js"></script>
 
<script type="text/javascript" src="<?php echo $url_base; ?>modules/manager/squelettes/js/manager.js"></script>
 
<!-- Barre de navigation -->
<?php if ($bar !== false): ?>
<script src="<?php echo $url_script_navigation; ?>"></script>
<?php endif; ?>
 
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="http://localhost/commun/jquery/jquery-ui/1.8.18/css/smoothness/jquery-ui-1.8.18.custom.css" media="screen" />
 
<link rel="stylesheet" type="text/css" href="<?php echo $url_base; ?>modules/manager/squelettes/css/manager.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://localhost/commun/bootstrap/3.1.0/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" id="telabotanica-style-css" href="https://www.tela-botanica.org/wp-content/themes/telabotanica/dist/bundle.css?ver=4.9.7" media="all">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.1/css/all.css" integrity="sha384-O8whS3fhG2OnA5Kas0Y9l3cfpmYjapjI0E4theH4iuMD+pLhbf6JI0jIMfYcK3yZ" crossorigin="anonymous">
 
<!-- Google Analytics -->
<?php if($prod): ?>
<?php include "analytics.html"; ?>
<?php endif; ?>
</head>
 
<body>
<div id="zone-appli" class="container">
<?php if ($bar !== false): ?>
<div id="tb-navigation" data-courant="widget-cel-export" data-squelette="bootstrap3" data-mode="prod">
</div>
<br/>
<?php endif; ?>
<h1 id="widget-titre" class="widget-titre"><?= $mode; ?> de widget de saisie du CEL</h1>
<div id="register-page" class="layout-wrapper page">
<div class="droite">
<?php if ($mode === 'modification') { ?>
Attention vous modifiez un widget déjà existant, le tag et la langue ne peuvent pas être changer.
S'il s'agit d'un projet type, en modifiant ce widget vous modifiez tous les widgets de ce type.
<?php } else { ?>
Vous créez un widget, si vous choississez de le mettre dans un type, certains champs deviendront
obligatoires et la localisation (point ou rue) sera automatiquement déterminée.
<?php } ?>
</div>
<form action="http://localhost/cel/widget/manager?mode=<?= $mode; ?>" name="" id="" class="standard-form component component-text" method="post" enctype="multipart/form-data">
<div class="register-section" id="basic-details-section">
<h2>Meta-données</h2>
<label for="projet">Projet</label>
<input type="text" name="projet" id="projet" pattern="[a-z]*" <?= ($mode === 'modification') ? 'value="'.$widget['projet'].'" readonly' : 'required'; ?> title="Champ obligatoire : pas d'espace" />
<label for="motscles">Autres mots-clés</label>
<input type="text" name="motscles" id="motscles" value="" />
<label for="type">Type de widget</label>
<select id="type" name="type" >
<?php foreach ($type as $id => $projet) { ?>
<option <?= (isset($widget['projet']) && $projet['projet']== $widget['projet']) ? 'selected="selected"' : ''; ?> value="<?= $projet['projet']; ?>"><?= $projet['projet']; ?></option>
<?php } ?>
<option value=""> ----</option>
</select>
<label for="est_type">Ce widget est un widget type</label>
<input type="radio" name="est_type" id="est_type" <?= (isset($widget['est_type']) && $projet['est_type']=== '1') ? 'checked="checked"' : ''; ?>/>
<label for="langue">Langue</label>
<?php if ($mode === 'modification') { ?>
<input id="langue" name="langue" readonly value="<?= $widget['langue']; ?>" />
<?php } else { ?>
<input id="langue" name="langue" list="langues" >
<datalist id="langues" >
<?php foreach ($langues as $code => $langue) { ?>
<option value="<?= $code; ?>"><?= $langue['nom']; ?></option>
<?php } ?>
</datalist>
<?php } ?>
</div><!-- #basic-details-section -->
<div class="register-section" id="profile-details-section">
<h2>Description</h2>
<label for="titre">Titre</label>
<input type="text" name="titre" id="titre" value="<?= isset($widget['titre']) ? $widget['titre'] : ''; ?>" />
<label for="description">Description</label>
<textarea name="description" id="description"><?= isset($widget['description']) ? $widget['description'] : ''; ?></textarea>
<label for="logo">Logo</label><?= isset($widget['logo']) ? '<img src="'.$widget['logo'].'" /><br />Pour changer, télécharger un nouveau fichier.': ''; ?>
<input type="file" name="logo" id="logo" accept="image" />
<label for="fond">Image de fond</label>
<input type="file" name="fond" id="fond" value="<?= $widget['titre']; ?>" />
</div><!-- #profile-details-section -->
<div class="register-section" id="profile-details-section">
<h2>Champs</h2>
<label for="type_localisation">Type de localisation</label>
<select id="type_localisation" name="type_localisation" >
<option value="<?= (isset($widget['type_localisation'])) ? $widget['type_localisation'] : 'point'; ?>"><?= (isset($widget['type_localisation'])) ? $widget['type_localisation'] : 'point'; ?></option>
<option value="<?= (isset($widget['type_localisation']) && $widget['type_localisation'] == 'rue') ? 'point' : 'rue'; ?>"><?= (isset($widget['type_localisation']) && $widget['type_localisation'] == 'rue') ? 'point' : 'rue'; ?></option>
</select>
<label for="localisation">Zoom</label>
<input type="text" name="localisation" id="localisation" value="<?= isset($widget['localisation']) ? $widget['localisation'] : ''; ?>" />
<label for="milieux">Milieux</label>
<input type="text" name="milieux" id="milieux" value="<?= isset($widget['milieux']) ? $widget['milieux'] : ''; ?>" />
<label for="type_especes">Type liste espèce</label>
<select id="type_especes" name="type_especes" required>
<option selected="selected" value="referentiel">Référentiel</option>
<option value="liste">Liste</option>
<option value="liste" title="remplir référentiel + envoyer csv">Liste + autres</option>
<option value="fixe">Espèce fixée</option>
</select>
<label for="referentiel"></label>
<input type="text" name="referentiel" id="referentiel" required pattern="([a-z]+?)*"
title="Nom du référentiel ex. bdtfx"
value="<?= isset($widget['referentiel']) ? $widget['referentiel'] : ''; ?>"/>
<label for="especes"></label>
<input type="file" name="especes" id="especes" />
fichier type
</div><!-- #profile-details-section -->
<div class="submit complete-registration">
<button href="#" type="submit" name="signup_submit" id="signup_submit" class="button" target="" title=""><span class="button-text">Terminer </span></button>
</div>
</form>
</div>
</div>
</body>
</html>
<div id="zone-appli" class="container">
<?php if ($bar !== false): ?>
<div id="tb-navigation" data-courant="widget-cel-export" data-squelette="bootstrap3" data-mode="prod">
</div>
<br/>
<?php endif; ?>
<h1 id="widget-titre" class="widget-titre"><?php echo ucfirst($mode); ?> de widget de saisie du CEL</h1>
<div id="register-page">
<div class="row">
<div class="widget-blocks col-md-4">
<form action="http://localhost/cel/widget/manager?mode=<?php echo $mode; ?>" name="" id="group-settings-form" class="standard-form component component-text" method="post" enctype="multipart/form-data">
<div class="register-section" id="basic-details-section">
<h2>Meta-données</h2>
 
<label for="projet">Projet *</label>
<input type="text" name="projet" id="projet" pattern="[a-z]*" <?php echo ($mode === 'modification') ? 'value="'.$widget['projet'].'" readonly' : 'required'; ?> title="Champ obligatoire : pas d'espace" />
 
<label for="motscles">Autres mots-clés</label>
<input type="text" name="motscles" id="motscles" value="" />
 
<label for="type">Type de widget</label>
<div class="select-wrapper">
<select id="type" name="type" >
<?php foreach ($type as $id => $projet) : ?>
<option <?php echo (isset($widget['projet']) && $projet['projet']== $widget['projet']) ? 'selected="selected"' : ''; ?> value="<?php echo $projet['projet']; ?>"><?php echo $projet['projet']; ?></option>
<?php endforeach; ?>
<option value=""> ----</option>
</select>
</div>
 
<label for="est_type">Ce widget est un widget type</label>
<input type="radio" name="est_type" id="est_type" <?php echo (isset($widget['est_type']) && $projet['est_type']=== '1') ? 'checked="checked"' : ''; ?>/>
 
<label for="langue">Langue</label>
<?php if ($mode === 'modification') : ?>
<input id="langue" name="langue" readonly value="<?php echo $widget['langue']; ?>" />
<?php else : ?>
<input id="langue" name="langue" list="langues" >
<datalist id="langues" >
<?php foreach ($langues as $code => $langue) : ?>
<option value="<?php echo $code; ?>"><?php echo $langue['nom']; ?></option>
<?php endforeach; ?>
</datalist>
<?php endif; ?>
</div><!-- #basic-details-section -->
 
 
<div class="register-section" id="profile-details-description-section">
<h2>Description</h2>
<label for="titre">Titre</label>
<input type="text" name="titre" id="titre" value="<?php echo isset($widget['titre']) ? $widget['titre'] : ''; ?>" />
 
<label for="description">Description</label>
<textarea name="description" id="description"><?php echo isset($widget['description']) ? $widget['description'] : ''; ?></textarea>
 
<div class="input-file-container">
<input type="file" class="input-file" name="logo" id="logo" accept="image" />
<label for="logo" class="label-file"><i class="fas fa-download"></i> Logo</label>
</div>
<p class="file-return"></p>
 
<?php echo isset($widget['logo']) ? '<img src="'.$widget['logo'].'" /><br />Pour changer, télécharger un nouveau fichier.': ''; ?>
 
<div class="input-file-container">
<input type="file" class="input-file" name="fond" id="fond" value="<?php echo $widget['titre']; ?>" />
<label for="fond" class="label-file"><i class="fas fa-download"></i> Image de fond</label>
</div>
<p class="file-return"></p>
</div><!-- #profile-details-description-section -->
 
<div class="register-section" id="profile-details-fields-section">
<h2>Champs</h2>
<label for="type_localisation">Type de localisation</label>
<div class="select-wrapper">
<select id="type_localisation" name="type_localisation" >
<option value="<?php echo (isset($widget['type_localisation'])) ? $widget['type_localisation'] : 'point'; ?>"><?php echo (isset($widget['type_localisation'])) ? $widget['type_localisation'] : 'point'; ?></option>
<option value="<?php echo (isset($widget['type_localisation']) && $widget['type_localisation'] == 'rue') ? 'point' : 'rue'; ?>"><?php echo (isset($widget['type_localisation']) && $widget['type_localisation'] == 'rue') ? 'point' : 'rue'; ?></option>
</select>
</div>
 
<label for="localisation">Zoom</label>
<input type="text" name="localisation" id="localisation" value="<?php echo isset($widget['localisation']) ? $widget['localisation'] : ''; ?>" />
 
<label for="milieux">Milieux</label>
<input type="text" name="milieux" id="milieux" value="<?php echo isset($widget['milieux']) ? $widget['milieux'] : ''; ?>" />
 
<label for="type_especes">Type liste espèce *</label>
<div class="select-wrapper">
<select id="type_especes" name="type_especes" required>
<option selected="selected" value="referentiel">Référentiel</option>
<option value="liste">Liste</option>
<option value="liste" title="remplir référentiel + envoyer csv">Liste + autres</option>
<option value="fixe">Espèce fixée</option>
</select>
</div>
 
<label for="referentiel">Référentiel *</label>
<input type="text" name="referentiel" id="referentiel" required pattern="([a-z]+?)*"
title="Nom du référentiel ex. bdtfx"
value="<?php echo isset($widget['referentiel']) ? $widget['referentiel'] : ''; ?>"/>
<div class="input-file-container">
<input type="file" class="input-file" name="especes" id="especes" />
<label for="especes"class="label-file"><i class="fas fa-download"></i> Espèces</label>
fichier type
</div>
<p class="file-return"></p>
 
 
<label for="add_fields">Ajouter un champ</label>
<input type="button" class="button" name="add_fields" id="add_fields" title="Ajouter un champ" value="+"/>
</div><!-- #profile-details-fields-section -->
 
<div class="submit complete-registration">
<button href="#" type="submit" name="signup_submit" id="signup_submit" class="button" target="" title=""><span class="button-text">Terminer </span></button>
</div>
</form>
</div>
<div class="widget-blocks col-md-8 project">
<p class="message">
<?php if ($mode === 'modification') : ?>
Attention vous modifiez un widget déjà existant, le tag et la langue ne peuvent pas être changer.
S'il s'agit d'un projet type, en modifiant ce widget vous modifiez tous les widgets de ce type.
<?php else : ?>
Vous créez un widget, si vous choississez de le mettre dans un type, certains champs deviendront
obligatoires et la localisation (point ou rue) sera automatiquement déterminée.
<?php endif; ?>
</p>
<iframe src="http://localhost/widget:cel:saisie2?projet=<?php echo isset($widget['projet'])?$widget['projet']:'base'; ?>" class="widget-renderer" height="100%" width="100%" >
</iframe>
</div>
</div>
</div>
</body>
</html>
/trunk/widget/modules/manager/Manager.php
1,4 → 1,4
<?php
<?php
// declare(encoding='UTF-8');
/**
* Service affichant les dernières photo publiques du CEL ouvrable sous forme de diaporama.
14,172 → 14,172
* ===> vignette = [0-9]+,[0-9]+ [par défaut : 4,3]
* Indique le nombre de vignette par ligne et le nombre de ligne.
*
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
* @version $Id$
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
* @version $Id$
* @copyright Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
*/
class Manager extends WidgetCommun {
const DS = DIRECTORY_SEPARATOR;
const SERVICE_DEFAUT = 'manager';
private $cel_url_tpl = null;
/** Si spécifié, on ajoute une barre de navigation inter-applications */
private $bar;
//private $parametres_autorises = array('projet', 'type', 'langue', 'order');
private $parametres_autorises = array(
'projet' => 'projet',
'type' => 'type',
'langue' => 'langue',
'order' => 'order'
);
/**
* Méthode appelée par défaut pour charger ce widget.
*/
public function executer() {
$retour = null;
// Pour la création de l'id du cache nous ne tenons pas compte du paramètre de l'url callback
unset($this->parametres['callback']);
extract($this->parametres);
$this->bar = (isset($bar)) ? $bar : false;
 
if (!isset($mode)) {
$mode = self::SERVICE_DEFAUT;
}
$this->cel_url_tpl = $this->config['manager']['celUrlTpl'];
if ($_POST != array()) {
$this->parametres['projet'] = $_POST['projet'];
$this->parametres['langue'] = $_POST['langue'];
if ($mode == 'modification') {
$parametres = $this->traiterParametresModif();
$json = $this->getDao()->modifier($this->cel_url_tpl, $parametres);
} else {
$json = $this->getDao()->ajouter($this->cel_url_tpl, $_POST);
$this->parametres['mode'] = $mode = 'modification';
}
}
$methode = $this->traiterNomMethodeExecuter($mode);
if (method_exists($this, $methode)) {
$retour = $this->$methode();
} else {
$this->messages[] = "Ce type de service '$methode' n'est pas disponible.";
}
$contenu = '';
if (is_null($retour)) {
$this->messages[] = 'La ressource demandée a retourné une valeur nulle.';
} else {
if (isset($retour['donnees'])) {
$retour['donnees']['prod'] = ($this->config['parametres']['modeServeur'] == "prod");
$retour['donnees']['bar'] = $this->bar;
$retour['donnees']['url_base'] = sprintf($this->config['chemins']['baseURLAbsoluDyn'], '');
$retour['donnees']['mode'] = $mode;
$squelette = dirname(__FILE__).self::DS.'squelettes'.self::DS.$retour['squelette'].'.tpl.html';
$contenu = $this->traiterSquelettePhp($squelette, $retour['donnees']);
} else {
$this->messages[] = 'Les données à transmettre au squelette sont nulles.';
}
}
$this->envoyer($contenu);
}
private function executerManager() {
$params = array();
$retour['squelette'] = 'manager';
foreach ($this->parametres_autorises as $id=>$pa) {
if (isset($this->parametres[$pa])) {
$params[] = $pa."=".$this->parametres[$pa];
}
}
$param = implode($params, '&');
$url = $this->cel_url_tpl;
if ($param != "") $url .= '?'.$param;
$json = $this->getDao()->consulter($url);
$retour['donnees']['widget'] = (array) json_decode($json, true);
$retour['donnees']['widgetUrlTpl'] = $this->config['manager']['widgetUrlTpl'];
return $retour;
}
private function executerCreation() {
//https://api.tela-botanica.org/service:cel:NomsChampsEtendus/cle
$retour['squelette'] ='creation';
$jsonlangue = $this->getDao()->consulter($this->config['manager']['languesUrl']);
$tableaulangue= (array) json_decode($jsonlangue, true);
$retour['donnees']['langues'] = $tableaulangue['resultat'] ;
$retour['donnees']['widget'] = array();
if (isset($this->parametres['projet'])) {
$url = $this->cel_url_tpl.'?projet='.$this->parametres['projet'];
$json = $this->getDao()->consulter($url);
$tableau = (array) json_decode($json, true);
$retour['donnees']['widget'] = $tableau[0];
$urltype = $this->cel_url_tpl.'?esttype=1';
$jsontype = $this->getDao()->consulter($urltype);
$tableautype= (array) json_decode($jsontype, true);
$retour['donnees']['type'] = $tableautype;
}
return $retour;
}
private function executerSaisie() {
$retour = '';
if (isset($this->parametres['projet'])) {
$retour['squelette'] = 'saisie';
$url = $this->cel_url_tpl.'?projet='.$this->parametres['projet'];
$json = $this->getDao()->consulter($url);
$tableau = (array) json_decode($json, true);
$retour['donnees']['widget'] = $tableau[0];
}
return $retour;
}
private function executerModification() {
$retour = '';
if (isset($this->parametres['projet'])) {
$retour['squelette'] = 'creation';
$url = $this->cel_url_tpl.'?projet='.$this->parametres['projet'].'&langue='.$this->parametres['langue'];
$json = $this->getDao()->consulter($url);
$tableau = (array) json_decode($json, true);
$retour['donnees']['widget'] = $tableau[0];
$urltype = $this->cel_url_tpl.'?esttype=1';
$jsontype = $this->getDao()->consulter($urltype);
$tableautype= (array) json_decode($jsontype, true);
$retour['donnees']['type'] = $tableautype;
}
return $retour;
}
private function traiterParametres() {
$parametres_flux = '?';
$criteres = array('utilisateur', 'commune', 'dept', 'taxon', 'commentaire', 'date', 'tag', 'motcle', 'projet', 'num_taxon', 'num_nom', 'referentiel', 'groupe_zones_geo');
foreach($this->parametres as $nom_critere => $valeur_critere) {
if (in_array($nom_critere, $criteres)) {
$valeur_critere = str_replace(' ', '%20', $valeur_critere);
$parametres_flux .= $nom_critere.'='.$valeur_critere.'&';
}
}
if ($parametres_flux == '?') {
$parametres_flux = '';
} else {
$parametres_flux = rtrim($parametres_flux, '&');
}
return $parametres_flux;
}
private function traiterParametresModif() {
$parametres_modif = array();
foreach ($_POST as $id => $parametres) {
if ($parametres != "") {
$parametres_modif[$id] = $parametres;
}
}
return $parametres_modif;
}
const DS = DIRECTORY_SEPARATOR;
const SERVICE_DEFAUT = 'manager';
private $cel_url_tpl = null;
/** Si spécifié, on ajoute une barre de navigation inter-applications */
private $bar;
//private $parametres_autorises = array('projet', 'type', 'langue', 'order');
private $parametres_autorises = array(
'projet' => 'projet',
'type' => 'type',
'langue' => 'langue',
'order' => 'order'
);
/**
* Méthode appelée par défaut pour charger ce widget.
*/
public function executer() {
$retour = null;
// Pour la création de l'id du cache nous ne tenons pas compte du paramètre de l'url callback
unset($this->parametres['callback']);
extract($this->parametres);
$this->bar = (isset($bar)) ? $bar : false;
 
if (!isset($mode)) {
$mode = self::SERVICE_DEFAUT;
}
 
$this->cel_url_tpl = $this->config['manager']['celUrlTpl'];
 
if ($_POST != array()) {
$this->parametres['projet'] = $_POST['projet'];
$this->parametres['langue'] = $_POST['langue'];
if ($mode == 'modification') {
$parametres = $this->traiterParametresModif();
$json = $this->getDao()->modifier($this->cel_url_tpl, $parametres);
} else {
$json = $this->getDao()->ajouter($this->cel_url_tpl, $_POST);
$this->parametres['mode'] = $mode = 'modification';
}
}
 
 
 
 
$methode = $this->traiterNomMethodeExecuter($mode);
if (method_exists($this, $methode)) {
$retour = $this->$methode();
} else {
$this->messages[] = "Ce type de service '$methode' n'est pas disponible.";
}
 
$contenu = '';
if (is_null($retour)) {
$this->messages[] = 'La ressource demandée a retourné une valeur nulle.';
} else {
if (isset($retour['donnees'])) {
$retour['donnees']['prod'] = ($this->config['parametres']['modeServeur'] == "prod");
$retour['donnees']['bar'] = $this->bar;
$retour['donnees']['url_base'] = sprintf($this->config['chemins']['baseURLAbsoluDyn'], '');
$retour['donnees']['mode'] = $mode;
$squelette = dirname(__FILE__).self::DS.'squelettes'.self::DS.$retour['squelette'].'.tpl.html';
$contenu = $this->traiterSquelettePhp($squelette, $retour['donnees']);
} else {
$this->messages[] = 'Les données à transmettre au squelette sont nulles.';
}
}
$this->envoyer($contenu);
}
 
private function executerManager() {
$params = array();
$retour['squelette'] = 'manager';
foreach ($this->parametres_autorises as $id=>$pa) {
if (isset($this->parametres[$pa])) {
$params[] = $pa."=".$this->parametres[$pa];
}
}
$param = implode($params, '&');
$url = $this->cel_url_tpl;
if ($param != "") $url .= '?'.$param;
$json = $this->getDao()->consulter($url);
$retour['donnees']['widget'] = (array) json_decode($json, true);
$retour['donnees']['widgetUrlTpl'] = $this->config['manager']['widgetUrlTpl'];
return $retour;
}
 
private function executerCreation() {
//https://api.tela-botanica.org/service:cel:NomsChampsEtendus/cle
$retour['squelette'] ='creation';
$jsonlangue = $this->getDao()->consulter($this->config['manager']['languesUrl']);
$tableaulangue= (array) json_decode($jsonlangue, true);
$retour['donnees']['langues'] = $tableaulangue['resultat'] ;
$retour['donnees']['widget'] = array();
if (isset($this->parametres['projet'])) {
$url = $this->cel_url_tpl.'?projet='.$this->parametres['projet'];
$json = $this->getDao()->consulter($url);
$tableau = (array) json_decode($json, true);
$retour['donnees']['widget'] = $tableau[0];
$urltype = $this->cel_url_tpl.'?esttype=1';
$jsontype = $this->getDao()->consulter($urltype);
$tableautype= (array) json_decode($jsontype, true);
$retour['donnees']['type'] = $tableautype;
}
return $retour;
}
 
private function executerSaisie() {
$retour = '';
if (isset($this->parametres['projet'])) {
$retour['squelette'] = 'saisie';
$url = $this->cel_url_tpl.'?projet='.$this->parametres['projet'];
$json = $this->getDao()->consulter($url);
$tableau = (array) json_decode($json, true);
$retour['donnees']['widget'] = $tableau[0];
}
return $retour;
}
 
private function executerModification() {
$retour = '';
if (isset($this->parametres['projet'])) {
$retour['squelette'] = 'creation';
$url = $this->cel_url_tpl.'?projet='.$this->parametres['projet'].'&langue='.$this->parametres['langue'];
$json = $this->getDao()->consulter($url);
$tableau = (array) json_decode($json, true);
$retour['donnees']['widget'] = $tableau[0];
$urltype = $this->cel_url_tpl.'?esttype=1';
$jsontype = $this->getDao()->consulter($urltype);
$tableautype= (array) json_decode($jsontype, true);
$retour['donnees']['type'] = $tableautype;
}
return $retour;
}
private function traiterParametres() {
$parametres_flux = '?';
$criteres = array('utilisateur', 'commune', 'dept', 'taxon', 'commentaire', 'date', 'tag', 'motcle', 'projet', 'num_taxon', 'num_nom', 'referentiel', 'groupe_zones_geo');
foreach($this->parametres as $nom_critere => $valeur_critere) {
if (in_array($nom_critere, $criteres)) {
$valeur_critere = str_replace(' ', '%20', $valeur_critere);
$parametres_flux .= $nom_critere.'='.$valeur_critere.'&';
}
}
 
if ($parametres_flux == '?') {
$parametres_flux = '';
} else {
$parametres_flux = rtrim($parametres_flux, '&');
}
return $parametres_flux;
}
 
private function traiterParametresModif() {
$parametres_modif = array();
foreach ($_POST as $id => $parametres) {
if ($parametres != "") {
$parametres_modif[$id] = $parametres;
}
}
return $parametres_modif;
}
}
?>
?>
/trunk/widget/modules/saisie2/framework.php
2,5 → 2,5
// Inclusion du Framework
// Renommer ce fichier en "framework.php"
// Indiquer ci-dessous le chemin absolu vers le fichier Framework.php de la version souhaitée du Framework
require_once '/home/delphine/web/framework/framework/Framework.php';
?>
require_once '/home/idir/dev/wordpress-tela-VVV/www/tbframework/Framework.php';
?>