This commit is contained in:
Fred Tempez 2024-08-16 15:57:50 +02:00
commit be11a47921
105 changed files with 5774 additions and 0 deletions

308
agenda/agenda.php Normal file
View File

@ -0,0 +1,308 @@
<?php
/**
* 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-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.fr/
*/
class agenda extends common
{
const VERSION = '0.1';
const REALNAME = 'Agenda';
const DATA_DIRECTORY = self::DATA_DIR . 'agenda/';
const SORT_ASC = 'SORT_ASC';
const SORT_DSC = 'SORT_DSC';
const SORT_HAND = 'SORT_HAND';
public static $agendas = [];
public static $classes = ['' => ''];
public static $actions = [
'config' => self::GROUP_EDITOR,
'delete' => self::GROUP_EDITOR,
'dirs' => self::GROUP_EDITOR,
'add' => self::GROUP_EDITOR,
'edit' => self::GROUP_EDITOR,
'index' => self::GROUP_VISITOR
];
/**
* Mise à jour du module
* Appelée par les fonctions index et config
*/
private function update()
{
//$versionData = $this->getData(['module', $this->getUrl(0), 'config', 'versionData']);
}
/**
* Configuration
*/
public function config()
{
// Soumission du formulaire
if (
$this->getUser('permission', __CLASS__, __FUNCTION__) === true
) {
$agendas = $this->getData(['module', $this->getUrl(0), 'content']);
if (is_null($agendas)) {
$this->setData(['module', $this->getUrl(0), 'content', []]);
} elseif (!empty($agendas)) {
foreach ($agendas as $agendaId => $agendaData) {
self::$agendas[] = [
$agendaData['eventName'],
helper::dateUTF8('%d %m %Y', $agendaData['date'], self::$i18nUI),
empty($agendaData['time']) ? '' : helper::dateUTF8('%H:%M', $agendaData['time'], self::$i18nUI),
template::button('agendaConfigEdit' . $agendaId, [
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $agendaId,
'value' => template::ico('pencil'),
'help' => 'Configuration'
]),
template::button('galleryConfigDelete' . $agendaId, [
'class' => 'galleryConfigDelete buttonRed',
'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $agendaId,
'value' => template::ico('trash'),
'help' => 'Supprimer'
])
];
}
}
}
// Valeurs en sortie
$this->addOutput([
'showBarEditButton' => true,
'title' => helper::translate('Configuration'),
'view' => 'config'
]);
}
/**
* Ajout d'une événement
*/
public function add()
{
// Soumission du formulaire d'ajout d'une galerie
if (
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
$this->isPost()
) {
$this->setData([
'module',
$this->getUrl(0),
'content',
uniqid(),
[
'eventName' => $this->getInput('agendaAddEventName', null, true),
'date' => $this->getInput('agendaAddDate', helper::FILTER_DATETIME, true),
'time' => $this->getInput('agendaAddAllDay', helper::FILTER_BOOLEAN) === false ? $this->getInput('agendaAddTime', helper::FILTER_DATETIME) : '',
'className' => $this->getInput('agendaAddDateClassName', null),
'dateColor' => $this->getInput('agendaAddDateColor', null),
]
]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config',
'notification' => helper::translate('Modifications enregistrées'),
'state' => true
]);
}
// Liste des classes disponibles
$classes = $this->getData(['page', $this->getUrl(0), 'css']);
preg_match_all('/\.(\w+)/', $classes, $matches);
if (isset($matches[1])) {
// Créer un tableau associatif avec les clés égales aux valeurs
$associativeClasses = array_combine($matches[1], $matches[1]);
// Fusionner ce tableau avec le tableau self::$classes
self::$classes = array_merge(self::$classes, $associativeClasses);
}
// Valeurs en sortie
$this->addOutput([
'title' => helper::translate('Nouvel événement'),
'view' => 'add',
'vendor' => [
'tinycolorpicker'
],
]);
}
/**
* Ajout d'une événement
*/
public function edit()
{
// Soumission du formulaire d'ajout d'une galerie
if (
$this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
$this->isPost()
) {
$this->setData([
'module',
$this->getUrl(0),
'content',
$this->getUrl(2),
[
'eventName' => $this->getInput('agendaEditEventName', null, true),
'date' => $this->getInput('agendaEditDate', helper::FILTER_DATETIME, true),
'time' => $this->getInput('agendaEditAllDay', helper::FILTER_BOOLEAN) === false ? $this->getInput('agendaEditTime', helper::FILTER_DATETIME) : '',
'className' => $this->getInput('agendaEditDateClassName', null),
'dateColor' => $this->getInput('agendaEditDateColor', null),
]
]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config',
'notification' => helper::translate('Modifications enregistrées'),
'state' => true
]);
}
// Liste des classes disponibles
$classes = $this->getData(['page', $this->getUrl(0), 'css']);
preg_match_all('/\.(\w+)/', $classes, $matches);
if (isset($matches[1])) {
// Créer un tableau associatif avec les clés égales aux valeurs
$associativeClasses = array_combine($matches[1], $matches[1]);
// Fusionner ce tableau avec le tableau self::$classes
self::$classes = array_merge(self::$classes, $associativeClasses);
}
// Valeurs en sortie
$this->addOutput([
'title' => helper::translate('Edition'),
'view' => 'edit',
'vendor' => [
'tinycolorpicker'
],
]);
}
/**
* Suppression
*/
public function delete()
{
// La galerie n'existe pas
if (
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true ||
$this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2)]) === null
) {
// Valeurs en sortie
$this->addOutput([
'access' => false
]);
}
// Suppression
else {
$this->deleteData(['module', $this->getUrl(0), 'content', $this->getUrl(2)]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config',
'notification' => helper::translate('Evenement effacé'),
'state' => true
]);
}
}
/**
* Accueil (deux affichages en un pour éviter une url à rallonge)
*/
public function index()
{
// Mise à jour des données de module
$this->update();
$agendas = $this->getData(['module', $this->getUrl(0), 'content']);
// Initialise la feuille de style
if (empty($this->getData(['page', $this->getUrl(0), 'css']))) {
$this->initCss();
}
// Affichage du template si les données sont disponibles
if (is_null($agendas)) {
$this->setData(['module', $this->getUrl(0), 'content', []]);
} elseif (!empty($agendas)) {
// Lecture des données
foreach ($agendas as $agendasId => $data) {
// Convertion du timestamp en ISO
$data['date'] = helper::dateUTF8('%Y-%m-%d', $data['date']);
// Ajouter l'horaire
if (!empty($data['time'])) {
$data['time'] = helper::dateUTF8('%H:%M', $data['time']);
$data['date'] = $data['date'] . 'T' . $data['time'];
}
self::$agendas[] = $data;
}
}
// Valeurs en sortie
$this->addOutput([
'showBarEditButton' => true,
'showPageContent' => true,
'view' => 'index',
'vendor' => [
'animated-calendar'
],
]);
}
// Page de module vide
private function initCss()
{
// Feuille de styles
$cssContent =
'.textRed {
padding: 2px;
border-radius: 5px;
color: red;
background-color: lightgrey;
font-size: 18px;
}
.textGreen {
border-radius: 5px;
padding: 2px;
color: lightgreen;
background-color: darkgrey;
font-size: 18px;
}
.textOrange {
padding: 2px;
border-radius: 5px;
color: orange;
background-color: green;
font-size: 18px;
}';
$this->setData(['page', $this->getUrl(0), 'css', $cssContent]);
}
}

2
agenda/changes.md Normal file
View File

@ -0,0 +1,2 @@
# Version 0.1
- GeoGallery est basé sur le module gallery 4.1

1
agenda/enum.json Normal file
View File

@ -0,0 +1 @@
{"name":"geolocation","realName":"Géolocalisation","version":"0.5","update":"0.0","delete":true,"dataDirectory":"site\/data\/geolocation\/"}

44
agenda/i18n/de.json Normal file
View File

@ -0,0 +1,44 @@
{
"Afficher le contenu de la page avec la galerie": "Zeigen Sie den Inhalt der Seite mit der Galerie an",
"Alignement du bouton de retour": "Return -Taste -Ausrichtung",
"Alphabétique ": "Alphabetisch",
"Alphabétique inverse": "Alphabetik umgekehrt",
"Au-dessus": "Über",
"Aucune galerie": "Keine Galerie",
"Bordure": "Bordüre",
"Configuration de la galerie %s ": "Galeriekonfiguration %s",
"Configuration des galeries": "Die Konfiguration der Galer",
"Couleur de la bordure": "Randfarbe",
"Couverture": "Decke",
"Discrète": "Diskret",
"Distribué avec marges": "Verteilt",
"Distribué sans marge": "Ohne Rand verteilt",
"Dossier cible": "Zieldatei",
"En dessous": "Unter",
"Epaisse": "Dick",
"Fine": "Bußgeld",
"Forte": "Stärke",
"Galerie ajoutée": "Galerie hinzugefügt",
"Galerie effacée": "Gelobte Galerie",
"Légende": "Legende",
"Légendes": "Legenden",
"Manuel": "Manuel",
"Marge": "Marge",
"Masqué": "Maske",
"Mode plein écran automatique": "Automatischer Vollmodus",
"Opacité au survol": "Opazität im Überflug",
"Options de configuration": "Optionen de Konfiguration",
"Proportionnelle": "Proportional",
"Supprimer cette galerie ?": "Diese Galerie entfernen?",
"Tri des images": "Bilder sortieren",
"Très Discrète": "Sehr diskret",
"Très fine": "Sehr gut",
"Très forte": "Sehr stark",
"Très épaisse": "Sehr dick",
"Vignettes": "Vignetten",
"Ajouter une galerie": "Eine Galerie hinzufügen",
"Éditer une galerie": "Eine Galerie bearbeiten",
"Effacer une galerie": "Eine Galerie löschen",
"Options des galeries": "Galerieoptionen",
"Thème des galeries": "Galeriethemen"
}

44
agenda/i18n/en_EN.json Normal file
View File

@ -0,0 +1,44 @@
{
"Afficher le contenu de la page avec la galerie": "Show the content of the page with the gallery",
"Alignement du bouton de retour": "Return button alignment",
"Alphabétique ": "Alphabetical",
"Alphabétique inverse": "Reverse alphabetics",
"Au-dessus": "Above",
"Aucune galerie": "No gallery",
"Bordure": "Border",
"Configuration de la galerie %s ": "Gallery settings %s ",
"Configuration des galeries": "Galleries's settings",
"Couleur de la bordure": "Border color",
"Couverture": "Cover",
"Discrète": "Discreet",
"Distribué avec marges": "Distributed with margins",
"Distribué sans marge": "Distributed without margin",
"Dossier cible": "Target file",
"En dessous": "Below",
"Epaisse": "Thick",
"Fine": "Fine",
"Forte": "Forte",
"Galerie ajoutée": "Gallery added",
"Galerie effacée": "Erased gallery",
"Légende": "Caption",
"Légendes": "Legends",
"Manuel": "Manuel",
"Marge": "Marge",
"Masqué": "Mask",
"Mode plein écran automatique": "Automatic full mode",
"Opacité au survol": "Opacity in overflight",
"Options de configuration": "Configuration options",
"Proportionnelle": "Proportional",
"Supprimer cette galerie ?": "Remove this gallery?",
"Tri des images": "Sorting images",
"Très Discrète": "Very discreet",
"Très fine": "Very fine",
"Très forte": "Very strong",
"Très épaisse": "Very thick",
"Vignettes": "Vignettes",
"Ajouter une galerie": "Add a gallery",
"Éditer une galerie": "Edit a gallery",
"Effacer une galerie": "Delete a gallery",
"Options des galeries": "Gallery options",
"Thème des galeries": "Gallery themes"
}

44
agenda/i18n/es.json Normal file
View File

@ -0,0 +1,44 @@
{
"Afficher le contenu de la page avec la galerie": "Mostrar contenido de página con galería",
"Alignement du bouton de retour": "Alineación del botón Atrás",
"Alphabétique ": "Alfabético",
"Alphabétique inverse": "Alfabético inverso",
"Au-dessus": "Encima",
"Aucune galerie": "Sin galería",
"Bordure": "Bordillo",
"Configuration de la galerie %s ": "Configuración de la galería %s ",
"Configuration des galeries": "Configuración de la galería",
"Couleur de la bordure": "Color del bordillo",
"Couverture": "Portada ",
"Discrète": "Discreto",
"Distribué avec marges": "Distribuido con márgenes",
"Distribué sans marge": "Distribuido sin margen",
"Dossier cible": "Carpeta de destino",
"En dessous": "Debajo",
"Epaisse": "grueso",
"Fine": "Fino",
"Forte": "Fuerte",
"Galerie ajoutée": "Galería añadida",
"Galerie effacée": "Galería eliminada",
"Légende": "Pie",
"Légendes": "Leyendas",
"Manuel": "Manual",
"Marge": "Margen",
"Masqué": "Máscara",
"Mode plein écran automatique": "Modo automático de pantalla completa",
"Opacité au survol": "Opacidad de desplazamiento",
"Options de configuration": "Opciones de configuración",
"Proportionnelle": "Proporcional",
"Supprimer cette galerie ?": "¿Borrar esta galería?",
"Tri des images": "Ordenar imágenes",
"Très Discrète": "Muy discreto",
"Très fine": "Muy fino",
"Très forte": "Muy fuerte",
"Très épaisse": "Muy grueso",
"Vignettes": "Viñetas",
"Ajouter une galerie": "Agregar una galería",
"Éditer une galerie": "Editar una galería",
"Effacer une galerie": "Borrar una galería",
"Options des galeries": "Opciones de galerías",
"Thème des galeries": "Temas de galerías"
}

44
agenda/i18n/fr_FR.json Normal file
View File

@ -0,0 +1,44 @@
{
"Afficher le contenu de la page avec la galerie": "",
"Alignement du bouton de retour": "",
"Alphabétique ": "",
"Alphabétique inverse": "",
"Au-dessus": "",
"Aucune galerie": "",
"Bordure": "",
"Configuration de la galerie %s ": "",
"Configuration des galeries": "",
"Couleur de la bordure": "",
"Couverture": "",
"Discrète": "",
"Distribué avec marges": "",
"Distribué sans marge": "",
"Dossier cible": "",
"En dessous": "",
"Epaisse": "",
"Fine": "",
"Forte": "",
"Galerie ajoutée": "",
"Galerie effacée": "",
"Légende": "",
"Légendes": "",
"Manuel": "",
"Marge": "",
"Masqué": "",
"Mode plein écran automatique": "",
"Opacité au survol": "",
"Options de configuration": "",
"Proportionnelle": "",
"Supprimer cette galerie ?": "",
"Tri des images": "",
"Très Discrète": "",
"Très fine": "",
"Très forte": "",
"Très épaisse": "",
"Vignettes": "",
"Ajouter une galerie": "",
"Éditer une galerie": "",
"Effacer une galerie": "",
"Options des galeries": "",
"Thème des galeries": ""
}

44
agenda/i18n/gr_GR.json Normal file
View File

@ -0,0 +1,44 @@
{
"Afficher le contenu de la page avec la galerie": "Εμφάνιση περιεχομένου σελίδας με γκαλερί",
"Alignement du bouton de retour": "Ευθυγράμμιση κουμπιού πίσω",
"Alphabétique ": "Αλφαβητική Ταξινόμηση",
"Alphabétique inverse": "Αντίστροφη αλφαβητική",
"Au-dessus": "Πάνω",
"Aucune galerie": "Δεν υπάρχει συλλογή εικόνων",
"Bordure": "κάδρο γύρω",
"Configuration de la galerie %s ": "Διαμόρφωση της γκαλερί %s ",
"Configuration des galeries": "Διαμόρφωση γκαλερί",
"Couleur de la bordure": "Χρώμα γραμμής",
"Couverture": "Κάλυψη ",
"Discrète": "διακριτικό",
"Distribué avec marges": "Διανομή με περιθώρια",
"Distribué sans marge": "Διανομή χωρίς περιθώριο",
"Dossier cible": "Φάκελος στόχος",
"En dessous": "Κάτω",
"Epaisse": "Παχιά γραμμή",
"Fine": "Λεπτή γραμμή ",
"Forte": "Ισχυρή αδιαφάνεια",
"Galerie ajoutée": "Προστέθηκε γκαλερί",
"Galerie effacée": "Γκαλερί διαγράφηκε",
"Légende": "Λεζάντα εικόνας",
"Légendes": "",
"Manuel": "Χειροκίνητη ",
"Marge": "Περιθώριο",
"Masqué": "κρυμμένο",
"Mode plein écran automatique": "Αυτόματη λειτουργία πλήρους οθόνης",
"Opacité au survol": "Αδιαφάνεια στο mouse-over",
"Options de configuration": "Επιλογές διαμόρφωσης",
"Proportionnelle": "Αναλογική",
"Supprimer cette galerie ?": "",
"Tri des images": "Ταξινόμηση εικόνων",
"Très Discrète": "Πολύ διακριτικό",
"Très fine": "Πολύ λεπτή γραμμή ",
"Très forte": "Πολύ Ισχυρή αδιαφάνεια",
"Très épaisse": "πολύ παχιά γραμμή",
"Vignettes": "",
"Ajouter une galerie": "Προσθήκη συλλογής",
"Éditer une galerie": "Επεξεργασία συλλογής",
"Effacer une galerie": "Διαγραφή συλλογής",
"Options des galeries": "Επιλογές συλλογών",
"Thème des galeries": "Θέματα συλλογών"
}

44
agenda/i18n/it.json Normal file
View File

@ -0,0 +1,44 @@
{
"Afficher le contenu de la page avec la galerie": "Mostra il contenuto della pagina con la galleria",
"Alignement du bouton de retour": "Allineamento del pulsante di ritorno",
"Alphabétique ": "Alfabetico",
"Alphabétique inverse": "Alfabetico inverso",
"Au-dessus": "Al di sopra",
"Aucune galerie": "Nessuna galleria",
"Bordure": "Bordo",
"Configuration de la galerie %s ": "Configurazione della galleria %s ",
"Configuration des galeries": "Configurazione di Galler",
"Couleur de la bordure": "Colore del bordo",
"Couverture": "Copertina",
"Discrète": "Discreto",
"Distribué avec marges": "Distribuito con margini",
"Distribué sans marge": "Distribuito senza margine",
"Dossier cible": "File di destinazione",
"En dessous": "Qui di seguito",
"Epaisse": "Spesso",
"Fine": "Bene",
"Forte": "Forte",
"Galerie ajoutée": "Galleria aggiunta",
"Galerie effacée": "Galleria cancellata",
"Légende": "Didascalia",
"Légendes": "Leggende",
"Manuel": "Manuel",
"Marge": "Marge",
"Masqué": "Maschera",
"Mode plein écran automatique": "Modalità completa automatica",
"Opacité au survol": "Opacità in luce eccessiva",
"Options de configuration": "Opzioni di configurazione",
"Proportionnelle": "Proporzionale",
"Supprimer cette galerie ?": "Rimuovere questa galleria?",
"Tri des images": "Ordinamento delle immagini",
"Très Discrète": "Molto discreto",
"Très fine": "Molto bene",
"Très forte": "Molto forte",
"Très épaisse": "Molto spesso",
"Vignettes": "Vignette",
"Ajouter une galerie": "Aggiungi una galleria",
"Éditer une galerie": "Modifica una galleria",
"Effacer une galerie": "Cancella una galleria",
"Options des galeries": "Opzioni delle gallerie",
"Thème des galeries": "Temi delle gallerie"
}

44
agenda/i18n/pt_PT.json Normal file
View File

@ -0,0 +1,44 @@
{
"Afficher le contenu de la page avec la galerie": "Mostre o conteúdo da página com a galeria",
"Alignement du bouton de retour": "Retornar alinhamento do botão",
"Alphabétique ": "Alfabético",
"Alphabétique inverse": "Alfabético reverso",
"Au-dessus": "Acima de",
"Aucune galerie": "Sem galeria",
"Bordure": "Fronteira",
"Configuration de la galerie %s ": "Configuração da galeria %s ",
"Configuration des galeries": "Configuração de Galler",
"Couleur de la bordure": "Cor da borda",
"Couverture": "Capa",
"Discrète": "Discreto",
"Distribué avec marges": "Distribuído com margens",
"Distribué sans marge": "Distribuído sem margem",
"Dossier cible": "Arquivo de destino",
"En dessous": "Abaixo de",
"Epaisse": "Espesso",
"Fine": "Multar",
"Forte": "Forte",
"Galerie ajoutée": "Galeria adicionada",
"Galerie effacée": "Galeria apagada",
"Légende": "Legenda",
"Légendes": "Legendas",
"Manuel": "Manuel",
"Marge": "Marge",
"Masqué": "mascarar",
"Mode plein écran automatique": "Modo completo automático",
"Opacité au survol": "Opacidade em Overflight",
"Options de configuration": "",
"Proportionnelle": "Proporcional",
"Supprimer cette galerie ?": "Remover esta galeria?",
"Tri des images": "Classificando imagens",
"Très Discrète": "Muito discreto",
"Très fine": "Muito bem",
"Très forte": "Muito forte",
"Très épaisse": "Muito espesso",
"Vignettes": "Vinhetas",
"Ajouter une galerie": "Adicionar uma galeria",
"Éditer une galerie": "Editar uma galeria",
"Effacer une galerie": "Apagar uma galeria",
"Options des galeries": "Opções de galerias",
"Thème des galeries": "Temas de galerias"
}

44
agenda/i18n/tr_TR.json Normal file
View File

@ -0,0 +1,44 @@
{
"Afficher le contenu de la page avec la galerie": "Sayfa içeriğini galeri ile görüntüle",
"Alignement du bouton de retour": "Geri düğmesi hizalaması",
"Alphabétique ": "Alfabetik",
"Alphabétique inverse": "Ters alfabetik",
"Au-dessus": "Üstünde",
"Aucune galerie": "Galeri Yok",
"Bordure": "Çerçeve",
"Configuration de la galerie %s ": "%s galeri yapılandırması",
"Configuration des galeries": "Galerilerin yapılandırması",
"Couleur de la bordure": "Çerçeve rengi",
"Couverture": "Kapak",
"Discrète": "Silik",
"Distribué avec marges": "Kenar boşluklarıyla dağıtıldı",
"Distribué sans marge": "Marjsız dağıtıldı",
"Dossier cible": "Hedef klasör",
"En dessous": "Altında",
"Epaisse": "Kalın",
"Fine": "İnce",
"Forte": "Güçlü",
"Galerie ajoutée": "Galeri eklendi",
"Galerie effacée": "Galeri silindi",
"Légende": "Başlık",
"Légendes": "Başlıklar",
"Manuel": "Manuel",
"Marge": "Kenar boşluğu",
"Masqué": "Gizli",
"Mode plein écran automatique": "Otomatik tam ekran modu",
"Opacité au survol": "Hover opaklığı",
"Options de configuration": "Yapılandırma seçenekleri",
"Proportionnelle": "Orantılı",
"Supprimer cette galerie ?": "Bu galeri silinsin mi?",
"Tri des images": "Resimleri sıralama",
"Très Discrète": "Çok silik",
"Très fine": "Çok ince",
"Très forte": "Çok güçlü",
"Très épaisse": "Çok kalın",
"Vignettes": "Küçük resim",
"Ajouter une galerie": "Galeri Ekle",
"Éditer une galerie": "Galeri Düzenle",
"Effacer une galerie": "Galeri Sil",
"Options des galeries": "Galeri Seçenekleri",
"Thème des galeries": "Galeri Temaları"
}

View File

@ -0,0 +1,12 @@
<?php $moduleData['gallery'] = [
'add' => $this->getInput('profilAddGalleryAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilAddGalleryEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilAddGalleryDelete', helper::FILTER_BOOLEAN),
'option' => $this->getInput('profilAddGalleryOption', helper::FILTER_BOOLEAN),
'theme' => $this->getInput('profilAddGalleryTheme', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilAddGalleryAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddGalleryEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddGalleryDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddGalleryOption', helper::FILTER_BOOLEAN) ||
$this->getInput('profilAddGalleryTheme', helper::FILTER_BOOLEAN)
];

View File

@ -0,0 +1,12 @@
<?php $moduleData['gallery'] = [
'add' => $this->getInput('profilEditGalleryAdd', helper::FILTER_BOOLEAN),
'edit' => $this->getInput('profilEditGalleryEdit', helper::FILTER_BOOLEAN),
'delete' => $this->getInput('profilEditGalleryDelete', helper::FILTER_BOOLEAN),
'option' => $this->getInput('profilEditGalleryOption', helper::FILTER_BOOLEAN),
'theme' => $this->getInput('profilEditGalleryTheme', helper::FILTER_BOOLEAN),
'config' => $this->getInput('profilEditGalleryAdd', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditGalleryEdit', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditGalleryDelete', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditGalleryOption', helper::FILTER_BOOLEAN) ||
$this->getInput('profilEditGalleryTheme', helper::FILTER_BOOLEAN)
];

View File

@ -0,0 +1,28 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo sprintf('%s %s', helper::translate('Permissions'), helper::translate('Galerie')); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilAddGalleryAdd', true, 'Ajouter une galerie'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddGalleryEdit', true, 'Éditer une galerie'); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilAddGalleryDelete', true, 'Effacer une galerie'); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('profilAddGalleryOption', true, 'Options des galeries'); ?>
</div>
<div class="col6">
<?php echo template::checkbox('profilAddGalleryTheme', true, 'Thème des galeries'); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,38 @@
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo sprintf('%s %s', helper::translate('Permissions'), helper::translate('Galerie')); ?>
</h4>
<div class="row">
<div class="col4">
<?php echo template::checkbox('profilEditGalleryAdd', true, 'Ajouter une galerie', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'add'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditGalleryEdit', true, 'Éditer une galerie', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'edit'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('profilEditGalleryDelete', true, 'Effacer une galerie', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'delete'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('profilEditGalleryOption', true, 'Options des galeries', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'option'])
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('profilEditGalleryTheme', true, 'Thème des galeries', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'gallery', 'theme'])
]); ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,25 @@
<?php
class theme extends gallery {
public static $defaultTheme = [
'thumbAlign' => 'center',
'thumbWidth' => '18em',
'thumbHeight' => '15em',
'thumbMargin' => '.5em',
'thumbBorder' => '.1em',
'thumbOpacity' => '.7',
'thumbBorderColor' => 'rgba(221, 221, 221, 1)',
'thumbRadius' => '.3em',
'thumbShadows' => '1px 1px 10px',
'thumbShadowsColor' => 'rgba(125, 125, 125, 1)',
'legendHeight' => '.375em',
'legendAlign' => 'center',
'legendTextColor' => 'rgba(255, 255, 255, 1)',
'legendBgColor' => 'rgba(0, 0, 0, .6)'
];
public static $defaultData = [
"showUniqueGallery" => false,
"backPosition" => "top",
"backAlign" => "center",
'versionData' => '3.0'
];
}

View File

@ -0,0 +1,52 @@
.galleryPicture,
.galleryGalleryPicture {
display: block;
border: var(--thumbBorder) solid var(--thumbBorderColor);
height: var(--thumbHeight);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
position: relative;
-webkit-transition: opacity .3s ease-out;
transition: opacity .3s ease-out;
border-radius: var(--thumbRadius);
box-shadow: var(--thumbShadows) var(--thumbShadowsColor);
-webkit-box-shadow: var(--thumbShadows) var(--thumbShadowsColor);
-moz-box-shadow: var(--thumbShadows) var(--thumbShadowsColor);
}
.galleryPicture:hover,
.galleryGalleryPicture:hover {
opacity: var(--thumbOpacity);
}
.galleryName,
.galleryGalleryName {
position: absolute;
left: 0;
right: 0;
bottom: 0;
border-radius: 0 0 calc(var(--thumbRadius)/2) calc(var(--thumbRadius)/2);
padding: var(--legendHeight);
background: var(--legendBgColor);
color: var(--legendTextColor);
text-align: var(--legendAlign);
}
.galleryRow {
display: flex;
flex-wrap: wrap;
justify-content: var(--thumbAlign);
}
.colPicture {
width : var(--thumbWidth);
max-width: 50%;
padding: var(--thumbMargin);
}
@media (max-width: 432px) {
.colPicture {
width: 90%;
max-width: 90%;
margin: 0.5em;
}
}

View File

@ -0,0 +1,27 @@
.galleryRow {
--thumbAlign: #thumbAlign#;
}
.colPicture {
--thumbWidth: #thumbWidth#;
--thumbMargin: #thumbMargin#;
}
.galleryPicture,
.galleryGalleryPicture {
--thumbHeight: #thumbHeight#;
--thumbBorder: #thumbBorder#;
--thumbBorderColor: #thumbBorderColor#;
--thumbRadius: #thumbRadius#;
--thumbShadows: #thumbShadows#;
--thumbShadowsColor: #thumbShadowsColor#;
}
.galleryName,
.galleryGalleryName {
--legendHeight: #legendHeight#;
--legendAlign: #legendAlign#;
--legendTextColor: #legendTextColor#;
--legendBgColor: #legendBgColor#;
}
.galleryPicture:hover,
.galleryGalleryPicture:hover {
--thumbOpacity: #thumbOpacity#;
}

View File

@ -0,0 +1,287 @@
@import url(https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap);
.gc-calendar-wrapper {
transform: scale(0.75);
transform-origin: top left;
width: 133.33%; /* Ajuste la largeur du conteneur pour compenser le redimensionnement */
height: auto; /* Ajuste la hauteur automatiquement */
}
.gc-calendar {
font-family: Inter, sans-serif;
background-color: #fff;
padding: 1rem;
}
.gc-calendar .gc-calendar-header {
background-color: #fff;
padding: 2px;
height: max-content;
display: flex;
align-items: center;
margin-bottom: 40px;
}
.gc-calendar .gc-calendar-header button.next,
.gc-calendar .gc-calendar-header button.prev {
height: 36px;
left: 0;
top: 0;
border-radius: 100px;
background: #fff;
border-radius: 100px;
position: relative;
display: inline-block;
border: 0;
padding: 4px 15px;
font-size: 24px;
box-shadow: inset 0 -1px 0 #edf2f7;
cursor: pointer;
color: #7a7a9d;
font-weight: 700;
margin-right: 10px;
width: inherit;
}
.gc-calendar .gc-calendar-header button.next:hover,
.gc-calendar .gc-calendar-header button.prev:hover {
box-shadow: 0 3px 6px rgba(0, 0, 0, .08), 0 7px 14px rgba(50, 50, 93, .1);
}
.gc-calendar .gc-calendar-header button.next:focus,
.gc-calendar .gc-calendar-header button.prev:focus {
box-shadow: 0 3px 6px rgba(0, 0, 0, .08), 0 7px 14px rgba(50, 50, 93, .1);
outline: 0;
border: 0;
}
.gc-calendar .gc-calendar-header button.prev {
margin-left: 20px;
}
.gc-calendar .gc-calendar-header .gc-calendar-month-year {
font-style: normal;
font-weight: 600;
font-size: 28px;
color: #38385c;
line-height: 136.02%;
min-width: 220px;
}
.gc-calendar table.calendar {
width: 100%;
}
.gc-calendar table.calendar th {
text-align: start;
font-weight: 600;
font-size: 14px;
line-height: 136.02%;
padding: 2px;
text-transform: uppercase;
color: #7a7a9d;
position: relative;
padding-bottom: 12px;
}
.gc-calendar table.calendar td {
height: 150px;
position: relative;
padding-top: 3px;
vertical-align: top;
width: calc(100% / 7);
}
.gc-calendar table.calendar td.next-month .day-number,
.gc-calendar table.calendar td.prev-month .day-number {
color: #b5b5bd;
}
.gc-calendar table.calendar td .day-number {
font-size: 24px;
font-weight: 800;
line-height: 38.09px;
overflow-y: auto;
color: #38385c;
text-decoration: none;
display: block;
}
.gc-calendar table.calendar td .today .day-number {
color: #4c6fff;
}
.gc-calendar table.calendar a {
text-decoration: none;
display: block;
}
.gc-calendar table.calendar a:hover {
background-color: #4c6fff;
width: 90%;
border-radius: 5px;
padding-left: 10px;
transition: .2s;
}
.gc-calendar table.calendar a:hover .day-number {
color: #fff;
}
.gc-calendar table.calendar th::before,
.gc-calendar table.calendar tr:not(:last-child) td::before {
content: "";
display: block;
width: 90%;
height: 2px;
border-radius: 1px;
background-color: #8f8f93;
bottom: 0;
left: 0;
position: absolute;
}
.gc-calendar table.calendar td:hover {
background: linear-gradient(90deg, #e1e8ff 90%, transparent 50%);
padding-left: 10px;
padding-right: 10px;
transition: .3s;
}
.gc-calendar .gc-event {
display: block;
overflow: hidden;
margin-bottom: 10px;
}
.slide-in-left {
-webkit-animation: slide-in-left .5s cubic-bezier(.25, .46, .45, .94) both;
animation: slide-in-left .5s cubic-bezier(.25, .46, .45, .94) both;
}
.slide-in-right {
-webkit-animation: slide-in-right .5s cubic-bezier(.25, .46, .45, .94) both;
animation: slide-in-right .5s cubic-bezier(.25, .46, .45, .94) both;
}
.slide-out-left {
-webkit-animation: slide-out-left .5s cubic-bezier(.55, .085, .68, .53) both;
animation: slide-out-left .5s cubic-bezier(.55, .085, .68, .53) both;
}
.slide-out-right {
-webkit-animation: slide-out-right .5s cubic-bezier(.55, .085, .68, .53) both;
animation: slide-out-right .5s cubic-bezier(.55, .085, .68, .53) both;
}
@-webkit-keyframes slide-in-left {
0% {
-webkit-transform: translateX(-1000px);
transform: translateX(-1000px);
opacity: 0;
}
100% {
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
}
}
@keyframes slide-in-left {
0% {
-webkit-transform: translateX(-1000px);
transform: translateX(-1000px);
opacity: 0;
}
100% {
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
}
}
@-webkit-keyframes slide-in-right {
0% {
-webkit-transform: translateX(1000px);
transform: translateX(1000px);
opacity: 0;
}
100% {
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
}
}
@keyframes slide-in-right {
0% {
-webkit-transform: translateX(1000px);
transform: translateX(1000px);
opacity: 0;
}
100% {
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
}
}
@-webkit-keyframes slide-out-left {
0% {
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
}
100% {
-webkit-transform: translateX(-1000px);
transform: translateX(-1000px);
opacity: 0;
}
}
@keyframes slide-out-left {
0% {
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
}
100% {
-webkit-transform: translateX(-1000px);
transform: translateX(-1000px);
opacity: 0;
}
}
@-webkit-keyframes slide-out-right {
0% {
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
}
100% {
-webkit-transform: translateX(1000px);
transform: translateX(1000px);
opacity: 0;
}
}
@keyframes slide-out-right {
0% {
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
}
100% {
-webkit-transform: translateX(1000px);
transform: translateX(1000px);
opacity: 0;
}
}

View File

@ -0,0 +1,142 @@
var gcObject = {
options: options = {
dayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
dayBegin: 1,
monthNames: [],
onPrevMonth: function (e) {},
onNextMonth: function (e) {},
events: [{
date: null,
eventName: null,
className: null,
onclick: function (e, t) {},
dateColor: "#38385c"
}],
onclickDate: function (e, t) {},
nextIcon: "&gt;",
prevIcon: "&lt;"
},
el: "",
eventAnimate: "none",
pickedDate: new Date,
setDate(e) {
const t = new Date(e);
t != this.pickedDate && (t > this.pickedDate ? this.eventAnimate = "next" : this.eventAnimate = "prev", this.pickedDate = t, this.render())
},
setEvents(e) {
this.options.events = e, this.render()
},
prevMonth() {
this.pickedDate = new Date(this.pickedDate.getFullYear(), this.pickedDate.getMonth() - 2, 1), this.options.onPrevMonth(this.pickedDate), this.eventAnimate = "prev", this.render()
},
nextMonth() {
this.pickedDate = new Date(this.pickedDate.getFullYear(), this.pickedDate.getMonth(), 1), this.options.onNextMonth(this.pickedDate), this.eventAnimate = "next", this.render()
},
render() {
const e = $(this.el);
e.html("");
const t = $('<div class="gc-calendar"></div>');
e.append(t);
const n = $('<div class="gc-calendar-header"></div>');
n.appendTo(t);
const a = $('<span class="gc-calendar-month-year"></span>');
a.appendTo(n);
$(`<span class='month'>${this.options.monthNames[this.pickedDate.getMonth()]}</span>`).appendTo(a);
$(`<span class='year'> ${this.pickedDate.getFullYear()}</span>`).appendTo(a);
const o = $(`<button type="button" class='prev'>${this.options.prevIcon}</button>`);
o.appendTo(n), o.on("click", (function (e) {
gcObject.prevMonth()
}));
const s = $(`<button type="button" class='next'>${this.options.nextIcon}</button>`);
s.appendTo(n), s.on("click", (function (e) {
gcObject.nextMonth()
}));
const i = $('<table class="calendar"></table>');
i.removeClass("slide-in-left slide-in-right slide-out-left slide-out-right"), "none" == this.eventAnimate ? i.hide().addClass("slide-in-left").show() : "prev" == this.eventAnimate ? i.hide().addClass("slide-out-right").show().delay(200).hide().removeClass("slide-out-right").addClass("slide-in-left").show() : i.hide().addClass("slide-out-left").show().delay(200).hide().removeClass("slide-out-left").addClass("slide-in-right").show(), i.appendTo(t);
const c = $("<thead></thead>");
c.appendTo(i);
const d = $("<tr></tr>");
d.appendTo(c);
const l = this.options.dayNames.length;
for (let e = 0; e < l; e++) {
var h = e + gcObject.options.dayBegin;
h >= l && (h -= l);
const t = gcObject.options.dayNames[h];
$('<th class="dayname">' + t + "</th>").appendTo(d)
}
var r = $("<tbody></tbody>");
r.appendTo(i);
const p = this.getCalendarArray(),
g = new Date;
p.forEach((function (e) {
var t = $("<tr></tr>");
e.forEach((function (e) {
var n = $('<td class="day"></td>');
n.appendTo(t);
var a = $('<a type="button" class="btn-gc-cell"></a>');
n.append(a), a.click((function (t) {
gcObject.options.onclickDate(t, e)
}));
var o = $(`<span class="day-number">${e.date}</span>`);
n.addClass(e.class), o.appendTo(a), g.getFullYear() == e.datejs.getFullYear() && g.getMonth() == e.datejs.getMonth() && g.getDate() == e.datejs.getDate() && a.addClass("today");
var s = "";
gcObject.options.events.forEach((function (t) {
if (t.date.getFullYear() == e.datejs.getFullYear() && t.date.getMonth() == e.datejs.getMonth() && t.date.getDate() == e.datejs.getDate()) {
n.addClass("event");
var a = $(`<div class="gc-event ${t.className}">${t.eventName}</div>`);
s = "color:" + (t.dateColor || "inherit"), a.on("click", (function (e) {
t.onclick(e, t)
})), n.append(a)
}
})), o.attr("style", s)
})), t.appendTo(r)
}))
},
getCalendarArray() {
var e = new Date(this.pickedDate.getFullYear(), this.pickedDate.getMonth(), 1).getDay(),
t = new Date(this.pickedDate.getFullYear(), this.pickedDate.getMonth() + 1, 0).getDate(),
n = new Date(this.pickedDate.getFullYear(), this.pickedDate.getMonth(), 0).getDate(),
a = [],
o = e - gcObject.options.dayBegin;
o < 0 && (o = 7 + o);
for (let e = 0; e < o; e++) a.push({
datejs: new Date(this.pickedDate.getFullYear(), this.pickedDate.getMonth() - 1, n),
date: n,
class: "prev-month"
}), n--;
a.reverse();
var s = 1;
for (let e = a.length; e < 7; e++) a.push({
datejs: new Date(this.pickedDate.getFullYear(), this.pickedDate.getMonth(), s),
date: s,
class: "current-month"
}), s++;
var i = [a],
c = !1,
d = this.pickedDate,
l = "current-month";
for (let e = 1; e < 6; e++) {
var h = [];
for (let e = 0; e < 7; e++) h.push({
datejs: new Date(d.getFullYear(), d.getMonth(), s),
date: s,
class: l
}), ++s > t && (s = 1, d.setDate(1), d.setMonth(d.getMonth() + 1), c = !0, l = "next-month");
if (i.push(h), c) break
}
return i
}
};
jQuery.fn.calendarGC = function (e = {
dayNames: dayNames,
dayBegin: dayBegin,
monthNames: monthNames,
onPrevMonth: onPrevMonth,
onNextMonth: onNextMonth,
events: events,
onclickDate: onclickDate,
nextIcon: "&gt;",
prevIcon: "&lt;"
}) {
return gcObject.options.dayNames = e.dayNames || ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], gcObject.options.dayBegin = void 0 === e.dayBegin || null === e.dayBegin ? 1 : e.dayBegin, gcObject.options.monthNames = e.monthNames || ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], gcObject.options.onPrevMonth = e.onPrevMonth || function (e) {}, gcObject.options.onNextMonth = e.onNextMonth || function (e) {}, gcObject.options.events = e.events || [], gcObject.options.onclickDate = e.onclickDate || function (e, t) {}, gcObject.options.nextIcon = e.nextIcon || "&gt;", gcObject.options.prevIcon = e.prevIcon || "&lt;", gcObject.el = this, gcObject.render(), gcObject
};

View File

@ -0,0 +1,4 @@
[
"calendar-gc.min.css",
"calendar-gc.min.js"
]

22
agenda/view/add/add.css Normal file
View File

@ -0,0 +1,22 @@
/**
* 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-2024, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.fr/
*/
/** NE PAS EFFACER
* admin.css
*/
.cp-color-picker {
z-index: 100;
}

View File

@ -0,0 +1,11 @@
$(document).ready(function() {
// Ajoute un événement sur le changement de l'état de la checkbox agendaAddAllDay
$('#agendaAddAllDay').on('change', function() {
if ($(this).is(':checked')) {
$('#agendaAddTime').val('');
$('#agendaAddTimeWrapper').slideUp(); // Masque avec un effet de slide
} else {
$('#agendaAddTimeWrapper').slideDown(); // Affiche avec un effet de slide
}
});
});

60
agenda/view/add/add.php Normal file
View File

@ -0,0 +1,60 @@
<?php echo template::formOpen('agendaAddForm'); ?>
<div class="row">
<div class="col1">
<?php echo template::button('agendaAddBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
'value' => template::ico('left')
]); ?>
</div>
<div class="col2 offset9">
<?php echo template::submit('agendaAddSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4><?