diff --git a/CHANGES.md b/CHANGES.md index 092f702..80913a1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,16 @@ # Changelog +## Version 4.3.07 de Deltacms +- Modifications : + - Configuration / Thème / Header : nouvelle option bannière visible uniquement sur la page d'accueil, +- Correction : + - Snipcart : modification dans Core / Page / Edition pour compatibilité avec ce module, + - Agenda 5.4 : correction d'un bug critique lié à la limitation des droits liés aux évènements, mise à jour indispensable, + - Configuration / Thème / Header : correction de plusieurs bugs notamment pour l'affichage en mode aperçu. + ## Version 4.3.06 de Deltacms - Corrections : - - Personnalisation des thémes : color picker absent du paramétrage de la bannière et du footer. + -¨Personnalisation des thémes : color picker absent du paramétrage de la bannière et du footer. ## Version 4.3.05 de Deltacms - Modifications : diff --git a/README.md b/README.md index a3872de..00b162f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# DeltaCMS 4.3.06 +# DeltaCMS 4.3.07 DeltaCMS est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation. L'administration du site est bilingue anglais ou français, le site peut être rédigé dans une des principales langues européennes. diff --git a/core/core.php b/core/core.php index 5ac997a..f8e4bae 100644 --- a/core/core.php +++ b/core/core.php @@ -48,7 +48,7 @@ class common { // Numéro de version const DELTA_UPDATE_URL = 'https://update.deltacms.fr/master/'; - const DELTA_VERSION = '4.3.06'; + const DELTA_VERSION = '4.3.07'; const DELTA_UPDATE_CHANNEL = "v4"; public static $actions = []; @@ -2388,7 +2388,8 @@ class core extends common { // Bannière au contenu personnalisé if ($this->getData(['theme','header','feature']) === 'feature' ) { // Hauteur de la taille du contenu perso - $css .= 'header {height:'. $this->getData(['theme', 'header', 'height']) . '; min-height:' . $this->getData(['theme', 'header', 'height']) . ';overflow: hidden;}'; + // $css .= 'header {height:'. $this->getData(['theme', 'header', 'height']) . '; min-height:' . $this->getData(['theme', 'header', 'height']) . ';overflow: hidden;}'; + $css .= 'header {height:'. $this->getData(['theme', 'header', 'height']) . '; min-height:20px;overflow: hidden;}'; //$css .= '.bannerDisplay img { width: auto;max-height:' . $this->getData(['theme', 'header', 'height']) . ';}'; } diff --git a/core/include/update.inc.php b/core/include/update.inc.php index 5eaaaf0..f92935d 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -60,8 +60,10 @@ if ($this->getData(['core', 'dataVersion']) < 4202) { $this->setData(['core', 'dataVersion', 4202]); } -if ($this->getData(['core', 'dataVersion']) < 4306) { +if ($this->getData(['core', 'dataVersion']) < 4307) { + $this->setData(['theme', 'header', 'homePageOnly', false]); + $this->setData(['theme', 'header', 'heightSelect', $this->getData(['theme', 'header', 'height']) ]); // Mise à jour - $this->setData(['core', 'dataVersion', 4306]); + $this->setData(['core', 'dataVersion', 4307]); } ?> diff --git a/core/layout/common.css b/core/layout/common.css index 0a58f6e..42ccf95 100644 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -106,6 +106,11 @@ a:active { outline: none; } +/* pour rendre toute la bannière cliquable */ +a.headertitle { + display: block; +} + /* Titres */ h1 { font-size: 1.8em; diff --git a/core/layout/main.php b/core/layout/main.php index 198a25a..8501baa 100644 --- a/core/layout/main.php +++ b/core/layout/main.php @@ -103,15 +103,19 @@ if( $this->getInput('DELTA_I18N_SITE') !== '' && $this->getInput('DELTA_I18N_SIT + getUrl(0) !== 'theme' ){ + if( $this->getUrl(0) !== $this->getData(['locale', 'homePageId' ]) && $this->getData(['theme','header','homePageOnly']) === true) $homePageOnly = true; + }?> getData(['theme', 'header', 'position']) === 'body'): ?> getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : ''; + $headerClass = ($this->getData(['theme', 'header', 'position']) === 'hide' || $homePageOnly === true) ? 'displayNone' : ''; $headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : ''; $headerClass .= $this->getData(['theme', 'header', 'wide']) === 'none' ? '' : 'container'; ?>
> - getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '' : ''; ?> getData(['theme','header','feature']) === 'wallpaper' ): ?> + getData(['theme','header','linkHomePage']) ) ? '' : ''; ?> getData(['theme', 'header', 'textHide']) === false // Affiche toujours le titre de la bannière pour l'édition du thème @@ -121,13 +125,14 @@ if( $this->getInput('DELTA_I18N_SITE') !== '' && $this->getInput('DELTA_I18N_SIT   + getData(['theme','header','linkHomePage']) ) ? '' : ''; ?>
getData(['theme','header','featureContent']);?>
- getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '' : ''; ?> + @@ -169,13 +174,13 @@ if( $this->getInput('DELTA_I18N_SITE') !== '' && $this->getInput('DELTA_I18N_SIT ) ): ?> - getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '' : ''; ?> getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : ''; + $headerClass = ($this->getData(['theme', 'header', 'position']) === 'hide' || $homePageOnly === true) ? 'displayNone' : ''; $headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : ''; ?>
> getData(['theme','header','feature']) === 'wallpaper' ): ?> + getData(['theme','header','linkHomePage']) ) ? '' : ''; ?> getData(['theme', 'header', 'textHide']) === false // Affiche toujours le titre de la bannière pour l'édition du thème @@ -185,14 +190,14 @@ if( $this->getInput('DELTA_I18N_SITE') !== '' && $this->getInput('DELTA_I18N_SIT   + getData(['theme','header','linkHomePage']) ) ? '' : ''; ?>
getData(['theme','header','featureContent']);?> -
+
- getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '' : ''; ?> - + getData(['theme', 'menu', 'position']) === 'site-second' || $this->getData(['theme', 'menu', 'position']) === 'site' diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index 1d710ef..74e6fdc 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -70,7 +70,7 @@ class init extends common { ] ], 'core' => [ - 'dataVersion' => 4306, + 'dataVersion' => 4307, 'lastBackup' => 0, 'lastClearTmp' => 0, 'lastAutoUpdate' => 0, @@ -321,6 +321,7 @@ class init extends common { 'fontSize' => '2em', 'fontWeight' => 'normal', 'height' => '200px', + 'heightSelect' => '200px', 'image' => 'theme/defaut/banniere_1500x200.jpg', 'imagePosition' => 'center center', 'imageRepeat' => 'no-repeat', @@ -335,7 +336,8 @@ class init extends common { 'tinyHidden' => true, 'feature' => 'wallpaper', 'featureContent' => '

Bannière vide

', - 'width' => 'container' + 'width' => 'container', + 'homePageOnly' => false ], 'menu' => [ 'backgroundColor' => 'rgba(32, 59, 82, 0.85)', diff --git a/core/module/install/ressource/themes/theme_default.zip b/core/module/install/ressource/themes/theme_default.zip index 0e04a2c..4bc9e6c 100644 Binary files a/core/module/install/ressource/themes/theme_default.zip and b/core/module/install/ressource/themes/theme_default.zip differ diff --git a/core/module/install/ressource/themes/theme_hirondelles_960px.zip b/core/module/install/ressource/themes/theme_hirondelles_960px.zip index e86352f..9b85b73 100644 Binary files a/core/module/install/ressource/themes/theme_hirondelles_960px.zip and b/core/module/install/ressource/themes/theme_hirondelles_960px.zip differ diff --git a/core/module/install/ressource/themes/theme_montagne_960px.zip b/core/module/install/ressource/themes/theme_montagne_960px.zip index 4e0921c..e43e66e 100644 Binary files a/core/module/install/ressource/themes/theme_montagne_960px.zip and b/core/module/install/ressource/themes/theme_montagne_960px.zip differ diff --git a/core/module/install/ressource/themes/theme_sansbanniere_fluide.zip b/core/module/install/ressource/themes/theme_sansbanniere_fluide.zip index fce41fa..49ef8b4 100644 Binary files a/core/module/install/ressource/themes/theme_sansbanniere_fluide.zip and b/core/module/install/ressource/themes/theme_sansbanniere_fluide.zip differ diff --git a/core/module/page/view/edit/edit.php b/core/module/page/view/edit/edit.php index ae1f98d..5570f54 100644 --- a/core/module/page/view/edit/edit.php +++ b/core/module/page/view/edit/edit.php @@ -9,7 +9,11 @@ var lang_flatpickr = ""; '; -echo ''; +if ($this->getData(['page', $this->getUrl(2), 'moduleId']) === 'snipcart' ){ + echo ''; +} else { + echo ''; +} echo ''; echo template::formOpen('pageEditForm'); ?> diff --git a/core/module/theme/lang/en/lex_theme.php b/core/module/theme/lang/en/lex_theme.php index fc82c15..d2795ab 100644 --- a/core/module/theme/lang/en/lex_theme.php +++ b/core/module/theme/lang/en/lex_theme.php @@ -134,7 +134,7 @@ $text['core_theme_view']['header'][2] = 'Settings'; $text['core_theme_view']['header'][3] = 'Position'; $text['core_theme_view']['header'][4] = 'Type of content'; $text['core_theme_view']['header'][5] = 'Maximum height'; -$text['core_theme_view']['header'][6] = 'The maximum height is 600 pixels, even if the selected image size is larger.
When the adaptation is set to Responsive, the height decreases in proportion to the width.'; +$text['core_theme_view']['header'][6] = 'The maximum height is 600 pixels, even if the selected image size is larger.'; $text['core_theme_view']['header'][7] = 'Width'; $text['core_theme_view']['header'][8] = 'Hide banner in small screen'; $text['core_theme_view']['header'][9] = 'Align banner with content'; @@ -152,7 +152,7 @@ $text['core_theme_view']['header'][20] = 'Character case'; $text['core_theme_view']['header'][21] = 'Proportional to that defined in the site'; $text['core_theme_view']['header'][22] = 'Content alignment'; $text['core_theme_view']['header'][23] = 'Wallpaper'; -$text['core_theme_view']['header'][24] = 'Select an image with the following recommended dimensions'; +$text['core_theme_view']['header'][24] = 'Select an image, tips in the documentation'; $text['core_theme_view']['header'][25] = 'Image'; $text['core_theme_view']['header'][26] = 'Repeat'; $text['core_theme_view']['header'][27] = 'Adaptation'; @@ -164,6 +164,7 @@ $text['core_theme_view']['header'][32] = ' | ratio : '; $text['core_theme_view']['header'][33] = 'Custom content'; $text['core_theme_view']['header'][34] ='Save'; $text['core_theme_view']['header'][35] = "Height of the selected image ("; +$text['core_theme_view']['header'][36] = "Banner only visible on the home page"; $text['core_theme_view']['index'][0] = 'Click on an area to access its customisation options. You can also display hidden areas using the button below'; $text['core_theme_view']['index'][1] = 'Home'; $text['core_theme_view']['index'][2] = 'Help'; @@ -370,7 +371,7 @@ $headerFontSizes = [ '2.4vmax' => 'Very large (240%)' ]; $headerHeights = [ - 'unset' => 'Free', // texte dynamique cf header.js.php + 'unset' => 'Content height', '100px' => 'Very small (100px) ', '150px' => 'Small (150px)', '200px' => 'Medium (200px)', diff --git a/core/module/theme/lang/fr/lex_theme.php b/core/module/theme/lang/fr/lex_theme.php index 745d8af..2edb1b2 100644 --- a/core/module/theme/lang/fr/lex_theme.php +++ b/core/module/theme/lang/fr/lex_theme.php @@ -134,7 +134,7 @@ $text['core_theme_view']['header'][2] = 'Paramètres'; $text['core_theme_view']['header'][3] = 'Position'; $text['core_theme_view']['header'][4] = 'Nature de contenu'; $text['core_theme_view']['header'][5] = 'Hauteur maximale'; -$text['core_theme_view']['header'][6] = 'La hauteur maximale est de 600 pixels, même si les dimensions de l\'image sélectionnée sont supérieures.
Lorsque l\'adaptation est positionnée sur Responsive, la hauteur diminue proportionnellement à la largeur.'; +$text['core_theme_view']['header'][6] = 'La hauteur maximale est de 600 pixels, même si les dimensions de l\'image sélectionnée sont supérieures.'; $text['core_theme_view']['header'][7] = 'Largeur'; $text['core_theme_view']['header'][8] = 'Masquer la bannière en écran réduit'; $text['core_theme_view']['header'][9] = 'Aligner la bannière avec le contenu'; @@ -152,7 +152,7 @@ $text['core_theme_view']['header'][20] = 'Casse'; $text['core_theme_view']['header'][21] = 'Proportionnelle à celle définie dans le site.'; $text['core_theme_view']['header'][22] = 'Alignement du contenu'; $text['core_theme_view']['header'][23] = 'Papier peint'; -$text['core_theme_view']['header'][24] = 'Sélectionner une image aux dimensions recommandées ci-dessous'; +$text['core_theme_view']['header'][24] = 'Sélectionner une image, conseils dans la documentation'; $text['core_theme_view']['header'][25] = 'Image'; $text['core_theme_view']['header'][26] = 'Répétition'; $text['core_theme_view']['header'][27] = 'Adaptation'; @@ -164,6 +164,7 @@ $text['core_theme_view']['header'][32] = ' | ratio : '; $text['core_theme_view']['header'][33] = 'Contenu personnalisé'; $text['core_theme_view']['header'][34] ='Enregistrer'; $text['core_theme_view']['header'][35] = "Hauteur de l\'image sélectionnée ("; +$text['core_theme_view']['header'][36] = "Bannière visible uniquement sur la page d'accueil"; $text['core_theme_view']['index'][0] = 'Cliquez sur une zone afin d\'accéder à ses options de personnalisation. Vous pouvez également afficher les zones cachées à l\'aide du bouton ci-dessous.'; $text['core_theme_view']['index'][1] = 'Accueil'; $text['core_theme_view']['index'][2] = 'Aide'; @@ -369,7 +370,7 @@ $headerFontSizes = [ '2.4vmax' => 'Très grande (240%)' ]; $headerHeights = [ - 'unset' => 'Libre', // texte dynamique cf header.js.php + 'unset' => 'Hauteur du contenu', '100px' => 'Très petite (100px) ', '150px' => 'Petite (150px)', '200px' => 'Moyenne (200px)', diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index c07f1cb..8fb5379 100644 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -434,7 +434,7 @@ class theme extends common { 'font' => $this->getInput('themeHeaderFont'), 'fontSize' => $this->getInput('themeHeaderFontSize'), 'fontWeight' => $this->getInput('themeHeaderFontWeight'), - 'height' => $this->getInput('themeHeaderHeight'), + 'heightSelect' => $this->getInput('themeHeaderHeight'), 'wide' => $this->getInput('themeHeaderWide'), 'image' => $this->getInput('themeHeaderImage'), 'imagePosition' => $this->getInput('themeHeaderImagePosition'), @@ -449,7 +449,8 @@ class theme extends common { 'imageContainer' => $this->getInput('themeHeaderImageContainer'), 'tinyHidden' => $this->getInput('themeHeaderTinyHidden', helper::FILTER_BOOLEAN), 'feature' => $this->getInput('themeHeaderFeature'), - 'featureContent' => $featureContent + 'featureContent' => $featureContent, + 'homePageOnly' => $this->getInput('themeHeaderHomePageOnly', helper::FILTER_BOOLEAN) ]]); // Modification de la position du menu selon la position de la bannière if ( $this->getData(['theme','header','position']) == 'site' ) @@ -466,6 +467,20 @@ class theme extends common { ) { $this->setData(['theme', 'menu', 'position','site']); } + // Suppression de l'image en contenu personnalisé + if( $this->getData(['theme','header','feature']) == 'feature'){ + $this->setData(['theme','header', 'image',""]); + } + // Application de la hauteur de l'image sélectionnée si hauteur de l'image sur hauteur du contenu + if( $this->getData(['theme', 'header', 'feature']) ==='wallpaper' && + $this->getData(['theme', 'header', 'image']) !== '' && + $this->getData(['theme', 'header', 'heightSelect']) === 'unset' ){ + $infoImage = getimagesize( self::FILE_DIR.'source/'. $this->getData(['theme', 'header', 'image']) ); + $this->setData(['theme', 'header', 'height', $infoImage[1]."px"]); + } else { + // Si pas d'image ou bannière personnalisée + $this->setData(['theme', 'header', 'height', $this->getData(['theme', 'header', 'heightSelect']) ]); + } // Valeurs en sortie $this->addOutput([ diff --git a/core/module/theme/view/header/header.css b/core/module/theme/view/header/header.css index 1ae84fd..ab378e8 100644 --- a/core/module/theme/view/header/header.css +++ b/core/module/theme/view/header/header.css @@ -27,4 +27,8 @@ text-transform: none; font-size: 1.0em; margin: 10px; +} + +#site { + overflow: visible; } \ No newline at end of file diff --git a/core/module/theme/view/header/header.js.php b/core/module/theme/view/header/header.js.php index 2d7a728..4ee9cb9 100644 --- a/core/module/theme/view/header/header.js.php +++ b/core/module/theme/view/header/header.js.php @@ -13,8 +13,12 @@ * @author Frédéric Tempez * @copyright Copyright (C) 2018-2021, Frédéric Tempez */ + - $(document).ready(function(){ +var tmpImg = new Image(); + + +$(document).ready(function(){ $("header").css("line-height", ""); $("header").css("height", ""); }); @@ -28,73 +32,49 @@ $("input, select").on("change", function() { // Contenu perso if ($("#themeHeaderFeature").val() == "feature") { - - css = "header{min-height: " + $("#themeHeaderHeight").val() + ";height:" + $("#themeHeaderHeight").val() + "; overflow:hidden; background-position:top; background-repeat: no-repeat; line-height:1.15; background-color:unset; background-image:unset; text-align:unset;}"; + // $("#themeHeaderHeight").val() unset pour 'Hauteur du contenu', sinon valeur en px + css = "header{min-height: 20px; height:" + $("#themeHeaderHeight").val() + "; overflow:hidden; background-position:top; background-repeat: no-repeat; line-height:1.15; background-color:unset; background-image:unset; text-align:unset;}"; $("#featureContent").appendTo("header").show(); $("#themeHeaderTitle").hide(); - - // Modifier le texte du sélecteur de hauteur - $("#themeHeaderHeight option:eq(0)").text("Hauteur du contenu personnalisé"); - } // Couleurs, image, alignement et hauteur de la bannière if ($("#themeHeaderFeature").val() == "wallpaper") { - + // Masque le contenu perso $("#featureContent").hide(); - // Récupérer la taille de l'image - var tmpImg = new Image(); + + tmpImg.src= "" + "site/file/source/" + $("#themeHeaderImage").val(); + // Déterminer la taille de l'image tmpImg.onload = function() { // Informations affichées $("#themeHeaderImageHeight").html(tmpImg.height + "px"); $("#themeHeaderImageWidth").html(tmpImg.width + "px"); $("#themeHeaderImageRatio").html(tmpImg.width / tmpImg.height); - - // Limiter la hauteur à 600 px - if (tmpImg.height > 600) { - tmpImgHeight = 600; - } else { - tmpImgHeight = tmpImg.height; - } - - //Modifier la dropdown liste si une image n'est pas sélectionnée - if ($("#themeHeaderImage").val() !== "" ) { - // Une image est ajoutée ou changée - if ($("#themeHeaderHeight option").length === 5) { - // Pas d'image précédemment on ajoute l'option - $("#themeHeaderHeight ").prepend(''); - } - // Modifier la valeur - $("#themeHeaderHeight option:eq(0)").val(tmpImgHeight + "px"); - // Modifier l'option - $("#themeHeaderHeight option:eq(0)").html( textOption + tmpImgHeight + "px)"); - } }; - - if ($("#themeHeaderImage").val() === "" && - $("#themeHeaderHeight option").length === 6 ) { - $("#themeHeaderHeight option:eq(0)").remove(); - } - - tmpImg.src= "" + "site/file/source/" + $("#themeHeaderImage").val(); - + var headerFont = $("#themeHeaderFont").val(); - - css = "header{text-align:" + $("#themeHeaderTextAlign").val() + ";"; - if ($("#themeHeaderImage").val()) { - // Une image est sélectionnée - css += "background-image:url('site/file/source/" + $("#themeHeaderImage").val() + "');background-repeat:" + $("#themeHeaderImageRepeat").val() + ";background-position:" + $("#themeHeaderImagePosition").val() + ";"; - css += "background-size:" + $("#themeHeaderImageContainer").val() + ";"; - // Pas d'image sélectionnée + css = "header{text-align:" + $("#themeHeaderTextAlign").val() + ";"; + + // Sélection d'une image réalisée + if( $("#themeHeaderImage").val() !== ""){ + + css += "background-image:url('site/file/source/" + $("#themeHeaderImage").val() + "');background-repeat:" + $("#themeHeaderImageRepeat").val() + ";background-position:" + $("#themeHeaderImagePosition").val() + ";"; + css += "background-size:" + $("#themeHeaderImageContainer").val() + ";"; + if( $("#themeHeaderHeight").val() !== 'unset'){ + css += "line-height:" + $("#themeHeaderHeight").val() + ";height:" + $("#themeHeaderHeight").val() + "}"; } else { - // Désactiver l'option responsive - css += "background-image:none;"; + // valeur unset remplacée par la hauteur de l'image + tmpImg.src= "" + "site/file/source/" + $("#themeHeaderImage").val(); + css += "line-height:" + tmpImg.height + "px" + ";height:" + tmpImg.height + "px" + "}"; } - css += "line-height:" + $("#themeHeaderHeight").val() + ";height:" + $("#themeHeaderHeight").val() + "}"; - + } else { + // Pas d'image sélectionnée + css += "background-image:none;"; + css += "min-height: 20px;line-height:" + $("#themeHeaderHeight").val() + "; height:" + $("#themeHeaderHeight").val() + "}"; + } // Taille, couleur, épaisseur et capitalisation du titre de la bannière css += "header span{font-family:'" + headerFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeHeaderFontWeight").val() + ";font-size:" + $("#themeHeaderFontSize").val() + ";text-transform:" + $("#themeHeaderTextTransform").val() + ";color:" + $("#themeHeaderTextColor").val() + "}"; @@ -118,8 +98,8 @@ $("input, select").on("change", function() { switch(positionHeader) { case 'hide': - $("header").hide(); $("nav").show().prependTo("#site"); + $("header").hide(); break; case 'site': $("header").show().prependTo("#site"); @@ -210,7 +190,7 @@ $("#themeHeaderImage").on("change", function() { } else { $("#themeHeaderImageOptions").slideUp(function() { - $("#themeHeaderTextHide").prop("checked", false).trigger("change"); + // $("#themeHeaderTextHide").prop("checked", false).trigger("change"); }); } }).trigger("change"); @@ -244,9 +224,11 @@ $("#themeHeaderPosition").on("change", function() { $("#themeHeaderPosition").on("change", function() { if($(this).val() === 'hide') { $("#themeHeaderSmallDisplay").slideUp(); + $("#themeHeaderHomePage").slideUp(); } else { $("#themeHeaderSmallDisplay").slideDown(); + $("#themeHeaderHomePage").slideDown(); } }).trigger("change"); diff --git a/core/module/theme/view/header/header.php b/core/module/theme/view/header/header.php index 93c37ef..69e4e9e 100644 --- a/core/module/theme/view/header/header.php +++ b/core/module/theme/view/header/header.php @@ -60,17 +60,18 @@ echo template::formOpen('themeHeaderForm');
$text['core_theme_view']['header'][5], - 'selected' => $this->getData(['theme', 'header', 'height']), + 'selected' => $this->getData(['theme', 'header', 'heightSelect']), 'help' => $text['core_theme_view']['header'][6] ]); ?>
-
- $text['core_theme_view']['header'][7], - 'selected' => $this->getData(['theme', 'header', 'wide']) - ]); ?> +
+
+ $this->getData(['theme', 'header', 'homePageOnly']) + ]); ?> +
@@ -87,6 +88,16 @@ echo template::formOpen('themeHeaderForm');
+ +
+
+ $text['core_theme_view']['header'][7], + 'selected' => $this->getData(['theme', 'header', 'wide']) + ]); ?> +
+
+
@@ -237,5 +248,5 @@ echo template::formOpen('themeHeaderForm'); \ No newline at end of file diff --git a/module/agenda/agenda.php b/module/agenda/agenda.php index 98fb03f..b9e70f4 100644 --- a/module/agenda/agenda.php +++ b/module/agenda/agenda.php @@ -36,7 +36,7 @@ class agenda extends common { 'index' => self::GROUP_VISITOR ]; - const VERSION = '5.3'; + const VERSION = '5.4'; const REALNAME = 'Agenda'; const DELETE = true; const UPDATE = '4.1'; @@ -116,9 +116,9 @@ class agenda extends common { copy( './module/agenda/ressource/file/source/agenda/adresses/.htaccess', './site/file/source/agenda/adresses/.htaccess'); $this->setData(['module', $this->getUrl(0), 'config', 'versionData','5.2']); } - // Mise à jour vers la version 5.3 - if (version_compare($this->getData(['module', $this->getUrl(0), 'config', 'versionData']), '5.3', '<') ) { - $this->setData(['module', $this->getUrl(0), 'config', 'versionData','5.3']); + // Mise à jour vers la version 5.4 + if (version_compare($this->getData(['module', $this->getUrl(0), 'config', 'versionData']), '5.4', '<') ) { + $this->setData(['module', $this->getUrl(0), 'config', 'versionData','5.4']); } } @@ -628,7 +628,6 @@ class agenda extends common { else{ self::$liste_adresses= array_combine(self::$liste_adresses,self::$liste_adresses); } - $this->limite_groupes(); // Tableau des catégories if( is_file(self::DATAMODULE.'categories/categories.json') && $this->getData(['module', $this->getUrl(0), 'categories', 'valCategories' ]) ){ $json = file_get_contents(self::DATAMODULE.'categories/categories.json'); @@ -756,7 +755,6 @@ class agenda extends common { self::$categorie[$key] = $tabcat[$key]['name']; } } - $this->limite_groupes(); if( $this->getUser('group') >= self::$evenement['groupe_mod']){ // Affichage de la page édition d'un évènement avec les valeurs actuelles @@ -1082,26 +1080,6 @@ class agenda extends common { } return $json; } - - /* Limitation des choix pour les groupes lecture et modification avant création ou édition - */ - private function limite_groupes() { - //Modification du tableau self::$groupe si case cochée en configuration - if ($this->getData(['module', $this->getUrl(0), 'config', 'droit_limite']) - && $this->getUser('group') >= self::$evenement['groupe_mod']){ - switch ($this->getUser('group')) { - case 0 : - array_splice(self::$groupe,1); - break; - case 1 : - array_splice(self::$groupe,2); - break; - case 2 : - array_splice(self::$groupe,3); - break; - } - } - } /* * Extraction des données de la chaîne url et détection de changement de vue diff --git a/module/agenda/view/creation/creation.php b/module/agenda/view/creation/creation.php index a58b001..2b998f2 100644 --- a/module/agenda/view/creation/creation.php +++ b/module/agenda/view/creation/creation.php @@ -12,6 +12,25 @@ echo ''; echo ''; +// $this->getUser('group') renvoie false pour un visiteur ! +$userGroup = $this->getUser('group'); +if( $userGroup === false) $userGroup = 0; + +//Modification du tableau $groupe si l'option "limitation du choix des groupes liés aux évènements" est cochée +if ( $this->getData(['module', $this->getUrl(0), 'config', 'droit_limite']) ){ + switch ($userGroup) { + case 0 : + array_splice($groupe,1); + break; + case 1 : + array_splice($groupe,2); + break; + case 2 : + array_splice($groupe,3); + break; + } +} + echo template::formOpen('creation_events'); ?>
diff --git a/module/agenda/view/edition/edition.php b/module/agenda/view/edition/edition.php index f547358..d2443c5 100644 --- a/module/agenda/view/edition/edition.php +++ b/module/agenda/view/edition/edition.php @@ -12,10 +12,9 @@ var lang_flatpickr = ""; echo ''; echo ''; echo ''; -?> - -getUser('group') >= $module::$evenement['groupe_mod'] ){ +// Adaptation de Tinymce en fonction des droits des utilisateurs +if( $this->getUser('group') >= $module::$evenement['groupe_mod'] ){ if( $this->getUser('group') >= 2){ $class_tinymce = 'editorWysiwyg'; } @@ -23,9 +22,27 @@ echo 'getData(['module', $this->getUrl(0), 'config', 'droit_limite']) ){ + switch ($userGroup) { + case 0 : + array_splice($groupe,1); + break; + case 1 : + array_splice($groupe,2); + break; + case 2 : + array_splice($groupe,3); + break; + } +} + +echo template::formOpen('edition_events'); ?>