diff --git a/CHANGES.md b/CHANGES.md index eb350a3..e9e42a8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Changelog +## Version 4.4.02 de Deltacms +- Modifications : + +- Corrections : + - gestion des utilisateurs : description des droits éditeur et modérateur + ## Version 4.4.01 de Deltacms - Modifications : - Ajout du groupe éditeur, autorisations limitées à l'édition des pages, l'ajout de fichiers, l'accès aux pages privées membre et éditeur, diff --git a/README.md b/README.md index 9c5eaee..7df596d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# DeltaCMS 4.4.01 +# DeltaCMS 4.4.02 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 c0a4c2d..c2dd202 100644 --- a/core/core.php +++ b/core/core.php @@ -49,7 +49,7 @@ class common { // Numéro de version const DELTA_UPDATE_URL = 'https://update.deltacms.fr/master/'; - const DELTA_VERSION = '4.4.01'; + const DELTA_VERSION = '4.4.02'; const DELTA_UPDATE_CHANNEL = "v4"; public static $actions = []; @@ -2321,13 +2321,13 @@ class core extends common { break; case 'woff2': $format = 'woff2'; - break; + break; } $css .= '@font-face{ font-family: "'. $this->getData(['fonts', $value, 'name' ]) .'"; src: url("'. helper::baseUrl(false). 'site/file/source/fonts/' . $file; $css .= '") format("'. $format . '"); font-weight: normal; font-style: normal;}'; $css .= ' '; } - + } // Fond du body $colors = helper::colorVariants($this->getData(['theme', 'body', 'backgroundColor'])); @@ -2391,18 +2391,18 @@ class core extends common { $css .= '.helpButton span:hover{color:' . $colors['darken'] . '}'; $css .= '.button:active,button[type=\'submit\']:active,.pagination a:active{background-color:' . $colors['veryDarken'] . '}'; $colors = helper::colorVariants($this->getData(['theme', 'title', 'textColor'])); - $css .= 'h1,h2,h3,h4,h5,h6,h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{color:' . $colors['normal'] . ';font-family:"' . $this->getData(['fonts', $this->getData(['theme', 'title', 'font']), 'name']) . '",sans-serif;font-weight:' . $this->getData(['theme', 'title', 'fontWeight']) . ';text-transform:' . $this->getData(['theme', 'title', 'textTransform']) . '}'; + $css .= 'h1,h2,h3,h4,h5,h6,h1 a,h2 a,h3 a,h4 a,h5 a,h6 a,.block .blockTitle{color:' . $colors['normal'] . ';font-family:"' . $this->getData(['fonts', $this->getData(['theme', 'title', 'font']), 'name']) . '",sans-serif;font-weight:' . $this->getData(['theme', 'title', 'fontWeight']) . ';text-transform:' . $this->getData(['theme', 'title', 'textTransform']) . '}'; $css .= 'h1 a:hover,h2 a:hover,h3 a:hover,h4 a:hover,h5 a:hover,h6 a:hover{color:' . $colors['darken'] . '}'; // Les blocs $colors = helper::colorVariants($this->getData(['theme', 'block', 'backgroundTitleColor'])); $css .= '.block {border: 1px solid ' . $this->getdata(['theme','block','borderColor']) . ';background-color: ' . $this->getdata(['theme','block','backgroundColor']) .';border-radius: ' . $this->getdata(['theme','block','blockBorderRadius']) . ';box-shadow :' . $this->getdata(['theme','block','blockBorderShadow']) . ' ' . $this->getdata(['theme','block','borderColor']) . ';}'; - $css .= '.block h4 {background-color:'. $colors['normal'] . ';color:' . $colors['text'] .';border-radius: ' . $this->getdata(['theme','block','blockBorderRadius']) . ' ' . $this->getdata(['theme','block','blockBorderRadius']) . ' 0px 0px;}'; - $css .= '.block p {margin: 0px -5px;}'; + $css .= '.block > h4, .block .blockTitle {background-color:'. $colors['normal'] . ';color:' . $colors['text'] .';border-radius: ' . $this->getdata(['theme','block','blockBorderRadius']) . ' ' . $this->getdata(['theme','block','blockBorderRadius']) . ' 0px 0px;}'; + $css .= '.block > p {margin: 0px -5px;}'; //$css .= '.mce-tinymce {border: 1px solid ' . $this->getdata(['theme','block','borderColor']) .' !important;}'; //Tinymce option titre sous une image valeurs par défaut modifiables dans custom.css $css .= 'figure.image { border-color: ' . $this->getdata(['theme','block','borderColor']) . '; background-color: ' . $this->getdata(['theme','block','backgroundColor']).'}'; - + // Bannière // Eléments communs @@ -2457,15 +2457,15 @@ class core extends common { } $css .= 'nav #burgerText{color:' . $this->getData(['theme','menu','burgerTextColor']) .';font-size:'.$this->getData(['theme','menu','burgerFontSize']) .';}'; // Appliquer au menu les réglages de largeur minimale suivant l'option tous ou pages parent uniquement - - + + foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) { if( $this->getData(['theme', 'menu', 'minWidthParentOrAll']) === true || $childrenPageIds !== [] ){ $css .= 'nav li .' . $parentPageId . '{ min-width : '. $this->getData(['theme', 'menu', 'minWidthTab']) .';}'; } } - - + + // Sous menu $colors = helper::colorVariants($this->getData(['theme', 'menu', 'backgroundColorSub'])); $css .= 'nav .navSub a{background-color:' . $colors['normal'] . '}'; @@ -2510,7 +2510,7 @@ class core extends common { $css .= '#footerSocials{text-align:' . $this->getData(['theme', 'footer', 'socialsAlign']) . '}'; $css .= '#footerText > p {text-align:' . $this->getData(['theme', 'footer', 'textAlign']) . '}'; $css .= '#footerCopyright{text-align:' . $this->getData(['theme', 'footer', 'copyrightAlign']) . '}'; - + // Panneau de consentement aux cookies, d'autres paramètres CSS sont gérés dans common.css $colorRgba = $this->getdata(['theme','block','backgroundColor']); // Suppression de l'opacité pour le panneau cookies @@ -2531,6 +2531,7 @@ class core extends common { header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); } + // Check la mise à jour du theme admin if( $this-> getData(['admin', 'maj']) === true){ // Version @@ -2559,7 +2560,7 @@ class core extends common { break; case 'woff2': $format = 'woff2'; - break; + break; } $css .= '@font-face{ font-family: "'. $value['name'] .'"; src: url("'. helper::baseUrl(false). 'site/file/source/fonts/' . $value['file']; $css .= '") format("'. $format . '"); font-weight: normal; font-style: normal;}'; @@ -2571,8 +2572,8 @@ class core extends common { $colors = helper::colorVariants($this->getData(['admin','backgroundColor'])); $css .= '#site{background-color:' . $colors['normal']. ';}'; $css .= '.row > div {font:' . $this->getData(['admin','fontSize']) . ' "' . $this->getData(['fonts', $this->getData(['admin', 'fontText']), 'name']) . '", sans-serif;}'; - $css .= 'body h1, h2, h3, .block h4, h5, h6 {font-family:' . $this->getData(['fonts', $this->getData(['admin', 'fontTitle']), 'name']) . ', sans-serif;color:' . $this->getData(['admin','colorTitle' ]) . ';}'; - + $css .= 'body h1, h2, h3, .block > h4, .block .blockTitle, h5, h6 {font-family:' . $this->getData(['fonts', $this->getData(['admin', 'fontTitle']), 'name']) . ', sans-serif;color:' . $this->getData(['admin','colorTitle' ]) . ';}'; + // TinyMCE $css .= 'body:not(.editorWysiwyg),span .zwiico-help {color:' . $this->getData(['admin','colorText']) . ';}'; $css .= 'table thead tr, table thead tr .zwiico-help{ background-color:'.$this->getData(['admin','colorText']).'; color:'.$colors['normal'].';}'; @@ -2589,9 +2590,9 @@ class core extends common { $colors = helper::colorVariants($this->getData(['admin','backgroundColorButtonGreen'])); $css .= '.button.buttonGreen, button[type=submit] {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonGreen:hover, button[type=submit]:hover {background-color: ' . $colors['darken'] . ';color: ' . $colors['text'] .';}.button.buttonGreen:active, button[type=submit]:active {background-color: ' . $colors['darken'] . ';color: ' .$colors['text'] .';}'; $colors = helper::colorVariants($this->getData(['admin','backgroundBlockColor'])); - $css .= '.block {border: 1px solid ' . $this->getData(['admin','borderBlockColor']) . ';}.block h4 {background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';}'; + $css .= '.block {border: 1px solid ' . $this->getData(['admin','borderBlockColor']) . ';}.block > h4, .block .blockTitle {background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';}'; // en admin la couleur de fond du block est la couleur de la page admin, on supprime l'ombre et le radius du block définis pour le theme - $css .= '.block {border-radius: 0px;box-shadow: none;}.block h4 {border-radius: 0px;}'; + $css .= '.block {border-radius: 0px;box-shadow: none;}.block > h4, .block .blockTitle {border-radius: 0px;}'; $css .= '.block {background-color: ' . $this->getData(['admin','backgroundColor']) . ';}'; $css .= 'table tr,input[type=email],input[type=text],input[type=password],select:not(#barSelectPage),textarea:not(.editorWysiwyg),.inputFile{background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';border: 1px solid ' . $this->getData(['admin','borderBlockColor']) . ';}'; // Bordure du contour TinyMCE diff --git a/core/include/update.inc.php b/core/include/update.inc.php index e3c2654..74b43e7 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -90,4 +90,9 @@ if ($this->getData(['core', 'dataVersion']) < 4401) { // Mise à jour $this->setData(['core', 'dataVersion', 4401]); } + +if ($this->getData(['core', 'dataVersion']) < 4402) { + // Mise à jour + $this->setData(['core', 'dataVersion', 4402]); +} ?> diff --git a/core/layout/common.css b/core/layout/common.css index d6d6a0d..fef5f17 100644 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -339,7 +339,7 @@ td>.col12 { /* Notice */ .notice { - display: inline-block; + display: inline-block; color: #E74C3C; } /* Mauvaise position dans les champs File*/ @@ -435,7 +435,7 @@ td>.col12 { #bar { text-align: center; /*padding: 0 1;*/ - margin: 0 auto !important; + margin: 0 auto !important; } #bar ul { @@ -641,7 +641,7 @@ nav::before { @media screen and (max-width: 768px) { body>nav { - margin: 0 auto !important; + margin: 0 auto !important; } nav #toggle, @@ -760,7 +760,7 @@ li .menuSideChild { width: 30px; margin: 0 10px 0 -10px; } - + .zwiico-login{ margin-right: 20px; } @@ -871,7 +871,7 @@ footer #footerbody>div { /* Conserve le pied de page sur une ligne */ @media screen and (max-width: 768px) { body>footer { - margin: 0 auto !important; + margin: 0 auto !important; } footer .col4 { @@ -1050,7 +1050,6 @@ footer #footerSocials .zwiico-github:hover { /* Bloc */ .block { - /* border: 1px solid #D8DFE3;*/ padding: 20px 20px 10px; margin: 20px 0; word-wrap: break-word; @@ -1065,15 +1064,13 @@ footer #footerSocials .zwiico-github:hover { margin-bottom: 0; } -.block h4 { +.block > h4, .block .blockTitle { margin: -20px -20px 10px -20px; padding: 10px; - /* background: #ECEFF1;*/ } -.block h4 .openClose { - display: inline-flex; - float: right; +.blockTitle > h1, .blockTitle > h2, .blockTitle > h3, .blockTitle > h4 ,.blockTitle > h5, .blockTitle > p { + margin: 0 -5px; } /* Aides */ diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index b08cd50..019fb5f 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -68,7 +68,7 @@ class init extends common { ] ], 'core' => [ - 'dataVersion' => 4401, + 'dataVersion' => 4402, 'lastBackup' => 0, 'lastClearTmp' => 0, 'lastAutoUpdate' => 0, diff --git a/core/module/install/view/update/update.php b/core/module/install/view/update/update.php index d0a6796..8304681 100644 --- a/core/module/install/view/update/update.php +++ b/core/module/install/view/update/update.php @@ -25,7 +25,7 @@ include('./core/module/install/lang/'. $this->getData(['config', 'i18n', 'langAd
$text['core_install_view']['update'][9], - 'href' => helper::baseUrl() . 'config', + 'href' => helper::baseUrl(false) . 'index.php', 'ico' => 'check', 'class' => 'disabled' ]); ?> diff --git a/core/module/user/lang/en/lex_user.php b/core/module/user/lang/en/lex_user.php index f3c46bb..f55ca05 100644 --- a/core/module/user/lang/en/lex_user.php +++ b/core/module/user/lang/en/lex_user.php @@ -45,7 +45,7 @@ $text['core_user_view']['edit'][8] = 'File sharing allowed'; $text['core_user_view']['edit'][9] = 'This member will be able to upload or download files to the \'partage\' folder and its subfolders'; $text['core_user_view']['edit'][10] = 'Authorisations :'; $text['core_user_view']['edit'][11] = 'Access to private member pages'; -$text['core_user_view']['edit'][12] = 'Access to members\' and editors\' private pages'; +$text['core_user_view']['edit'][12] = 'Access to private member to moderator pages'; $text['core_user_view']['edit'][13] = 'General information'; $text['core_user_view']['edit'][14] = 'Add / Edit / Delete pages'; $text['core_user_view']['edit'][15] = 'Add / Edit / Delete files'; @@ -66,6 +66,9 @@ $text['core_user_view']['edit'][29] = 'Register'; $text['core_user_view']['edit'][30] = 'You cannot change your own group.'; $text['core_user_view']['edit'][31] = 'The username is defined when the account is created and cannot be changed.'; $text['core_user_view']['edit'][32] = 'New password'; +$text['core_user_view']['edit'][33] = 'Edit pages'; +$text['core_user_view']['edit'][34] = 'Add files'; +$text['core_user_view']['edit'][35] = 'Access to private members\' and editors\' pages'; $text['core_user_view']['forgot'][0] = 'Identifier'; $text['core_user_view']['forgot'][1] = 'Back'; $text['core_user_view']['forgot'][2] = 'Validate'; diff --git a/core/module/user/lang/fr/lex_user.php b/core/module/user/lang/fr/lex_user.php index adf01bc..e5cca0c 100644 --- a/core/module/user/lang/fr/lex_user.php +++ b/core/module/user/lang/fr/lex_user.php @@ -45,7 +45,7 @@ $text['core_user_view']['edit'][8] = 'Partage de fichiers autorisé'; $text['core_user_view']['edit'][9] = 'Ce membre pourra téléverser ou télécharger des fichiers dans le dossier \'partage\' et ses sous-dossiers'; $text['core_user_view']['edit'][10] = 'Autorisations :'; $text['core_user_view']['edit'][11] = 'Accès aux pages privées membres'; -$text['core_user_view']['edit'][12] = 'Accès aux pages privées membres et éditeurs'; +$text['core_user_view']['edit'][12] = 'Accès aux pages privées membres à modérateurs'; $text['core_user_view']['edit'][13] = 'Informations générales'; $text['core_user_view']['edit'][14] = 'Ajout / Édition / Suppression de pages'; $text['core_user_view']['edit'][15] = 'Ajout / Édition / Suppression de fichiers'; @@ -66,6 +66,9 @@ $text['core_user_view']['edit'][29] = 'Enregistrer'; $text['core_user_view']['edit'][30] = 'Impossible de modifier votre propre groupe.'; $text['core_user_view']['edit'][31] = 'L\'identifiant est défini lors de la création du compte, il ne peut pas être modifié.'; $text['core_user_view']['edit'][32] = 'Nouveau mot de passe'; +$text['core_user_view']['edit'][33] = 'Édition de pages'; +$text['core_user_view']['edit'][34] = 'Ajout de fichiers'; +$text['core_user_view']['edit'][35] = 'Accès aux pages privées membres et éditeurs'; $text['core_user_view']['forgot'][0] = 'Identifiant'; $text['core_user_view']['forgot'][1] = 'Retour'; $text['core_user_view']['forgot'][2] = 'Valider'; diff --git a/core/module/user/view/edit/edit.php b/core/module/user/view/edit/edit.php index cf66cae..c88f8dd 100644 --- a/core/module/user/view/edit/edit.php +++ b/core/module/user/view/edit/edit.php @@ -79,6 +79,11 @@ include('./core/module/user/lang/'. $this->getData(['config', 'i18n', 'langAdmin +