This commit is contained in:
Fred Tempez 2025-01-08 22:46:54 +01:00
commit 8bfcb0163a
74 changed files with 1442 additions and 1366 deletions

View File

@ -1,4 +1,4 @@
# ZwiiCampus 1.15.04
# ZwiiCampus 1.17.00
ZwiiCampus (Learning Management System) est logiciel auteur destiné à mettre en ligne des tutoriels. Il dispose de plusieurs modalités d'ouverture et d'accès des contenus. Basé sur la version 13 du CMS Zwii, la structure logicielle est solide, le framework de Zwii est éprouvé.

View File

@ -21,7 +21,7 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
*
* @param array|null $data Data
*/
public function __construct(array $data = null)
public function __construct(?array $data = null)
{
if (is_array($data)) {
$this->data = $data;
@ -101,7 +101,7 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
}
} else {
// Iterate path
$keys = explode('.', (string) $key);
$keys = explode('.', (string)$key);
if ($pop === true) {
array_pop($keys);
}
@ -199,7 +199,7 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
*/
public function has($key)
{
$keys = explode('.', (string) $key);
$keys = explode('.', (string)$key);
$data = &$this->data;
foreach ($keys as $key) {
if (!isset($data[$key])) {
@ -371,7 +371,7 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
*/
public function isEmpty(): bool
{
return !(bool) count($this->data);
return !(bool)count($this->data);
}
/**
@ -391,7 +391,7 @@ class Dot implements \ArrayAccess, \Iterator, \Countable
*/
public function toJson()
{
return json_encode($this->data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
return json_encode($this->data, JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT);
}
/**

View File

@ -51,7 +51,7 @@ class common
const ACCESS_TIMER = 1800;
// Numéro de version
const ZWII_VERSION = '1.16.01';
const ZWII_VERSION = '1.17.00';
// URL autoupdate
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/campus-update/raw/branch/master/';
@ -393,7 +393,6 @@ class common
$this->initData($stageId, self::$siteContent);
}
}
}
// Récupère un utilisateur connecté
@ -413,11 +412,11 @@ class common
: 'fr_FR';
} else {
// Par défaut la langue définie par défaut à l'installation
if ($this->getData(['config','defaultLanguageUI'])) {
self::$i18nUI = $this->getData(['config','defaultLanguageUI']);
if ($this->getData(['config', 'defaultLanguageUI'])) {
self::$i18nUI = $this->getData(['config', 'defaultLanguageUI']);
} else {
self::$i18nUI = 'fr_FR';
$this->setData(['config','defaultLanguageUI', 'fr_FR']);
$this->setData(['config', 'defaultLanguageUI', 'fr_FR']);
}
}
@ -491,7 +490,6 @@ class common
// Mise à jour des données core
include('core/include/update.inc.php');
}
/**
@ -707,7 +705,6 @@ class common
// Instanciation de l'objet et stockage dans dataFiles
$this->dataFiles[$module] = new \Prowebcraft\JsonDb($config);
}
@ -755,12 +752,10 @@ class common
$content = $path === 'home' ? init::$siteContent : init::$courseContent;
foreach ($content as $key => $value) {
$this->setPage($key, $value['content'], $path);
}
}
common::$coreNotices[] = $module;
}
/**
* Initialisation des données
@ -1124,6 +1119,7 @@ class common
* @param string Valeurs possibles
*/
public function updateSitemap()
{
// Le drapeau prend true quand au moins une page est trouvée
@ -1240,9 +1236,9 @@ class common
}
return (file_exists('sitemap.xml') && file_exists('robots.txt'));
}
/*
* Création d'une miniature
* Fonction utilisée lors de la mise à jour d'une version 9 à une version 10
@ -1547,7 +1543,7 @@ class common
foreach ($courses as $courseId => $value) {
// Affiche les espaces gérés par l'éditeur, les espaces où il participe et les espaces anonymes
if (
// le membre est inscrit
// le membre est inscrit
($this->getData(['enrolment', $courseId]) && array_key_exists($this->getUser('id'), $this->getData(['enrolment', $courseId])))
// Il est l'auteur
|| $this->getUser('id') === $this->getData(['course', $courseId, 'author'])
@ -1600,5 +1596,4 @@ class common
return $this->getData(['user', $userId, 'firstname']);
}
}
}
}

View File

@ -700,7 +700,7 @@
"Connexion réussie": "Login successful",
"Erreur de mot de passe": "Password error",
"Erreur de captcha": "Captcha error",
"Clé envoyée par message": "Key sent via message",
"Clé de sécurité": "Security key",
"Message de test": "Test message",
"Clé d'authentification envoyée à votre adresse mail %s": "Authentication key sent to your email address %s"
}

View File

@ -700,7 +700,7 @@
"Connexion réussie": "Conexión exitosa",
"Erreur de mot de passe": "Error de contraseña",
"Erreur de captcha": "Error de captcha",
"Clé envoyée par message": "Clave enviada por mensaje",
"Clé de sécurité": "Clave de seguridad",
"Message de test": "Mensaje de prueba",
"Clé d'authentification envoyée à votre adresse mail %s": "Clave de autenticación enviada a su dirección de correo electrónico %s"
}

View File

@ -700,7 +700,7 @@
"Connexion réussie": "",
"Erreur de mot de passe": "",
"Erreur de captcha": "",
"Clé envoyée par message": "",
"Clé de sécurité": "",
"Message de test": "",
"Clé d'authentification envoyée à votre adresse mail %s": ""
}

View File

@ -19,7 +19,7 @@ setlocale(LC_CTYPE, $lang);
/* Lecture du groupe de l'utilisateur connecté pour attribuer les droits et les dossiers */
$userId = $_COOKIE['ZWII_USER_ID'];
$courseId = $_GET['fldr'];
$courseId = isset($_GET['fldr']) ? $_GET['fldr'] : '';
$u = json_decode(file_get_contents('../../../site/data/user.json'), true);
$g = json_decode(file_get_contents('../../../site/data/profil.json'), true);

View File

@ -16,7 +16,7 @@
class blog extends common
{
const VERSION = '8.1';
const VERSION = '8.2';
const REALNAME = 'Blog';
const DELETE = true;
const UPDATE = '0.0';

View File

@ -1,4 +1,6 @@
# Version 8.01
# Version 8.2
- Remplacement du nom générique de classe dans les vues.
# Version 8.1
- Un mail de notification est seulement envoyé lorsque le captcha est passé et que le commentaire est déposé.
- Le mail de notification contient désormais le nom de l'auteur du commentaire ainsi que le commentaire.
# Version 8.00

View File

@ -49,12 +49,12 @@
]); ?>
</div>
<div class="col4">
<?php echo template::select('blogAddPictureSize', $module::$pictureSizes, [
<?php echo template::select('blogAddPictureSize', blog::$pictureSizes, [
'label' => 'Largeur de l\'image'
]); ?>
</div>
<div class="col4">
<?php echo template::select('blogAddPicturePosition', $module::$picturePositions, [
<?php echo template::select('blogAddPicturePosition', blog::$picturePositions, [
'label' => 'Position',
'help' => 'Le texte de l\'article est adapté autour de l\'image'
]); ?>
@ -79,7 +79,7 @@
<h4><?php echo helper::translate('Options de publication'); ?></h4>
<div class="row">
<div class="col4">
<?php echo template::select('blogAddUserId', $module::$users, [
<?php echo template::select('blogAddUserId', blog::$users, [
'label' => 'Auteur',
'selected' => $this->getUser('id'),
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN ? true : false
@ -95,9 +95,9 @@
]); ?>
</div>
<div class="col4">
<?php echo template::select('blogAddConsent', $module::$articleConsent , [
<?php echo template::select('blogAddConsent', blog::$articleConsent , [
'label' => 'Édition - Suppression',
'selected' => $module::EDIT_ALL,
'selected' => blog::EDIT_ALL,
'help' => 'Les utilisateurs des groupes supérieurs accèdent à l\'article sans restriction'
]); ?>
</div>
@ -117,7 +117,7 @@
<?php echo template::checkbox('blogAddCommentApproved', true, 'Approbation par un modérateur'); ?>
</div>
<div class="col4 commentOptionsWrapper">
<?php echo template::select('blogAddCommentMaxlength', $module::$commentsLength,[
<?php echo template::select('blogAddCommentMaxlength', blog::$commentsLength,[
'help' => 'Choix du nombre maximum de caractères pour chaque commentaire de l\'article, mise en forme html comprise.',
'label' => 'Caractères par commentaire'
]); ?>
@ -128,7 +128,7 @@
<?php echo template::checkbox('blogAddCommentNotification', true, 'Notification par email'); ?>
</div>
<div class="col4 commentOptionsWrapper">
<?php echo template::select('blogAddCommentGroupNotification', $module::$groupNews); ?>
<?php echo template::select('blogAddCommentGroupNotification', blog::$groupNews); ?>
</div>
</div>
</div>

View File

@ -34,7 +34,7 @@
<?php echo template::ico('calendar-empty', ['margin' => 'left']); ?>
<?php endif; ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true): ?>
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
<?php echo helper::dateUTF8(blog::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
<?php endif; ?>
<?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
@ -43,14 +43,14 @@
<?php echo '&nbsp;-&nbsp;'; ?>
<?php endif; ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showTime']) === true): ?>
<?php echo helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
<?php echo helper::dateUTF8(blog::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
<?php endif; ?>
<!-- Bloc edition -->
<?php if (
$this->isConnected() === true
and
( // Propriétaire
($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === $module::EDIT_OWNER
($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === blog::EDIT_OWNER
and ($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'userId']) === $this->getUser('id')
or $this->getUser('group') === self::GROUP_ADMIN)
)
@ -62,8 +62,8 @@
)
or (
// Tout le monde
$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === $module::EDIT_ALL
and $this->getUser('group') >= $module::$actions['config']
$this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === blog::EDIT_ALL
and $this->getUser('group') >= blog::$actions['config']
)
)
): ?>
@ -95,8 +95,8 @@
<h3>
<?php
echo template::ico('comment', ['margin' => 'right']);
if ($module::$nbCommentsApproved > 0) {
echo $module::$nbCommentsApproved . ' commentaire' . ($module::$nbCommentsApproved > 1 ? 's' : '');
if (blog::$nbCommentsApproved > 0) {
echo blog::$nbCommentsApproved . ' commentaire' . (blog::$nbCommentsApproved > 1 ? 's' : '');
} else {
echo 'Pas encore de commentaire';
}
@ -114,7 +114,7 @@
<?php echo template::text('blogArticleUserName', [
'label' => 'Nom',
'readonly' => true,
'value' => $module::$editCommentSignature
'value' => blog::$editCommentSignature
]); ?>
<?php echo template::hidden('blogArticleUserId', [
'value' => $this->getUser('id')
@ -172,17 +172,17 @@
<?php endif; ?>
<div class="row">
<div class="col12">
<?php foreach ($module::$comments as $commentId => $comment): ?>
<?php foreach (blog::$comments as $commentId => $comment): ?>
<div class="block">
<h4>
<?php echo template::ico('user'); ?>
<?php echo $module::$commentsSignature[$commentId]; ?>
<?php echo blog::$commentsSignature[$commentId]; ?>
<?php echo template::ico('calendar-empty'); ?>
<?php echo helper::dateUTF8($module::$dateFormat, $comment['createdOn'], self::$i18nUI) . ' - ' . helper::dateUTF8($module::$timeFormat, $comment['createdOn'], self::$i18nUI); ?>
<?php echo helper::dateUTF8(blog::$dateFormat, $comment['createdOn'], self::$i18nUI) . ' - ' . helper::dateUTF8(blog::$timeFormat, $comment['createdOn'], self::$i18nUI); ?>
</h4>
<?php echo $comment['content']; ?>
</div>
<?php endforeach; ?>
</div>
</div>
<?php echo $module::$pages; ?>
<?php echo blog::$pages; ?>

View File

@ -8,14 +8,14 @@
]); ?>
</div>
<?php if($module::$comments): ?>
<?php if(blog::$comments): ?>
<div class="col2 offset8">
<?php echo $module::$commentsDelete; ?>
<?php echo blog::$commentsDelete; ?>
</div>
</div>
<?php echo template::table([3, 5, 2, 1, 1], $module::$comments, ['Date', 'Contenu', 'Auteur', '', '']); ?>
<?php echo $module::$pages.'<br/>'; ?>
<?php echo template::table([3, 5, 2, 1, 1], blog::$comments, ['Date', 'Contenu', 'Auteur', '', '']); ?>
<?php echo blog::$pages.'<br/>'; ?>
<?php else: ?>
</div>
<?php echo template::speech('Aucun commentaire'); ?>

View File

@ -25,13 +25,13 @@
</div>
</div>
<?php echo template::formClose(); ?>
<?php if($module::$articles): ?>
<?php echo template::table([4, 4, 1, 1, 1, 1], $module::$articles, ['Titre', 'Publication', 'État', 'Commentaires', '','']); ?>
<?php echo $module::$pages; ?>
<?php if(blog::$articles): ?>
<?php echo template::table([4, 4, 1, 1, 1, 1], blog::$articles, ['Titre', 'Publication', 'État', 'Commentaires', '','']); ?>
<?php echo blog::$pages; ?>
<?php else: ?>
<?php echo template::speech('Aucun article'); ?>
<?php endif; ?>
<div class="moduleVersion">Version
<?php echo $module::VERSION; ?>
<?php echo blog::VERSION; ?>
</div>

View File

@ -53,13 +53,13 @@
]); ?>
</div>
<div class="col3">
<?php echo template::select('blogEditPictureSize', $module::$pictureSizes, [
<?php echo template::select('blogEditPictureSize', blog::$pictureSizes, [
'label' => 'Largeur de l\'image',
'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'pictureSize'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('blogEditPicturePosition', $module::$picturePositions, [
<?php echo template::select('blogEditPicturePosition', blog::$picturePositions, [
'label' => 'Position',
'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'picturePosition']),
'help' => 'Le texte de l\'article est adapté autour de l\'image'
@ -86,7 +86,7 @@
<h4><?php echo helper::translate('Options de publication'); ?></h4>
<div class="row">
<div class="col4">
<?php echo template::select('blogEditUserId', $module::$users, [
<?php echo template::select('blogEditUserId', blog::$users, [
'label' => 'Auteur',
'selected' => $this->getUser('id'),
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN ? true : false
@ -101,9 +101,9 @@
]); ?>
</div>
<div class="col4">
<?php echo template::select('blogEditConsent', $module::$articleConsent, [
<?php echo template::select('blogEditConsent', blog::$articleConsent, [
'label' => 'Édition - Suppression',
'selected' => is_numeric($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'editConsent'])) ? $module::EDIT_GROUP : $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'editConsent']),
'selected' => is_numeric($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'editConsent'])) ? blog::EDIT_GROUP : $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'editConsent']),
'help' => 'Les utilisateurs des groupes supérieurs accèdent à l\'article sans restriction'
]); ?>
</div>
@ -128,7 +128,7 @@
]); ?>
</div>
<div class="col4 commentOptionsWrapper">
<?php echo template::select('blogEditCommentMaxlength', $module::$commentsLength, [
<?php echo template::select('blogEditCommentMaxlength', blog::$commentsLength, [
'help' => 'Choix du nombre maximum de caractères pour chaque commentaire de l\'article, mise en forme html comprise.',
'label' => 'Caractères par commentaire',
'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentMaxlength'])
@ -143,7 +143,7 @@
]); ?>
</div>
<div class="col4 commentOptionsWrapper">
<?php echo template::select('blogEditCommentGroupNotification', $module::$groupNews, [
<?php echo template::select('blogEditCommentGroupNotification', blog::$groupNews, [
'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentGroupNotification']),
]); ?>
</div>

View File

@ -8,9 +8,9 @@
</a>
</div>
<?php endif; ?>
<?php if ($module::$articles): ?>
<?php if (blog::$articles): ?>
<article id="article">
<?php foreach ($module::$articles as $articleId => $article): ?>
<?php foreach (blog::$articles as $articleId => $article): ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'layout']) === true): ?>
<div class="readMoreModernContainer">
<div class="row">
@ -39,7 +39,7 @@
<?php echo template::ico('calendar-empty', ['margin' => 'left']); ?>
<?php endif; ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true): ?>
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
<?php echo helper::dateUTF8(blog::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
<?php endif; ?>
<?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
@ -48,7 +48,7 @@
<?php echo '&nbsp;-&nbsp;'; ?>
<?php endif; ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showTime']) === true): ?>
<?php echo helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
<?php echo helper::dateUTF8(blog::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
<?php endif; ?>
</div>
</div>
@ -75,7 +75,7 @@
$this->isConnected() === true
and
( // Propriétaire
($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'editConsent']) === $module::EDIT_OWNER
($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'editConsent']) === blog::EDIT_OWNER
and ($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'userId']) === $this->getUser('id')
or $this->getUser('group') === self::GROUP_ADMIN)
)
@ -87,8 +87,8 @@
)
or (
// Tout le monde
$this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'editConsent']) === $module::EDIT_ALL
and $this->getUser('group') >= $module::$actions['config']
$this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'editConsent']) === blog::EDIT_ALL
and $this->getUser('group') >= blog::$actions['config']
)
)
): ?>
@ -104,9 +104,9 @@
<p>
<?php echo template::ico('comment', ['margin' => 'right']); ?>
<?php
if ($module::$comments[$articleId] > 0) {
if (blog::$comments[$articleId] > 0) {
echo '<a href="' . helper::baseUrl() . $this->getUrl(0) . '/' . $articleId . '">';
echo $module::$comments[$articleId] . ' commentaire' . ($module::$comments[$articleId] > 1 ? 's' : '');
echo blog::$comments[$articleId] . ' commentaire' . (blog::$comments[$articleId] > 1 ? 's' : '');
echo '</a>';
} else {
echo 'Pas encore de commentaire';
@ -153,8 +153,8 @@
</h2>
<div class="blogComment">
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>#comment">
<?php if ($module::$comments[$articleId]): ?>
<?php echo $module::$comments[$articleId]; ?>
<?php if (blog::$comments[$articleId]): ?>
<?php echo blog::$comments[$articleId]; ?>
<?php echo template::ico('comment', ['margin' => 'left']); ?>
<?php endif; ?>
</a>
@ -174,7 +174,7 @@
<?php echo template::ico('calendar-empty', ['margin' => 'left']); ?>
<?php endif; ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true): ?>
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
<?php echo helper::dateUTF8(blog::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
<?php endif; ?>
<?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
@ -183,7 +183,7 @@
<?php echo '&nbsp;-&nbsp;'; ?>
<?php endif; ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showTime']) === true): ?>
<?php echo helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
<?php echo helper::dateUTF8(blog::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'publishedOn']), self::$i18nUI); ?>
<?php endif; ?>
<div class="blogContent">
<?php $lenght = $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght']); ?>
@ -207,7 +207,7 @@
<?php endif; ?>
<?php endforeach; ?>
</article>
<?php echo $module::$pages; ?>
<?php echo blog::$pages; ?>
<?php else: ?>
<?php echo template::speech('Aucun article'); ?>
<?php endif; ?>

View File

@ -36,7 +36,7 @@
]); ?>
</div>
<div class="col3">
<?php echo template::select('blogOptionDateFormat', $module::$dateFormats, [
<?php echo template::select('blogOptionDateFormat', blog::$dateFormats, [
'label' => 'Format des dates',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'dateFormat'])
]); ?>
@ -47,7 +47,7 @@
]); ?>
</div>
<div class="col3 timeWrapper">
<?php echo template::select('blogOptionTimeFormat', $module::$timeFormats, [
<?php echo template::select('blogOptionTimeFormat', blog::$timeFormats, [
'label' => 'Format des heures',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'timeFormat'])
]); ?>
@ -55,19 +55,19 @@
</div>
<div class="row">
<div class="col4">
<?php echo template::select('blogOptionArticlesLayout', $module::$articlesLayout, [
<?php echo template::select('blogOptionArticlesLayout', blog::$articlesLayout, [
'label' => 'Disposition',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'layout'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('blogOptionArticlesLenght', $module::$articlesLenght, [
<?php echo template::select('blogOptionArticlesLenght', blog::$articlesLenght, [
'label' => 'Aperçus',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('blogOptionItemsperPage', $module::$ArticlesListed, [
<?php echo template::select('blogOptionItemsperPage', blog::$ArticlesListed, [
'label' => 'Articles par page',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'itemsperPage'])
]); ?>
@ -91,5 +91,5 @@
</div>
<?php echo template::formClose(); ?>
<div class="moduleVersion">Version
<?php echo $module::VERSION; ?>
<?php echo blog::VERSION; ?>
</div>

View File

@ -1,4 +1,6 @@
# Versions 4.4
# Version 4.5
- Remplacement du nom générique de classe dans les vues.
# Version 4.4
- Le sélecteur de fichier affiche par défaut le chemin vers le fichier présent dans le champ.
# Version 4.3
- Contrôle de la variable de session liée au contenu. Evite des erreurs lorsque plusieurs onglets sont ouverts.

View File

@ -17,7 +17,7 @@
class form extends common
{
const VERSION = '4.4';
const VERSION = '4.5';
const REALNAME = 'Formulaire';
const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json)
@ -503,6 +503,8 @@ class form extends common
'notification' => ($sent === true ? helper::translate('Formulaire soumis') : $sent),
'redirect' => $redirect ? helper::baseUrl() . $redirect : '',
'state' => ($sent === true ? true : false),
'vendor' => [
],
]);
}
// Valeurs en sortie

View File

@ -16,7 +16,7 @@
]); ?>
</div>
<div class="col4">
<?php echo template::select('formConfigType[]', $module::$types, [
<?php echo template::select('formConfigType[]', form::$types, [
'class' => 'formConfigType'
]); ?>
</div>
@ -93,5 +93,5 @@
</div>
<?php echo template::formClose(); ?>
<div class="moduleVersion">Version
<?php echo $module::VERSION; ?>
<?php echo form::VERSION; ?>
</div>

View File

@ -22,12 +22,12 @@
]); ?>
</div>
</div>
<?php if($module::$data): ?>
<?php echo template::table([11, 1], $module::$data, ['Données', '']); ?>
<?php echo $module::$pages; ?>
<?php if(form::$data): ?>
<?php echo template::table([11, 1], form::$data, ['Données', '']); ?>
<?php echo form::$pages; ?>
<?php else: ?>
<?php echo template::speech('Aucune donnée'); ?>
<?php endif; ?>
<div class="moduleVersion">Version
<?php echo $module::VERSION; ?>
<?php echo form::VERSION; ?>
</div>

View File

@ -6,12 +6,12 @@
?>">
<?php echo template::formOpen('formForm'); ?>
<?php foreach ($this->getData(['module', $this->getUrl(0), 'input']) as $index => $input): ?>
<?php if ($input['type'] === $module::TYPE_MAIL): ?>
<?php if ($input['type'] === form::TYPE_MAIL): ?>
<?php echo template::mail('formInput[' . $index . ']', [
'id' => 'formInput_' . $index,
'label' => $input['name']
]); ?>
<?php elseif ($input['type'] === $module::TYPE_SELECT): ?>
<?php elseif ($input['type'] === form::TYPE_SELECT): ?>
<?php
$values = array_flip(explode(',', $input['values']));
foreach ($values as $value => $key) {
@ -22,28 +22,28 @@
'id' => 'formInput_' . $index,
'label' => $input['name']
]); ?>
<?php elseif ($input['type'] === $module::TYPE_TEXT): ?>
<?php elseif ($input['type'] === form::TYPE_TEXT): ?>
<?php echo template::text('formInput[' . $index . ']', [
'id' => 'formInput_' . $index,
'label' => $input['name']
]); ?>
<?php elseif ($input['type'] === $module::TYPE_TEXTAREA): ?>
<?php elseif ($input['type'] === form::TYPE_TEXTAREA): ?>
<?php echo template::textarea('formInput[' . $index . ']', [
'id' => 'formInput_' . $index,
'label' => $input['name']
]); ?>
<?php elseif ($input['type'] === $module::TYPE_DATETIME): ?>
<?php elseif ($input['type'] === form::TYPE_DATETIME): ?>
<?php echo template::date('formInput[' . $index . ']', [
'id' => 'formInput_' . $index,
'label' => $input['name'],
'type' => 'date',
]); ?>
<?php elseif ($input['type'] === $module::TYPE_CHECKBOX): ?>
<?php elseif ($input['type'] === form::TYPE_CHECKBOX): ?>
<?php echo template::checkbox(
'formInput[' . $index . ']',
true, $input['name']
); ?>
<?php elseif ($input['type'] === $module::TYPE_LABEL): ?>
<?php elseif ($input['type'] === form::TYPE_LABEL): ?>
<h3 class='formLabel'>
<?php echo $input['name']; ?>
<hr class="formLabel">

View File

@ -36,7 +36,7 @@
]); ?>
</div>
<div class="col5">
<?php echo template::select('formOptionPageId', $module::$pages, [
<?php echo template::select('formOptionPageId', form::$pages, [
'classWrapper' => 'displayNone',
'label' => 'Page du site',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'pageId'])
@ -52,7 +52,7 @@
<h4><?php echo helper::translate('Gabarit'); ?></h4>
<div class="row">
<div class="col6">
<?php echo template::select('formOptionAlign', $module::$optionAlign, [
<?php echo template::select('formOptionAlign', form::$optionAlign, [
'label' => 'Alignement du formulaire',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'align'])
]); ?>
@ -60,13 +60,13 @@
</div>
<div class="row">
<div class="col6">
<?php echo template::select('formOptionOffset', $module::$optionOffset, [
<?php echo template::select('formOptionOffset', form::$optionOffset, [
'label' => 'Décalage à gauche',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'offset'])
]); ?>
</div>
<div class="col6">
<?php echo template::select('formOptionWidth', $module::$optionWidth, [
<?php echo template::select('formOptionWidth', form::$optionWidth, [
'label' => 'Largeur',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'width'])
]); ?>
@ -97,7 +97,7 @@
</div>
<?php
// Element 0 quand aucun membre a été sélectionné
$groupMembers = [''] + $module::$groupNews;
$groupMembers = [''] + form::$groupNews;
?>
<div class="row">
<div class="col4">
@ -107,9 +107,9 @@
]); ?>
</div>
<div class="col4">
<?php echo template::select('formOptionUser', $module::$listUsers, [
<?php echo template::select('formOptionUser', form::$listUsers, [
'label' => 'A un membre',
'selected' => array_search($this->getData(['module', $this->getUrl(0), 'config', 'user']), $module::$listUsers)
'selected' => array_search($this->getData(['module', $this->getUrl(0), 'config', 'user']), form::$listUsers)
]); ?>
</div>
<div class="col4">
@ -121,7 +121,7 @@
</div>
<div class="row">
<div class="col4">
<?php echo template::select('formOptionSignature', $module::$signature, [
<?php echo template::select('formOptionSignature', form::$signature, [
'label' => 'Type de signature',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'signature'])
]); ?>
@ -135,7 +135,7 @@
]); ?>
</div>
<div class="col4">
<?php echo template::select('formOptionLogoWidth', $module::$logoWidth, [
<?php echo template::select('formOptionLogoWidth', form::$logoWidth, [
'label' => 'Largeur du logo',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'logoWidth'])
]); ?>

View File

@ -1,3 +1,5 @@
# Version 4.3
- Remplacement du nom générique de classe dans les vues.
# Version 4.2
- Contrôle de la variable de session liée au contenu. Evite des erreurs lorsque plusieurs onglets sont ouverts.
# Version 4.1

View File

@ -18,7 +18,7 @@ class gallery extends common
{
const VERSION = '4.2';
const VERSION = '4.3';
const REALNAME = 'Galerie';
const DATADIRECTORY = self::DATA_DIR . 'gallery/';

View File

@ -35,7 +35,7 @@
</div>
<div class="row">
<div class="col3">
<?php echo template::select('galleryAddSort', $module::$sort, [
<?php echo template::select('galleryAddSort', gallery::$sort, [
'selected' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'sort']),
'label' => 'Tri des images',
'help' => 'Tri manuel : déplacez le images dans le tableau ci-dessous. L\'ordre est sauvegardé automatiquement.'

View File

@ -31,14 +31,14 @@
<?php echo template::formClose(); ?>
<div class="row">
<div class="col12">
<?php if($module::$galleries): ?>
<?php echo template::table([1, 4, 5, 1, 1], $module::$galleries, ['#','Nom', 'Dossier cible', '', ''], ['id' => 'galleryTable'],$module::$galleriesId); ?>
<?php if(gallery::$galleries): ?>
<?php echo template::table([1, 4, 5, 1, 1], gallery::$galleries, ['#','Nom', 'Dossier cible', '', ''], ['id' => 'galleryTable'],gallery::$galleriesId); ?>
<?php echo template::hidden('galleryConfigFilterResponse'); ?>
<?php else: ?>
<?php echo template::speech('Aucune galerie'); ?>
<?php endif; ?>
</div>
<div class="moduleVersion">Version
<?php echo $module::VERSION; ?>
<?php echo gallery::VERSION; ?>
</div>
</div>

View File

@ -19,8 +19,8 @@
</div>
<div class="row">
<div class="col12">
<?php if($module::$pictures): ?>
<?php echo template::table([1, 4, 1, 5, 1], $module::$pictures, ['#','Image', 'Couverture','Légende',''],['id' => 'galleryTable'], $module::$picturesId ); ?>
<?php if(gallery::$pictures): ?>
<?php echo template::table([1, 4, 1, 5, 1], gallery::$pictures, ['#','Image', 'Couverture','Légende',''],['id' => 'galleryTable'], gallery::$picturesId ); ?>
<?php echo template::hidden('galleryEditFormResponse'); ?>
<?php echo template::hidden('galleryEditSort',['value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'sort' ])]);?>
<?php echo template::hidden('galleryEditFormGalleryName',['value' => $this->getUrl(2)]); ?>
@ -30,6 +30,6 @@
</div>
<?php echo template::formClose(); ?>
<div class="moduleVersion">Version
<?php echo $module::VERSION; ?>
<?php echo gallery::VERSION; ?>
</div>

View File

@ -1,4 +1,4 @@
<div class="row <?php echo $module::$config['backAlign'] . ' ' . $module::$config['backPositionTop'];?>">
<div class="row <?php echo gallery::$config['backAlign'] . ' ' . gallery::$config['backPositionTop'];?>">
<div class="col1">
<?php echo template::button('galleryGalleryBack', [
'href' => helper::baseUrl() . $this->getUrl(0),
@ -6,14 +6,14 @@
]); ?>
</div>
</div>
<div id="pictureContainer" class="row galleryRow <?php echo ($module::$config['fullScreen']);?> ">
<?php foreach($module::$pictures as $picture => $legend): ?>
<div id="pictureContainer" class="row galleryRow <?php echo (gallery::$config['fullScreen']);?> ">
<?php foreach(gallery::$pictures as $picture => $legend): ?>
<div class="colPicture">
<a
href="<?php echo helper::baseUrl(false) . $picture; ?>"
<?php if ( strpos($picture, $module::$config['homePicture']) > 1) { echo 'id="homePicture"'; } ?>
<?php if ( strpos($picture, gallery::$config['homePicture']) > 1) { echo 'id="homePicture"'; } ?>
class="galleryGalleryPicture"
style="background-image:url('<?php echo helper::baseUrl(false) . $module::$thumbs[$picture]; ?>')"
style="background-image:url('<?php echo helper::baseUrl(false) . gallery::$thumbs[$picture]; ?>')"
data-caption="<?php echo $legend; ?>"
>
<?php if($legend): ?>
@ -23,7 +23,7 @@
</div>
<?php endforeach; ?>
</div>
<div class="row <?php echo $module::$config['backAlign'] . ' ' . $module::$config['backPositionBottom'];?>">
<div class="row <?php echo gallery::$config['backAlign'] . ' ' . gallery::$config['backPositionBottom'];?>">
<div class="col1">
<?php echo template::button('galleryGalleryBack', [
'href' => helper::baseUrl() . $this->getUrl(0),

View File

@ -1,11 +1,11 @@
<?php if($module::$galleries): ?>
<?php if(gallery::$galleries): ?>
<div class="row galleryRow">
<?php foreach($module::$galleries as $galleryId => $gallery): ?>
<?php foreach(gallery::$galleries as $galleryId => $gallery): ?>
<div class="colPicture" div="pos<?php echo $gallery['config']['position']; ?>" >
<a
href="<?php echo helper::baseUrl() . $this->getUrl(0); ?>/<?php echo $galleryId; ?>"
class="galleryPicture"
style="background-image:url('<?php echo $module::$firstPictures[$galleryId];?>')"
style="background-image:url('<?php echo gallery::$firstPictures[$galleryId];?>')"
>
<div class="galleryName"><?php echo $gallery['config']['name']; ?></div>
</a>

View File

@ -11,7 +11,7 @@
<?php echo template::submit('galleriesOptionSubmit'); ?>
</div>
</div>
<?php if($module::$formOptionSelect === 'galleries'): ?>
<?php if(gallery::$formOptionSelect === 'galleries'): ?>
<div class="row">
<div class="col12">
<div class="block">
@ -29,7 +29,7 @@
</div>
<div class="row" id="containerBackOptions">
<div class="col6">
<?php echo template::select('galleryOptionBackPosition', $module::$galleryOptionBackPosition, [
<?php echo template::select('galleryOptionBackPosition', gallery::$galleryOptionBackPosition, [
'label' => 'Position du bouton de retour à l\'index des galeries',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'showUniqueGallery']) === true
? 'none'
@ -40,7 +40,7 @@
]); ?>
</div>
<div class="col6">
<?php echo template::select('galleryOptionBackAlign', $module::$galleryOptionBackAlign, [
<?php echo template::select('galleryOptionBackAlign', gallery::$galleryOptionBackAlign, [
'label' => 'Alignement du bouton de retour',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'showUniqueGallery']) === true
? 'none'
@ -54,7 +54,7 @@
</div>
</div>
</div>
<?php elseif($module::$formOptionSelect === 'gallery'): ?>
<?php elseif(gallery::$formOptionSelect === 'gallery'): ?>
<div class="row">
<div class="col12">
<div class="block">
@ -81,7 +81,7 @@
</div>
<div class="row">
<div class="col3">
<?php echo template::select('galleryEditSort', $module::$sort, [
<?php echo template::select('galleryEditSort', gallery::$sort, [
'selected' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(3), 'config', 'sort']),
'label' => 'Tri des images',
'help' => 'Tri manuel : déplacez le images dans le tableau ci-dessous. L\'ordre est sauvegardé automatiquement.'
@ -114,7 +114,7 @@
<div class="row">
<div class="col12">
<div class="moduleVersion">Version
<?php echo $module::VERSION; ?>
<?php echo gallery::VERSION; ?>
</div>
</div>
</div>

View File

@ -17,25 +17,25 @@
<h4><?php echo helper::translate('Vignettes');?></h4>
<div class="row">
<div class="col3">
<?php echo template::select('galleryThemeThumbWidth', $module::$galleryThemeSizeWidth, [
<?php echo template::select('galleryThemeThumbWidth', gallery::$galleryThemeSizeWidth, [
'label' => 'Largeur',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbWidth'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('galleryThemeThumbHeight', $module::$galleryThemeSizeHeight, [
<?php echo template::select('galleryThemeThumbHeight', gallery::$galleryThemeSizeHeight, [
'label' => 'Hauteur',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbHeight'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('galleryThemeThumbAlign', $module::$galleryThemeFlexAlign, [
<?php echo template::select('galleryThemeThumbAlign', gallery::$galleryThemeFlexAlign, [
'label' => 'Alignement',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbAlign'])
]); ?>
</div>
<div class="col2">
<?php echo template::select('galleryThemeThumbMargin', $module::$galleryThemeMargin, [
<?php echo template::select('galleryThemeThumbMargin', gallery::$galleryThemeMargin, [
'label' => 'Marge',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbMargin'])
]); ?>
@ -43,7 +43,7 @@
</div>
<div class="row">
<div class="col4">
<?php echo template::select('galleryThemeThumbBorder', $module::$galleryThemeBorder, [
<?php echo template::select('galleryThemeThumbBorder', gallery::$galleryThemeBorder, [
'label' => 'Bordure',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbBorder'])
]); ?>
@ -57,7 +57,7 @@
]); ?>
</div>
<div class="col4">
<?php echo template::select('galleryThemeThumbRadius', $module::$galleryThemeRadius, [
<?php echo template::select('galleryThemeThumbRadius', gallery::$galleryThemeRadius, [
'label' => 'Arrondi des angles',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbRadius'])
]); ?>
@ -65,7 +65,7 @@
</div>
<div class="row">
<div class="col4">
<?php echo template::select('galleryThemeThumbShadows', $module::$galleryThemeShadows, [
<?php echo template::select('galleryThemeThumbShadows', gallery::$galleryThemeShadows, [
'label' => 'Ombre',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbShadows'])
]); ?>
@ -79,7 +79,7 @@
]); ?>
</div>
<div class="col4">
<?php echo template::select('galleryThemeThumbOpacity', $module::$galleryThemeOpacity, [
<?php echo template::select('galleryThemeThumbOpacity', gallery::$galleryThemeOpacity, [
'label' => 'Opacité au survol',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','thumbOpacity'])
]); ?>
@ -110,13 +110,13 @@
]); ?>
</div>
<div class="col3">
<?php echo template::select('galleryThemeLegendHeight', $module::$galleryThemeLegendHeight, [
<?php echo template::select('galleryThemeLegendHeight', gallery::$galleryThemeLegendHeight, [
'label' => 'Hauteur',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','legendHeight'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('galleryThemeLegendAlign', $module::$galleryThemeAlign, [
<?php echo template::select('galleryThemeLegendAlign', gallery::$galleryThemeAlign, [
'label' => 'Alignement',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme','legendAlign'])
]); ?>
@ -128,7 +128,7 @@
<div class="row">
<div class="col12">
<div class="moduleVersion">Version
<?php echo $module::VERSION; ?>
<?php echo gallery::VERSION; ?>
</div>
</div>
</div>

View File

@ -1,5 +1,7 @@
# Versions 6.0
- Ajoute deux nouvelles options pour afficher ou masquer la date et l'heure de l'article.
# Version 6.1
- Remplacement du nom générique de classe dans les vues.
# Version 6.0
- Ajoute trois nouvelles options pour afficher ou masquer la signature, la date et l'heure de l'article.
- Corrige un mauvais format de la propriété buttonBack non stockée au type booléen.
# Versions 5.9
- Largeur d'un bouton de retour.

View File

@ -16,7 +16,7 @@
class news extends common
{
const VERSION = '6.0';
const VERSION = '6.1';
const REALNAME = 'News';
const DATADIRECTORY = self::DATA_DIR . 'news/';
@ -316,6 +316,7 @@ class news extends common
'buttonBack' => $this->getInput('newsOptionButtonBack', helper::FILTER_BOOLEAN),
'showDate' => $this->getInput('newsOptionShowDate', helper::FILTER_BOOLEAN),
'showTime' => $this->getInput('newsOptionShowTime', helper::FILTER_BOOLEAN),
'showPseudo' => $this->getInput('newsOptionShowPseudo', helper::FILTER_BOOLEAN),
'versionData' => $this->getData(['module', $this->getUrl(0), 'config', 'versionData']),
]
]);
@ -621,6 +622,7 @@ class news extends common
$this->setData(['module', $this->getUrl(0), 'config', 'buttonBack', true]);
$this->setData(['module', $this->getUrl(0), 'config', 'showTime', true]);
$this->setData(['module', $this->getUrl(0), 'config', 'showDate', true]);
$this->setData(['module', $this->getUrl(0), 'config', 'showPseudo', true]);
// Mettre à jour la version
$this->setData(['module', $this->getUrl(0), 'config', 'versionData', '6.0']);
}

View File

@ -42,7 +42,7 @@
<h4><?php echo helper::translate('Options de publication');?></h4>
<div class="row">
<div class="col4">
<?php echo template::select('newsAddUserId', $module::$users, [
<?php echo template::select('newsAddUserId', news::$users, [
'label' => 'Auteur',
'selected' => $this->getUser('id')
]); ?>

View File

@ -13,8 +13,12 @@
</div>
<div class="col6 newsDate textAlignRight">
<!-- bloc signature -->
<?php echo template::ico('user'); ?>
<?php echo $module::$articleSignature; ?>
<?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'showPseudo']) === true
): ?>
<?php echo template::ico('user'); ?>
<?php echo $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'userId'])); ?>
<?php endif; ?>
<!-- bloc date -->
<?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
@ -23,7 +27,7 @@
<?php echo template::ico('calendar-empty', ['margin' => 'left']); ?>
<?php endif; ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true): ?>
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
<?php echo helper::dateUTF8(news::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
<?php endif; ?>
<?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
@ -32,8 +36,8 @@
<?php echo '&nbsp;-&nbsp;'; ?>
<?php endif; ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showTime']) === true): ?>
<?php echo helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
<?php endif; ?> <!-- Bloc edition -->
<?php echo helper::dateUTF8(news::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
<?php endif; ?> <!-- Bloc edition -->
<?php if (
$this->isConnected() === true
and
@ -51,7 +55,7 @@
<div id="rssFeed">
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?>"
target="_blank">
<img src='module/news/ressource/feed-icon-16.gif' />
&nbsp;<img src='module/news/ressource/feed-icon-16.gif' />
<?php
echo '<p>' . $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) . '</p>';
?>

View File

@ -24,13 +24,13 @@
</div>
</div>
<?php if($module::$news): ?>
<?php echo template::table([4, 2, 2, 2, 1, 1], $module::$news, ['Titre', 'Publication', 'Fin de publication', 'État', '', '']); ?>
<?php echo $module::$pages; ?>
<?php if(news::$news): ?>
<?php echo template::table([4, 2, 2, 2, 1, 1], news::$news, ['Titre', 'Publication', 'Fin de publication', 'État', '', '']); ?>
<?php echo news::$pages; ?>
<?php else: ?>
<?php echo template::speech('Aucun article'); ?>
<?php endif; ?>
<?php echo template::formClose(); ?>
<div class="moduleVersion">Version
<?php echo $module::VERSION; ?>
<?php echo news::VERSION; ?>
</div>

View File

@ -44,7 +44,7 @@
<h4><?php echo helper::translate('Options de publication');?></h4>
<div class="row">
<div class="col4">
<?php echo template::select('newsEditUserId', $module::$users, [
<?php echo template::select('newsEditUserId', news::$users, [
'label' => 'Auteur',
'selected' => $this->getUser('id')
]); ?>

View File

@ -1,4 +1,4 @@
<?php if ($module::$news): ?>
<?php if (news::$news): ?>
<link rel="stylesheet" type="text/css"
href="<?php echo helper::baseUrl(false) . $this->getData(['module', $this->getUrl(0), 'theme', 'style']); ?> " />
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'feeds'])): ?>
@ -14,16 +14,20 @@
<article>
<div class="row">
<?php foreach ($module::$news as $newsId => $news): ?>
<div class="col<?php echo $module::$nbrCol; ?>">
<?php foreach (news::$news as $newsId => $news): ?>
<div class="col<?php echo news::$nbrCol; ?>">
<div class="newsFrame">
<h2 class="newsTitle" id="<?php echo $newsId; ?>">
<?php echo '<a href="' . helper::baseUrl(true) . $this->getUrl(0) . '/' . $newsId . '">' . $news['title'] . '</a>'; ?>
</h2>
<div class="newsSignature">
<!-- bloc signature -->
<?php echo template::ico('user'); ?>
<?php echo $news['userId']; ?>
<?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'showPseudo']) === true
): ?>
<?php echo template::ico('user'); ?>
<?php echo $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $newsId, 'userId'])); ?>
<?php endif; ?>
<!-- bloc Date -->
<?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
@ -32,7 +36,7 @@
<?php echo template::ico('calendar-empty', ['margin' => 'left']); ?>
<?php endif; ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true): ?>
<?php echo helper::dateUTF8($module::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
<?php echo helper::dateUTF8(news::$dateFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsId, 'publishedOn']), self::$i18nUI); ?>
<?php endif; ?>
<?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'showDate']) === true
@ -41,7 +45,7 @@
<?php echo '&nbsp;-&nbsp;'; ?>
<?php endif; ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'showTime']) === true): ?>
<?php echo helper::dateUTF8($module::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']), self::$i18nUI); ?>
<?php echo helper::dateUTF8(news::$timeFormat, $this->getData(['module', $this->getUrl(0), 'posts', $newsId, 'publishedOn']), self::$i18nUI); ?>
<?php endif; ?>
<!-- Bloc edition -->
<?php if (
@ -70,7 +74,7 @@
<?php endforeach; ?>
</div>
</article>
<?php echo $module::$pages; ?>
<?php echo news::$pages; ?>
<?php else: ?>
<?php echo template::speech('Aucune news'); ?>
<?php endif; ?>

View File

@ -15,6 +15,18 @@
<div class="col12">
<div class="block">
<h4><?php echo helper::translate('Paramètres'); ?></h4>
<div class="row">
<div class="col6">
<?php echo template::checkbox('newsOptionButtonBack', true, 'Bouton de retour', [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'buttonBack'])
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('newsOptionShowPseudo', true, 'Signature', [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'showPseudo'])
]); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::checkbox('newsOptionShowDate', true, 'Afficher la date', [
@ -22,7 +34,7 @@
]); ?>
</div>
<div class="col3">
<?php echo template::select('newsOptionDateFormat', $module::$dateFormats, [
<?php echo template::select('newsOptionDateFormat', news::$dateFormats, [
'label' => 'Format des dates',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'dateFormat'])
]); ?>
@ -33,7 +45,7 @@
]); ?>
</div>
<div class="col3 timeWrapper">
<?php echo template::select('newsOptionTimeFormat', $module::$timeFormats, [
<?php echo template::select('newsOptionTimeFormat', news::$timeFormats, [
'label' => 'Format des heures',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'timeFormat'])
]); ?>
@ -41,31 +53,26 @@
</div>
<div class="row">
<div class="col4">
<?php echo template::select('newsOptionItemsperCol', $module::$columns, [
<?php echo template::select('newsOptionItemsperCol', news::$columns, [
'label' => 'Nombre de colonnes',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'itemsperCol'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('newsOptionItemsperPage', $module::$itemsList, [
<?php echo template::select('newsOptionItemsperPage', news::$itemsList, [
'label' => 'Articles par page',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'itemsperPage'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('newsOptionHeight', $module::$height, [
<?php echo template::select('newsOptionHeight', news::$height, [
'label' => 'Abrégé de l\'article',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'height'])
]); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::checkbox('newsOptionButtonBack', true, 'Bouton de retour', [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'buttonBack'])
]); ?>
</div>
<div class="col3">
<div class="col6">
<?php echo template::checkbox('newsOptionShowFeeds', true, 'Lien du flux RSS', [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'feeds']),
'help' => 'Flux limité aux articles de la première page.'
@ -87,13 +94,13 @@
<h4><?php echo helper::translate('Thème'); ?></h4>
<div class="row">
<div class="col3">
<?php echo template::select('newsThemeBorderStyle', $module::$borderStyle, [
<?php echo template::select('newsThemeBorderStyle', news::$borderStyle, [
'label' => 'Bordure',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme', 'borderStyle'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('newsThemeBorderWidth', $module::$borderWidth, [
<?php echo template::select('newsThemeBorderWidth', news::$borderWidth, [
'label' => 'Épaisseur',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme', 'borderWidth'])
]); ?>
@ -120,5 +127,5 @@
</div>
<?php echo template::formClose(); ?>
<div class="moduleVersion">Version
<?php echo $module::VERSION; ?>
<?php echo news::VERSION; ?>
</div>

View File

@ -1,5 +1,5 @@
# Version 3.3
- Une seule lecture du fichier module.json
- Remplacement du nom générique de classe dans les vues.
# Version 3.2
- Contrôle de la variable de session liée au contenu. Evite des erreurs lorsque plusieurs onglets sont ouverts.
# Version 3.1

View File

@ -172,43 +172,40 @@ class search extends common
public function index()
{
// Initialise un module non configuré
$this->init();
if ($this->isPost()) {
if (
$this->isPost()
) {
//Initialisations variables
$success = true;
$result = [];
$notification = '';
$total = '';
// Récupération du mot clef passé par le formulaire de ...view/index.php, avec caractères accentués
self::$motclef = $this->getInput('searchMotphraseclef');
// Variable de travail, on conserve la variable globale pour l'affichage du résultat
$motclef = self::$motclef;
// Suppression des mots < 3 caractères et des articles > 2 caractères de la chaîne $motclef
// Suppression des mots < 3 caractères et des articles > 2 caractères de la chaîne $motclef
$arraymotclef = explode(' ', $motclef);
$motclef = '';
foreach ($arraymotclef as $key => $value) {
if (strlen($value) > 2 && $value !== 'les' && $value !== 'des' && $value !== 'une' && $value !== 'aux') {
if (strlen($value) > 2 && $value !== 'les' && $value !== 'des' && $value !== 'une' && $value !== 'aux')
$motclef .= $value . ' ';
}
}
// Suppression du dernier ' '
if ($motclef !== '') {
if ($motclef !== '')
$motclef = substr($motclef, 0, strlen($motclef) - 1);
}
// Récupération de l'état de l'option mot entier passé par le même formulaire
self::$motentier = $this->getInput('searchMotentier', helper::FILTER_BOOLEAN);
// Lecture unique des données du module
$moduleData = $this->getData(['module']);
if ($motclef !== '') {
foreach ($this->getHierarchy(null, false, null) as $parentId => $childIds) {
// Vérification des conditions pour la page parente
if (
$this->getData(['page', $parentId, 'disable']) === false &&
$this->getUser('group') >= $this->getData(['page', $parentId, 'group']) &&
@ -216,6 +213,7 @@ class search extends common
) {
$url = $parentId;
$titre = $this->getData(['page', $parentId, 'title']);
//$content = file_get_contents(self::DATA_DIR . self::$siteContent . '/content/' . $this->getData(['page', $parentId, 'content']));
$content = $this->getPage($parentId, self::$siteContent);
$content = $titre . ' ' . $content;
// Pages sauf pages filles et articles de blog
@ -224,9 +222,9 @@ class search extends common
$result[] = $tempData;
}
}
// Vérification des sous-pages et articles de sous-pages
foreach ($childIds as $childId) {
// Sous page
if (
$this->getData(['page', $childId, 'disable']) === false &&
$this->getUser('group') >= $this->getData(['page', $parentId, 'group']) &&
@ -234,21 +232,24 @@ class search extends common
) {
$url = $childId;
$titre = $this->getData(['page', $childId, 'title']);
//$content = file_get_contents(self::DATA_DIR . self::$siteContent . '/content/' . $this->getData(['page', $childId, 'content']));
$content = $this->getPage($childId, self::$siteContent);
$content = $titre . ' ' . $content;
//Pages filles
$tempData = $this->occurrence($url, $titre, $content, $motclef, self::$motentier);
if (is_array($tempData)) {
$result[] = $tempData;
}
}
// Articles d'une sous-page blog ou de news
if (isset($moduleData[$childId]['posts'])) {
foreach ($moduleData[$childId]['posts'] as $articleId => $article) {
if ($article['state'] === true) {
if ($this->getData(['module', $childId, 'posts'])) {
foreach ($this->getData(['module', $childId, 'posts']) as $articleId => $article) {
if ($this->getData(['module', $childId, 'posts', $articleId, 'state']) === true) {
$url = $childId . '/' . $articleId;
$titre = $article['title'];
$contenu = ' ' . $titre . ' ' . $article['content'];
// Articles de sous-page de type blog
$tempData = $this->occurrence($url, $titre, $contenu, $motclef, self::$motentier);
if (is_array($tempData)) {
$result[] = $tempData;
@ -257,11 +258,12 @@ class search extends common
}
}
}
// Articles d'un blog ou de news
if (isset($moduleData[$parentId]['posts'])) {
foreach ($moduleData[$parentId]['posts'] as $articleId => $article) {
if ($article['state'] === true) {
if ($this->getData(['module', $parentId, 'posts'])) {
foreach ($this->getData(['module', $parentId, 'posts']) as $articleId => $article) {
if ($this->getData(['module', $parentId, 'posts', $articleId, 'state']) === true) {
$url = $parentId . '/' . $articleId;
$titre = $article['title'];
$contenu = ' ' . $titre . ' ' . $article['content'];
@ -273,21 +275,22 @@ class search extends common
}
}
}
// Message de synthèse de la recherche
if (count($result) === 0) {
self::$resultTitle = helper::translate('Aucun résultat');
self::$resultError = helper::translate('Avez-vous pensé aux accents ?');
} else {
self::$resultError = '';
//self::$resultTitle = sprintf(' %s',helper::translate('Résultat de votre recherche'));
rsort($result);
foreach ($result as $key => $value) {
$r[] = $value['preview'];
}
// Générer une chaine de caractères
self::$resultList = implode("", $r);
}
}
// Valeurs en sortie, affichage du résultat
$this->addOutput([
'view' => 'index',
@ -306,8 +309,6 @@ class search extends common
]);
}
}
// Fonction de recherche des occurrences dans $contenu

View File

@ -23,7 +23,7 @@
]); ?>
</div>
<div class="col6">
<?php echo template::select('searchPreviewLength', $module::$previewLength, [
<?php echo template::select('searchPreviewLength', search::$previewLength, [
'label' => 'Dimension de l\'aperçu',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'previewLength'])
]); ?>
@ -66,5 +66,5 @@
</div>
<?php echo template::formClose(); ?>
<div class="moduleVersion">Version
<?php echo $module::VERSION; ?>
<?php echo search::VERSION; ?>
</div>

View File

@ -5,7 +5,7 @@
<div class="col9 verticalAlignMiddle">
<?php echo template::text('searchMotphraseclef', [
'placeholder' => $this->getData(['module', $this->getUrl(0), 'config', 'placeHolder']) ? $this->getData(['module', $this->getUrl(0), 'config', 'placeHolder']) : 'Un ou plusieurs mots clef séparés par un espace',
'value' => $module::$motclef
'value' => search::$motclef
]); ?>
</div>
<?php $col = empty($this->getData(['module', $this->getUrl(0), 'config', 'submitText'])) ? 'col1' : 'col3'; ?>
@ -19,7 +19,7 @@
<div class="row">
<div class="col12">
<?php echo template::checkbox('searchMotentier', true, 'Mots approchants', [
'checked' => $module::$motentier,
'checked' => search::$motentier,
]); ?>
</div>
</div>
@ -27,14 +27,14 @@
</div>
<div class="row">
<div class="col12">
<?php if ($module::$resultTitle)
echo $module::$resultTitle;
<?php if (search::$resultTitle)
echo search::$resultTitle;
?>
<?php if ($module::$resultList)
echo '<p>' . $module::$resultList . '</p>';
<?php if (search::$resultList)
echo '<p>' . search::$resultList . '</p>';
?>
<?php if ($module::$resultError)
echo '<p>' . $module::$resultError . '</p>';
<?php if (search::$resultError)
echo '<p>' . search::$resultError . '</p>';
?>
</div>
</div>

View File

@ -1,5 +1,9 @@
# Version 7.3
- Remplacement du nom générique de classe dans les vues.
# Version 7.2
- Le dossier sélectionné est affiché par défaut dans la page update.
# Version 7.1
- Améliore le desgin du module
# Version 7.0
- Ajoute un affichage de la légende sous l'image
- Corrige un tri inversé

View File

@ -27,7 +27,7 @@ class slider extends common
'index' => self::GROUP_VISITOR
];
const VERSION = '7.1';
const VERSION = '7.3';
const REALNAME = 'Carrousel';
const DELETE = true;
const UPDATE = '0.0';

View File

@ -38,8 +38,8 @@
</div>
<div class="row">
<div class="col12">
<?php if ($module::$pictures): ?>
<?php echo template::table([3, 4, 4, 1], $module::$pictures, ['Image', 'Texte alternatif', 'Hyperlien vers une page', '']); ?>
<?php if (slider::$pictures): ?>
<?php echo template::table([3, 4, 4, 1], slider::$pictures, ['Image', 'Texte alternatif', 'Hyperlien vers une page', '']); ?>
<?php else: ?>
<?php echo template::speech('Aucune image dans ce dossier'); ?>
<?php endif; ?>
@ -50,5 +50,5 @@
</div>
<?php echo template::formClose(); ?>
<div class="moduleVersion">Module Slider version
<?php echo $module::VERSION; ?>
<?php echo slider::VERSION; ?>
</div>

View File

@ -1,8 +1,8 @@
<?php if ($module::$pictures): ?>
<?php if (slider::$pictures): ?>
<div id="wrapper">
<div class="rslides_container">
<ul class="rslides" id="sliders">
<?php foreach ($module::$pictures as $picture => $options): ?>
<?php foreach (slider::$pictures as $picture => $options): ?>
<?php if (!empty($options['uri'])): ?>
<a href="<?php echo helper::baseUrl() . $options['uri']; ?>">
<?php endif; ?>

View File

@ -17,25 +17,25 @@
<h4>Paramètres</h4>
<div class="row">
<div class="col3">
<?php echo template::select('sliderThememaxWidth', $module::$screenWidth, [
<?php echo template::select('sliderThememaxWidth', slider::$screenWidth, [
'label' => 'Largeur',
'selected' => $module::$selectedMaxwidth,
'selected' => slider::$selectedMaxwidth,
]); ?>
</div>
<div class="col3">
<?php echo template::select('sliderThemeAuto', $module::$auto, [
<?php echo template::select('sliderThemeAuto', slider::$auto, [
'label' => 'Automatisation',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme', 'auto']),
]); ?>
</div>
<div class="col3">
<?php echo template::select('sliderThemeDiapoTime', $module::$timeout, [
<?php echo template::select('sliderThemeDiapoTime', slider::$timeout, [
'label' => 'Image fixe',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme', 'timeout'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('sliderThemespeed', $module::$speed, [
<?php echo template::select('sliderThemespeed', slider::$speed, [
'label' => 'Transition ',
'help' => 'Cette durée doit être inférieure au temps fixe',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme', 'speed'])
@ -54,25 +54,25 @@
<h4>Navigation</h4>
<div class="row">
<div class="col3">
<?php echo template::select('sliderThemeSort', $module::$sort, [
<?php echo template::select('sliderThemeSort', slider::$sort, [
'label' => 'Tri des images',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme', 'sort'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('sliderThemePager', $module::$pager, [
<?php echo template::select('sliderThemePager', slider::$pager, [
'label' => 'Puces horizontales',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme', 'pager']),
]); ?>
</div>
<div class="col3">
<?php echo template::select('sliderThemeNameSpace', $module::$namespace, [
<?php echo template::select('sliderThemeNameSpace', slider::$namespace, [
'label' => 'Boutons latéraux',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme', 'namespace'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('sliderThemeCaption', $module::$caption, [
<?php echo template::select('sliderThemeCaption', slider::$caption, [
'label' => 'Légendes',
'selected' => $this->getData(['module', $this->getUrl(0), 'theme', 'caption'])
]); ?>

View File

@ -1,36 +1,36 @@
<?php echo template::formOpen('galleryUpdateForm'); ?>
<div class="row">
<div class="col1">
<?php echo template::button('galleryUpdateBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
'value' => template::ico('left')
]); ?>
</div>
<div class="col2 offset9">
<?php echo template::submit('galleryUpdateSubmit'); ?>
</div>
<div class="row">
<div class="col1">
<?php echo template::button('galleryUpdateBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
'value' => template::ico('left')
]); ?>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Dossier de la galerie</h4>
<div class="row">
<div class="col12">
<?php echo template::hidden('galleryUpdateDirectoryOld', [
'noDirty' => true, // Désactivé à cause des modifications en ajax
]); ?>
<?php echo template::select('galleryUpdateDirectory', [], [
'label' => 'Dossier cible',
'noDirty' => true, // Désactivé à cause des modifications en ajax,
]); ?>
</div>
<div class="col2 offset9">
<?php echo template::submit('galleryUpdateSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Dossier de la galerie</h4>
<div class="row">
<div class="col12">
<?php echo template::hidden('galleryUpdateDirectoryOld', [
'noDirty' => true, // Désactivé à cause des modifications en ajax
'value' => $this->getData(['module', $this->getUrl(0), 'directory']),
]); ?>
<?php echo template::select('galleryUpdateDirectory', [], [
'label' => 'Dossier cible',
'noDirty' => true, // Désactivé à cause des modifications en ajax,
]); ?>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>
<div class="moduleVersion">Module Slider version
<?php echo $module::VERSION; ?>
<?php echo slider::VERSION; ?>
</div>

View File

@ -1,11 +1,17 @@
# Version 2.4
- L'approbation par un administrateur initialise le pseudo avec l'id de l'utilisateur.
# Version 2.3
- Warning lors de la saisie d'un email vide
# Version 2.2
- Ajoute la gestion des profils
# Version 2.1
- N'envoie pas d'email lorsque le domaine est invalide.
- Corrige la validation de domaines multiples séparés par des points virgules.
# Version 2.0
# Version 2.7
- Remplacement du nom générique de classe dans les vues.
# Version 2.6
- Corrige d'un bug empêchat de terminer la procédure d'inscription après approbation.
# Version 2.5
- Reformatage du formulaire d'approbation pour mettre en avant les actions à réaliser par l'administrateur.
# Version 2.4
- L'approbation par un administrateur initialise le pseudo avec l'id de l'utilisateur.
# Version 2.3
- Warning lors de la saisie d'un email vide
# Version 2.2
- Ajoute la gestion des profils
# Version 2.1
- N'envoie pas d'email lorsque le domaine est invalide.
- Corrige la validation de domaines multiples séparés par des points virgules.
# Version 2.0
- trop de corrections.

View File

@ -1 +1 @@
{"name":"suscribe","realName":"Auto Inscription","version":"2.4","update":"0.0","delete":true,"dataDirectory":""}
{"name":"suscribe","realName":"Auto Inscription","version":"2.6","update":"0.0","delete":true,"dataDirectory":""}

View File

@ -0,0 +1,30 @@
{
"Inscription en attente": "",
"Édition de l'utilisateur": "",
"Suppression de l'utilisateur": "",
"2 minutes": "",
"5 minutes": "",
"10 minutes": "",
"Email non confirmé": "",
"Email valide": "",
"Email valide, en attente de confirmation": "",
"Email valide, compte activé": "",
"Un élément par ligne": "",
"Deux éléments par ligne": "",
"Quatre éléments par ligne": "",
"En attente d'approbation": "",
"Inscription supprimée": "",
"Ce domaine n'est pas autorisé": "",
"Identifiant invalide": "",
"Vous ne pouvez pas utilisez cet email": "",
"Un mail vous a été envoyé pour confirmer votre inscription": "",
"Quelque chose n'a pas fonctionné !": "",
"Inscription": "",
"Bienvenue sur le site": "",
"La validité du lien est dépassée !": "",
"Les données saisies sont incorrectes !": "",
"Les mots de passe ne sont pas identiques !": "",
"Votre inscription est confirmée !": "",
"L'inscription doit être approuvée par un administrateur": "",
"Saisie du mot de passe": ""
}

View File

@ -1,9 +1,9 @@
<?php $moduleData['suscribe'] = [
'edit' => $this->getInput('profilAddSuscribeEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilAddSuscribeDelete', helper::FILTER_BOOLEAN),
'user' => $this->getInput('profilAddSuscribeUser', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilAddSuscribeAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddSuscribeEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddSuscribeDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddSuscribeUser', helper::FILTER_BOOLEAN)
<?php $moduleData['suscribe'] = [
'edit' => $this->getInput('profilAddSuscribeEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilAddSuscribeDelete', helper::FILTER_BOOLEAN),
'user' => $this->getInput('profilAddSuscribeUser', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilAddSuscribeAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddSuscribeEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddSuscribeDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddSuscribeUser', helper::FILTER_BOOLEAN)
];

View File

@ -1,9 +1,9 @@
<?php $moduleData['suscribe'] = [
'edit' => $this->getInput('profilEditSuscribeEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilEditSuscribeDelete', helper::FILTER_BOOLEAN),
'user' => $this->getInput('profilEditSuscribeUser', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilEditSuscribeAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditSuscribeEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditSuscribeDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditSuscribeUser', helper::FILTER_BOOLEAN)
<?php $moduleData['suscribe'] = [
'edit' => $this->getInput('profilEditSuscribeEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilEditSuscribeDelete', helper::FILTER_BOOLEAN),
'user' => $this->getInput('profilEditSuscribeUser', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilEditSuscribeAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditSuscribeEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditSuscribeDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditSuscribeUser', helper::FILTER_BOOLEAN)
];

View File

@ -1,20 +1,20 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo sprintf('%s %s', helper::translate('Permissions'), helper::translate('Auto-inscription')); ?>
</h4>
<div class="row">
<div class="col3">
<?php echo template::checkbox('profilAddSuscribeEdit', true, 'Éditer inscription'); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilAddSuscribeDelete', true, 'Effacer inscription'); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilAddSuscribeUser', true, 'Valider inscriptions'); ?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo sprintf('%s %s', helper::translate('Permissions'), helper::translate('Auto-inscription')); ?>
</h4>
<div class="row">
<div class="col3">
<?php echo template::checkbox('profilAddSuscribeEdit', true, 'Éditer inscription'); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilAddSuscribeDelete', true, 'Effacer inscription'); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilAddSuscribeUser', true, 'Valider inscriptions'); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,26 +1,26 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo sprintf('%s %s', helper::translate('Permissions'), helper::translate('Auto-inscription')); ?>·
</h4>
<div class="row">
<div class="col3">
<?php echo template::checkbox('profilEditSuscribeEdit', true, 'Éditer inscription', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'suscribe', 'edit'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditSuscribeDelete', true, 'Effacer inscription', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'suscribe', 'delete'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditSuscribeUser', true, 'Valider inscriptions', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'suscribe', 'user'])
]); ?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo sprintf('%s %s', helper::translate('Permissions'), helper::translate('Auto-inscription')); ?>·
</h4>
<div class="row">
<div class="col3">
<?php echo template::checkbox('profilEditSuscribeEdit', true, 'Éditer inscription', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'suscribe', 'edit'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditSuscribeDelete', true, 'Effacer inscription', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'suscribe', 'delete'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditSuscribeUser', true, 'Valider inscriptions', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'suscribe', 'user'])
]); ?>
</div>
</div>
</div>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +1,21 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.com/
*/
/** NE PAS EFFACER
* admin.css
*/
textarea .editorWysiwyg {
height : 100px;
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.com/
*/
/** NE PAS EFFACER
* admin.css
*/
textarea .editorWysiwyg {
height : 100px;
}

View File

@ -1,103 +1,103 @@
<?php echo template::formOpen('registrationConfig'); ?>
<div class="row">
<div class="col1">
<?php echo template::button('registrationConfigBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0) . '/' . self::$siteContent,
'value' => template::ico('left')
]); ?>
</div>
<div class="col2 offset7">
<?php echo template::button('registrationConfigBack', [
'href' => helper::baseUrl() . $this->getUrl(0) . '/users',
'value' => 'Inscriptions'
]); ?>
</div>
<div class="col2">
<?php echo template::submit('registrationConfigSubmit', [
'class' => 'green'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Paramètres</h4>
<div class="row">
<div class="col4">
<?php echo template::select('registrationConfigLayout', $module::$layout, [
'label' => 'Disposition',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'layout'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('registrationConfigSuccess', helper::arraycollumn($this->getData(['page']), 'title', 'SORT_ASC'), [
'label' => 'Redirection après confirmation',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'pageSuccess'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('registrationConfigError', helper::arraycollumn($this->getData(['page']), 'title', 'SORT_ASC'), [
'label' => 'Redirection après erreur',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'pageError'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Communication</h4>
<div class="row">
<div class="col6">
<?php echo template::select('registrationConfigTimeOut', $module::$timeLimit, [
'label' => 'Validité du lien',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'timeOut']) / 60
]); ?>
</div>
<div class="col6">
<?php echo template::text('registrationConfigFilter', [
'label' => 'Domaines acceptés',
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'filter']),
'help' => 'Champ vide sinon limitation à des domaines spécifiques, le séparateur est ;'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php $messageDefault = '<p>Confirmez votre inscription en cliquant sur ce lien dans les ... minutes.</p>'; ?>
<?php echo template::textarea('registrationconfigMailRegisterContent', [
'label' => 'Corps du mail de confirmation',
'value' => !empty($this->getData(['module', $this->getUrl(0), 'config', 'mailRegisterContent'])) ? $this->getData(['module', $this->getUrl(0), 'config', 'mailRegisterContent']) : $messageDefault,
'class' => 'editorWysiwyg',
'help' => 'Précisez la durée de validité. Le lien sera inséré après ces explications.'
]); ?>
</div>
</div>
<div class="row">
<div class="col6 verticalAlignMiddle">
<?php echo template::checkbox('registrationConfigState', true, 'Approbation préalable', [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'approval']),
'help' => 'Les comptes sont inactifs tant que les inscriptions ne sont pas approuvées par un administrateur.',
'check' => true
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php $messageDefault = '<p>Votre inscription a été approuvée par un administrateur.</p>'; ?>
<?php echo template::textarea('registrationconfigMailValidateContent', [
'label' => 'Corps du mail d\'approbation',
'value' => !empty($this->getData(['module', $this->getUrl(0), 'config', 'mailValidateContent'])) ? $this->getData(['module', $this->getUrl(0), 'config', 'mailValidateContent']) : $messageDefault,
'class' => 'editorWysiwyg'
]); ?>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>
<div class="moduleVersion">Version <?php echo $module::VERSION; ?>
<?php echo template::formOpen('registrationConfig'); ?>
<div class="row">
<div class="col1">
<?php echo template::button('registrationConfigBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0) . '/' . self::$siteContent,
'value' => template::ico('left')
]); ?>
</div>
<div class="col2 offset7">
<?php echo template::button('registrationConfigBack', [
'href' => helper::baseUrl() . $this->getUrl(0) . '/users',
'value' => 'Inscriptions'
]); ?>
</div>
<div class="col2">
<?php echo template::submit('registrationConfigSubmit', [
'class' => 'green'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Paramètres</h4>
<div class="row">
<div class="col4">
<?php echo template::select('registrationConfigLayout', suscribe::$layout, [
'label' => 'Disposition',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'layout'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('registrationConfigSuccess', helper::arraycollumn($this->getData(['page']), 'title', 'SORT_ASC'), [
'label' => 'Redirection après confirmation',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'pageSuccess'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('registrationConfigError', helper::arraycollumn($this->getData(['page']), 'title', 'SORT_ASC'), [
'label' => 'Redirection après erreur',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'pageError'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Communication</h4>
<div class="row">
<div class="col6">
<?php echo template::select('registrationConfigTimeOut', suscribe::$timeLimit, [
'label' => 'Validité du lien',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'timeOut']) / 60
]); ?>
</div>
<div class="col6">
<?php echo template::text('registrationConfigFilter', [
'label' => 'Domaines acceptés',
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'filter']),
'help' => 'Champ vide sinon limitation à des domaines spécifiques, le séparateur est ;'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php $messageDefault = '<p>Confirmez votre inscription en cliquant sur ce lien dans les ... minutes.</p>'; ?>
<?php echo template::textarea('registrationconfigMailRegisterContent', [
'label' => 'Corps du mail de confirmation',
'value' => !empty($this->getData(['module', $this->getUrl(0), 'config', 'mailRegisterContent'])) ? $this->getData(['module', $this->getUrl(0), 'config', 'mailRegisterContent']) : $messageDefault,
'class' => 'editorWysiwyg',
'help' => 'Précisez la durée de validité. Le lien sera inséré après ces explications.'
]); ?>
</div>
</div>
<div class="row">
<div class="col6 verticalAlignMiddle">
<?php echo template::checkbox('registrationConfigState', true, 'Approbation préalable', [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'approval']),
'help' => 'Les comptes sont inactifs tant que les inscriptions ne sont pas approuvées par un administrateur.',
'check' => true
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php $messageDefault = '<p>Votre inscription a été approuvée par un administrateur.</p>'; ?>
<?php echo template::textarea('registrationconfigMailValidateContent', [
'label' => 'Corps du mail d\'approbation',
'value' => !empty($this->getData(['module', $this->getUrl(0), 'config', 'mailValidateContent'])) ? $this->getData(['module', $this->getUrl(0), 'config', 'mailValidateContent']) : $messageDefault,
'class' => 'editorWysiwyg'
]); ?>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>
<div class="moduleVersion">Version <?php echo suscribe::VERSION; ?>
</div>

View File

@ -1,21 +1,21 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.com/
*/
/** NE PAS EFFACER
* admin.css
*/
#registrationUserEditProfil1Wrapper,
#registrationUserEditProfil2Wrapper {
padding: 0;
}
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.com/
*/
/** NE PAS EFFACER
* admin.css
*/
#registrationUserEditProfil1Wrapper,
#registrationUserEditProfil2Wrapper {
padding: 0;
}

View File

@ -1,31 +1,31 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.com/
*/
/**
* Droits des groupes
*/
$(document).ready(function () {
$(".registrationUserEditGroupProfil").hide();
$(".registrationUserCommentProfil").hide();
$("#registrationUserEditGroupProfil" + $("#registrationUserEditGroup").val()).show();
$("#registrationUserCommentProfil" + $("#registrationUserEditGroup").val()).show();
$("#registrationUserEditGroup").on("change", function () {
$(".registrationUserEditGroupProfil").hide();
$(".registrationUserCommentProfil").hide();
$("#registrationUserEditGroupProfil" + $(this).val()).show();
$("#registrationUserCommentProfil" + $(this).val()).show();
});
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.com/
*/
/**
* Droits des groupes
*/
$(document).ready(function () {
$(".registrationUserEditGroupProfil").hide();
$(".registrationUserCommentProfil").hide();
$("#registrationUserEditGroupProfil" + $("#registrationUserEditGroup").val()).show();
$("#registrationUserCommentProfil" + $("#registrationUserEditGroup").val()).show();
$("#registrationUserEditGroup").on("change", function () {
$(".registrationUserEditGroupProfil").hide();
$(".registrationUserCommentProfil").hide();
$("#registrationUserEditGroupProfil" + $(this).val()).show();
$("#registrationUserCommentProfil" + $(this).val()).show();
});
});

View File

@ -1,140 +1,148 @@
<?php echo template::formOpen('registrationUserEditForm'); ?>
<div class="row">
<div class="col1">
<?php echo template::button('registrationUserEditBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->geturl(0) . '/users',
'value' => template::ico('left')
]); ?>
</div>
<div class="col2 offset9">
<?php echo template::submit('registrationUserEditSubmit', [
'class' => 'green'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Confirmation de l'inscription</h4>
<div class="row">
<div class="col12">
<div class="row">
<div class="col6">
<?php echo template::text('registrationUserEditFirstname', [
'autocomplete' => 'off',
'label' => 'Prénom',
'value' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'firstname']),
'disabled' => true
]); ?>
</div>
<div class="col6">
<?php echo template::text('registrationUserEditLastname', [
'autocomplete' => 'off',
'label' => 'Nom',
'value' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'lastname']),
'disabled' => true
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::mail('registrationUserEditMail', [
'autocomplete' => 'off',
'label' => 'Adresse électronique',
'value' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'mail']),
'disabled' => true
]); ?>
</div>
</div>
<div class="row">
<div class="col8">
<?php echo template::text('registrationUserState', [
'label' => 'État de l\'inscription',
'value' => $module::$statusGroups[$this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'status'])],
'disabled' => true,
'help' => 'En attente : le mail n\'a pas encore été validé<br>Email validé : approbation nécessaire.'
]); ?>
</div>
<div class="col4">
<?php echo template::text('registrationUsertimer', [
'label' => 'Date de demande',
'value' => helper::dateUTF8(date('Y-m-d G:i'), $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'timer'])),
'disabled' => true
]); ?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::text('registrationUserLabel', [
'label' => 'Étiquette'
]); ?>
</div>
<div class="col4">
<?php if ($this->getUser('group') === self::GROUP_ADMIN): ?>
<?php echo template::select('registrationUserEditGroup', $module::$groups, [
'disabled' => ($this->getUrl(2) === $this->getUser('id')),
'help' => ($this->getUrl(2) === $this->getUser('id') ? 'Impossible de modifier votre propre groupe.' : ''),
'label' => 'Groupe',
'selected' => $this->getData(['module', $this->getUrl(0), 'registrationUsers', $this->getUrl(2), 'status'])
]); ?>
<?php endif; ?>
</div>
<div class="col4">
<div class="registrationUserEditGroupProfil"
id="registrationUserEditGroupProfil<?php echo self::GROUP_MEMBER; ?>">
<?php echo template::select('registrationUserEditProfil' . self::GROUP_MEMBER, $module::$userProfils[self::GROUP_MEMBER], [
'label' => 'Profil',
'selected' => $this->getData(['user', $this->getUrl(2), 'profil']),
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN,
]); ?>
</div>
<div class="registrationUserEditGroupProfil"
id="registrationUserEditGroupProfil<?php echo self::GROUP_EDITOR; ?>">
<?php echo template::select('registrationUserEditProfil' . self::GROUP_EDITOR, $module::$userProfils[self::GROUP_EDITOR], [
'label' => 'Profil',
'selected' => $this->getData(['user', $this->getUrl(2), 'profil']),
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN,
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div id="registrationUserCommentProfil<?php echo self::GROUP_MEMBER; ?>"
class="col12 registrationUserCommentProfil">
<?php echo template::textarea('registrationUserEditProfilComment' . self::GROUP_MEMBER, [
'label' => 'Commentaire',
'value' => implode("\n", $module::$userProfilsComments[self::GROUP_MEMBER]),
'readonly' => true,
]);
?>
</div>
<div id="registrationUserCommentProfil<?php echo self::GROUP_EDITOR; ?>"
class="col12 registrationUserCommentProfil">
<?php echo template::textarea('registrationUserEditProfilComment' . self::GROUP_EDITOR, [
'label' => 'Commentaire',
'value' => implode("\n", $module::$userProfilsComments[self::GROUP_EDITOR]),
'readonly' => true,
]);
?>
</div>
<div id="registrationUserCommentProfil<?php echo self::GROUP_ADMIN; ?>"
class="col12 registrationUserCommentProfil">
<?php echo template::textarea('registrationUserEditProfilComment' . self::GROUP_ADMIN, [
'label' => 'Commentaire',
'value' => implode("\n", $module::$userProfilsComments[self::GROUP_ADMIN]),
'readonly' => true,
]);
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formOpen('registrationUserEditForm'); ?>
<div class="row">
<div class="col1">
<?php echo template::button('registrationUserEditBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->geturl(0) . '/users',
'value' => template::ico('left')
]); ?>
</div>
<div class="col2 offset9">
<?php echo template::submit('registrationUserEditSubmit', [
'class' => 'green'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Approbation de l'inscription</h4>
<div class="row">
<div class="col4">
<?php echo template::text('registrationUserLabel', [
'label' => 'Étiquettes',
'help' => 'Les étiquettes sont séparées par des espaces',
]); ?>
</div>
<div class="col4">
<?php if ($this->getUser('group') === self::GROUP_ADMIN): ?>
<?php echo template::select('registrationUserEditGroup', suscribe::$groups, [
'disabled' => ($this->getUrl(2) === $this->getUser('id')),
'help' => ($this->getUrl(2) === $this->getUser('id') ? 'Impossible de modifier votre propre groupe.' : ''),
'label' => 'Groupe',
'selected' => $this->getData(['module', $this->getUrl(0), 'registrationUsers', $this->getUrl(2), 'status'])
]); ?>
<?php endif; ?>
</div>
<div class="col4">
<div class="registrationUserEditGroupProfil"
id="registrationUserEditGroupProfil<?php echo self::GROUP_MEMBER; ?>">
<?php echo template::select('registrationUserEditProfil' . self::GROUP_MEMBER, suscribe::$userProfils[self::GROUP_MEMBER], [
'label' => 'Profil',
'selected' => $this->getData(['user', $this->getUrl(2), 'profil']),
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN,
]); ?>
</div>
<div class="registrationUserEditGroupProfil"
id="registrationUserEditGroupProfil<?php echo self::GROUP_EDITOR; ?>">
<?php echo template::select('registrationUserEditProfil' . self::GROUP_EDITOR, suscribe::$userProfils[self::GROUP_EDITOR], [
'label' => 'Profil',
'selected' => $this->getData(['user', $this->getUrl(2), 'profil']),
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN,
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div id="registrationUserCommentProfil<?php echo self::GROUP_MEMBER; ?>"
class="col12 registrationUserCommentProfil">
<?php echo template::textarea('registrationUserEditProfilComment' . self::GROUP_MEMBER, [
'label' => 'Commentaire',
'value' => implode("\n", suscribe::$userProfilsComments[self::GROUP_MEMBER]),
'readonly' => true,
]);
?>
</div>
<div id="registrationUserCommentProfil<?php echo self::GROUP_EDITOR; ?>"
class="col12 registrationUserCommentProfil">
<?php echo template::textarea('registrationUserEditProfilComment' . self::GROUP_EDITOR, [
'label' => 'Commentaire',
'value' => implode("\n", suscribe::$userProfilsComments[self::GROUP_EDITOR]),
'readonly' => true,
]);
?>
</div>
<div id="registrationUserCommentProfil<?php echo self::GROUP_ADMIN; ?>"
class="col12 registrationUserCommentProfil">
<?php echo template::textarea('registrationUserEditProfilComment' . self::GROUP_ADMIN, [
'label' => 'Commentaire',
'value' => implode("\n", suscribe::$userProfilsComments[self::GROUP_ADMIN]),
'readonly' => true,
]);
?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Identité du compte</h4>
<div class="row">
<div class="col12">
<div class="row">
<div class="col6">
<?php echo template::text('registrationUserEditFirstname', [
'autocomplete' => 'off',
'label' => 'Prénom',
'value' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'firstname']),
'disabled' => true
]); ?>
</div>
<div class="col6">
<?php echo template::text('registrationUserEditLastname', [
'autocomplete' => 'off',
'label' => 'Nom',
'value' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'lastname']),
'disabled' => true
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::mail('registrationUserEditMail', [
'autocomplete' => 'off',
'label' => 'Adresse électronique',
'value' => $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'mail']),
'disabled' => true
]); ?>
</div>
</div>
<div class="row">
<div class="col8">
<?php echo template::text('registrationUserState', [
'label' => 'État de l\'inscription',
'value' => suscribe::$statusGroups[$this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'status'])],
'disabled' => true,
'help' => 'En attente : le mail n\'a pas encore été validé<br>Email validé : approbation nécessaire.'
]); ?>
</div>
<div class="col4">
<?php echo template::text('registrationUsertimer', [
'label' => 'Date de demande',
'value' => helper::dateUTF8(date('Y-m-d G:i'), $this->getData(['module', $this->getUrl(0), 'users', $this->getUrl(2), 'timer'])),
'disabled' => true
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -1,37 +1,37 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.com/
*/
.inputRowContainer1,
.inputRowContainer2,
.inputRowContainer4,
.inputColContainer {
display: grid;
gap: 10px; /* Espacement entre les inputs */
}
/* En lignes */
.inputRowContainer1 {
grid-template-columns: repeat(1, 1fr); /* 3 colonnes de largeur égale */
}
.inputRowContainer2 {
grid-template-columns: repeat(2, 1fr); /* 3 colonnes de largeur égale */
}
.inputRowContainer4 {
grid-template-columns: repeat(4, 1fr); /* 3 colonnes de largeur égale */
}
.inputColContainer {
grid-template-rows: repeat(50px, auto); /* 3 rangées ajustées à la hauteur des contenus */
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.com/
*/
.inputRowContainer1,
.inputRowContainer2,
.inputRowContainer4,
.inputColContainer {
display: grid;
gap: 10px; /* Espacement entre les inputs */
}
/* En lignes */
.inputRowContainer1 {
grid-template-columns: repeat(1, 1fr); /* 3 colonnes de largeur égale */
}
.inputRowContainer2 {
grid-template-columns: repeat(2, 1fr); /* 3 colonnes de largeur égale */
}
.inputRowContainer4 {
grid-template-columns: repeat(4, 1fr); /* 3 colonnes de largeur égale */
}
.inputColContainer {
grid-template-rows: repeat(50px, auto); /* 3 rangées ajustées à la hauteur des contenus */
}

View File

@ -1,47 +1,47 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.com/
*/
/**
* Affichage de l'id en simulant FILTER_ID
*/
$("#registrationAddId").on("change keydown keyup", function(event) {
var userId = $(this).val();
if(
event.keyCode !== 8 // BACKSPACE
&& event.keyCode !== 37 // LEFT
&& event.keyCode !== 39 // RIGHT
&& event.keyCode !== 46 // DELETE
&& window.getSelection().toString() !== userId // Texte sélectionné
) {
var searchReplace = {
"á": "a", "à": "a", "â": "a", "ä": "a", "ã": "a", "å": "a", "ç": "c", "é": "e", "è": "e", "ê": "e", "ë": "e", "í": "i", "ì": "i", "î": "i", "ï": "i", "ñ": "n", "ó": "o", "ò": "o", "ô": "o", "ö": "o", "õ": "o", "ú": "u", "ù": "u", "û": "u", "ü": "u", "ý": "y", "ÿ": "y",
"Á": "A", "À": "A", "Â": "A", "Ä": "A", "Ã": "A", "Å": "A", "Ç": "C", "É": "E", "È": "E", "Ê": "E", "Ë": "E", "Í": "I", "Ì": "I", "Î": "I", "Ï": "I", "Ñ": "N", "Ó": "O", "Ò": "O", "Ô": "O", "Ö": "O", "Õ": "O", "Ú": "U", "Ù": "U", "Û": "U", "Ü": "U", "Ý": "Y", "Ÿ": "Y",
"'": "-", "\"": "-", " ": "-"
};
userId = userId.replace(/[áàâäãåçéèêëíìîïñóòôöõúùûüýÿ'" ]/ig, function(match) {
return searchReplace[match];
});
userId = userId.replace(/[^a-z0-9-]/ig, "");
$(this).val(userId);
}
});
/**
* Droits des groupes
*/
$("#registrationAddGroup").on("change", function() {
$(".registrationAddGroupDescription").hide();
$("#registrationAddGroupDescription" + $(this).val()).show();
}).trigger("change");
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.com/
*/
/**
* Affichage de l'id en simulant FILTER_ID
*/
$("#registrationAddId").on("change keydown keyup", function(event) {
var userId = $(this).val();
if(
event.keyCode !== 8 // BACKSPACE
&& event.keyCode !== 37 // LEFT
&& event.keyCode !== 39 // RIGHT
&& event.keyCode !== 46 // DELETE
&& window.getSelection().toString() !== userId // Texte sélectionné
) {
var searchReplace = {
"á": "a", "à": "a", "â": "a", "ä": "a", "ã": "a", "å": "a", "ç": "c", "é": "e", "è": "e", "ê": "e", "ë": "e", "í": "i", "ì": "i", "î": "i", "ï": "i", "ñ": "n", "ó": "o", "ò": "o", "ô": "o", "ö": "o", "õ": "o", "ú": "u", "ù": "u", "û": "u", "ü": "u", "ý": "y", "ÿ": "y",
"Á": "A", "À": "A", "Â": "A", "Ä": "A", "Ã": "A", "Å": "A", "Ç": "C", "É": "E", "È": "E", "Ê": "E", "Ë": "E", "Í": "I", "Ì": "I", "Î": "I", "Ï": "I", "Ñ": "N", "Ó": "O", "Ò": "O", "Ô": "O", "Ö": "O", "Õ": "O", "Ú": "U", "Ù": "U", "Û": "U", "Ü": "U", "Ý": "Y", "Ÿ": "Y",
"'": "-", "\"": "-", " ": "-"
};
userId = userId.replace(/[áàâäãåçéèêëíìîïñóòôöõúùûüýÿ'" ]/ig, function(match) {
return searchReplace[match];
});
userId = userId.replace(/[^a-z0-9-]/ig, "");
$(this).val(userId);
}
});
/**
* Droits des groupes
*/
$("#registrationAddGroup").on("change", function() {
$(".registrationAddGroupDescription").hide();
$("#registrationAddGroupDescription" + $(this).val()).show();
}).trigger("change");

View File

@ -1,29 +1,29 @@
<?php echo template::formOpen('registrationAddForm'); ?>
<div class="<?php echo $this->getData(['module', $this->getUrl(0), 'config', 'layout']); ?>">
<?php echo template::text('registrationAddFirstname', [
'autocomplete' => 'off',
'label' => 'Prénom'
]); ?>
<?php echo template::text('registrationAddLastname', [
'autocomplete' => 'off',
'label' => 'Nom'
]); ?>
<?php echo template::text('registrationAddId', [
'autocomplete' => 'off',
'label' => 'Identifiant de connexion'
]); ?>
<?php echo template::mail('registrationAddMail', [
'autocomplete' => 'off',
'label' => 'Adresse électronique'
]); ?>
</div>
<div class='submitContainer'>
<div class="row">
<div class="col2 offset10">
<?php echo template::submit('registrationAddSubmit', [
'value' => 'Envoyer'
]); ?>
</div>
</div>
</div>
<?php echo template::formOpen('registrationAddForm'); ?>
<div class="<?php echo $this->getData(['module', $this->getUrl(0), 'config', 'layout']); ?>">
<?php echo template::text('registrationAddFirstname', [
'autocomplete' => 'off',
'label' => 'Prénom'
]); ?>
<?php echo template::text('registrationAddLastname', [
'autocomplete' => 'off',
'label' => 'Nom'
]); ?>
<?php echo template::text('registrationAddId', [
'autocomplete' => 'off',
'label' => 'Identifiant de connexion'
]); ?>
<?php echo template::mail('registrationAddMail', [
'autocomplete' => 'off',
'label' => 'Adresse électronique'
]); ?>
</div>
<div class='submitContainer'>
<div class="row">
<div class="col2 offset10">
<?php echo template::submit('registrationAddSubmit', [
'value' => 'Envoyer'
]); ?>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -1,17 +1,17 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.com/
*/
/** NE PAS EFFACER
* admin.css
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.com/
*/
/** NE PAS EFFACER
* admin.css
*/

View File

@ -1,21 +1,21 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.com/
*/
/**
* Confirmation de suppression
*/
$(".registrationUserDelete").on("click", function() {
var _this = $(this);
return core.confirm("Êtes-vous sûr de vouloir supprimer cet utilisateur ?", function() {
$(location).attr("href", _this.attr("href"));
});
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.com/
*/
/**
* Confirmation de suppression
*/
$(".registrationUserDelete").on("click", function() {
var _this = $(this);
return core.confirm("Êtes-vous sûr de vouloir supprimer cet utilisateur ?", function() {
$(location).attr("href", _this.attr("href"));
});
});

View File

@ -1,15 +1,15 @@
<div class="row">
<div class="col1">
<?php echo template::button('registrationUserBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
'value' => template::ico('left')
]); ?>
</div>
</div>
<?php if($module::$users): ?>
<?php echo template::table([3, 3, 2,21, 1, 1], $module::$users, ['Identifiant', 'Nom', 'Etat', 'Date', '', '']); ?>
<?php else: ?>
<?php echo template::speech('Pas d\'inscription en attente.'); ?>
<div class="row">
<div class="col1">
<?php echo template::button('registrationUserBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
'value' => template::ico('left')
]); ?>
</div>
</div>
<?php if(suscribe::$users): ?>
<?php echo template::table([3, 3, 2,21, 1, 1], suscribe::$users, ['Identifiant', 'Nom', 'Etat', 'Date', '', '']); ?>
<?php else: ?>
<?php echo template::speech('Pas d\'inscription en attente.'); ?>
<?php endif; ?>

View File

@ -1,34 +1,34 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.com/
*/
.inputRowContainer1,
.inputRowContainer2,
.inputRowContainer4,
.inputColContainer {
display: grid;
gap: 10px;
}
/* En lignes */
.inputRowContainer1 {
grid-template-columns: repeat(1, 1fr);
}
.inputRowContainer2 {
grid-template-columns: repeat(2, 1fr);
}
.inputRowContainer4 {
grid-template-columns: repeat(2, 1fr);
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.com/
*/
.inputRowContainer1,
.inputRowContainer2,
.inputRowContainer4,
.inputColContainer {
display: grid;
gap: 10px;
}
/* En lignes */
.inputRowContainer1 {
grid-template-columns: repeat(1, 1fr);
}
.inputRowContainer2 {
grid-template-columns: repeat(2, 1fr);
}
.inputRowContainer4 {
grid-template-columns: repeat(2, 1fr);
}

View File

@ -1,23 +1,23 @@
<?php echo template::formOpen('registrationValidForm'); ?>
<h3>Email confirmé</h3>
<div class="<?php echo $this->getData(['module',$this->getUrl(0),'config','layout']); ?>">
<?php echo template::password('registrationValidPassword', [
'autocomplete' => 'off',
'label' => 'Mot de passe'
]); ?>
<?php echo template::password('registrationValidConfirmPassword', [
'autocomplete' => 'off',
'label' => 'Confirmation du mot de passe'
]); ?>
</div>
<div class='submitContainer'>
<div class="row">
<div class="col2 offset10">
<?php echo template::submit('registrationValidSubmit', [
'value' => 'Envoyer',
'class' => 'green'
]); ?>
</div>
</div>
</div>
<?php echo template::formOpen('registrationValidForm'); ?>
<h3>Email confirmé</h3>
<div class="<?php echo $this->getData(['module',$this->getUrl(0),'config','layout']); ?>">
<?php echo template::password('registrationValidPassword', [
'autocomplete' => 'off',
'label' => 'Mot de passe'
]); ?>
<?php echo template::password('registrationValidConfirmPassword', [
'autocomplete' => 'off',
'label' => 'Confirmation du mot de passe'
]); ?>
</div>
<div class='submitContainer'>
<div class="row">
<div class="col2 offset10">
<?php echo template::submit('registrationValidSubmit', [
'value' => 'Envoyer',
'class' => 'green'
]); ?>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -0,0 +1,2 @@
# Version 1.2
- Remplacement du nom générique de classe dans les vues.

View File

@ -13,7 +13,7 @@
</div>
<div class="row">
<div class="col6">
<?php echo template::select('coursesConfigCategories', $module::$courseCategories, [
<?php echo template::select('coursesConfigCategories', workshop::$courseCategories, [
'label' => 'Catégorie à afficher',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'category'])
]); ?>
@ -76,7 +76,7 @@
</h4>
<div class="row">
<div class="col12">
<?php echo template::select('coursesConfigLayout', $module::$coursesLayout, [
<?php echo template::select('coursesConfigLayout', workshop::$coursesLayout, [
'label' => 'Présentation en colonnes',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'layout']),
'help' => 'Chaque contenu est présenté dans une colonne'
@ -186,5 +186,5 @@
<?php echo template::formClose(); ?>
<div class="moduleVersion">Version
<?php echo $module::VERSION; ?>
<?php echo workshop::VERSION; ?>
</div>

View File

@ -56,7 +56,7 @@
<div class="workshopAccessContainer">
<p>
<span class="workshopAccess">
<?php echo sprintf(helper::translate($module::$coursesAccess[$courseValue['access']]), helper::dateUTF8('%d %B %Y', $courseValue['openingDate']) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $courseValue['openingDate']), helper::dateUTF8('%d %B %Y', $courseValue['closingDate']) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $courseValue['closingDate'])) ?>
<?php echo sprintf(helper::translate(workshop::$coursesAccess[$courseValue['access']]), helper::dateUTF8('%d %B %Y', $courseValue['openingDate']) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $courseValue['openingDate']), helper::dateUTF8('%d %B %Y', $courseValue['closingDate']) . helper::translate(' à ') . helper::dateUTF8('%H:%M', $courseValue['closingDate'])) ?>
</span>
</p>
</div>
@ -66,7 +66,7 @@
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'enrolment']) === true): ?>
<p>
<span class="workshopEnrolment">
<?php echo $module::$coursesEnrolment[$courseValue['enrolment']]; ?>
<?php echo workshop::$coursesEnrolment[$courseValue['enrolment']]; ?>
</span>
</p>
<?php if ($this->getData(['course', $courseId, 'limitEnrolment']) === true): ?>

View File

@ -15,7 +15,7 @@
class workshop extends common
{
const VERSION = '1.01';
const VERSION = '1.2';
const REALNAME = 'Liste des espaces';
const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json)