diff --git a/core/core.php b/core/core.php index 22a0d18e..b0d7d23d 100644 --- a/core/core.php +++ b/core/core.php @@ -777,7 +777,7 @@ class common { } // Version 9.0.17 if($this->getData(['core', 'dataVersion']) < 9017) { - $this->setData(['config','displayVersion', true ]); + $this->setData(['theme','footer','displayVersion', true ]); $this->setData(['core', 'dataVersion', 9017]); $this->SaveData(); } @@ -1717,11 +1717,11 @@ class layout extends common { public function showCopyright() { $items = '
'; $items .= 'Motorisé par Zwii'; - if ($this->getData(['config','displayVersion']) === TRUE) { - $items .= ' ' . common::ZWII_VERSION ; - } - $items .= ''; - + $items .= ' getData(['theme','footer','displayVersion']) === true ? '>': 'class="displayNone" >' ) . + common::ZWII_VERSION . + "" ; + $items .= ''; $items .= ' | Plan du site'; if( ( diff --git a/core/module/config/config.php b/core/module/config/config.php index 90501e30..9aee9052 100755 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -223,8 +223,7 @@ class config extends common { ], 'timezone' => $this->getInput('configTimezone', helper::FILTER_STRING_SHORT, true), 'title' => $this->getInput('configTitle', helper::FILTER_STRING_SHORT, true), - 'itemsperPage' => $this->getInput('itemsperPage', helper::FILTER_INT,true), - 'displayVersion' => $this->getInput('configDisplayVersion', helper::FILTER_BOOLEAN) + 'itemsperPage' => $this->getInput('itemsperPage', helper::FILTER_INT,true) ] ]); if(self::$inputNotices === []) { diff --git a/core/module/config/view/index/index.php b/core/module/config/view/index/index.php index ad716ae9..8687b6b5 100755 --- a/core/module/config/view/index/index.php +++ b/core/module/config/view/index/index.php @@ -176,10 +176,6 @@ 'label' => 'Fuseau horaire', 'selected' => $this->getData(['config', 'timezone']) ]); ?> - $this->getData(['config', 'displayVersion']), - 'help' => 'Afficher le numéro de version dans le pied de page.' - ]); ?> $this->getData(['config', 'maintenance']), 'help' => 'Le site devient inaccessible sauf pour les administrateurs.' diff --git a/core/module/install/ressource/defaultdata.php b/core/module/install/ressource/defaultdata.php index 1a61eadf..7753c15f 100644 --- a/core/module/install/ressource/defaultdata.php +++ b/core/module/install/ressource/defaultdata.php @@ -20,7 +20,6 @@ class install extends common { 'timezone' => 'Europe/Paris', 'title' => 'Zwii, votre site en quelques clics !', 'itemsperPage' => 10, - 'displayVersion' => true ], 'core' => [ 'dataVersion' => 0, @@ -360,7 +359,8 @@ class install extends common { 'textAlign' => 'left', 'textTransform' => 'none', 'socialsPosition' => 'center', - 'socialsAlign' => 'center' + 'socialsAlign' => 'center', + 'displayVersion' => true ], 'header' => [ 'backgroundColor' => 'rgba(255, 255, 255, 1)', diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 2c108dc7..81f33d47 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -289,7 +289,8 @@ class theme extends common { 'textTransform' => $this->getInput('themeFooterTextTransform'), 'font' => $this->getInput('themeFooterFont'), 'fontSize' => $this->getInput('themeFooterFontSize'), - 'fontWeight' => $this->getInput('themeFooterFontWeight') + 'fontWeight' => $this->getInput('themeFooterFontWeight'), + 'displayVersion' => $this->getInput('themefooterDisplayVersion', helper::FILTER_BOOLEAN) ]]); // Valeurs en sortie $this->addOutput([ diff --git a/core/module/theme/view/footer/footer.js.php b/core/module/theme/view/footer/footer.js.php index 8f13fe2b..b08f166a 100755 --- a/core/module/theme/view/footer/footer.js.php +++ b/core/module/theme/view/footer/footer.js.php @@ -132,6 +132,18 @@ $("#themeFooterLoginLink").on("change", function() { } }).trigger("change"); +// NUméro de version +$("#themefooterDisplayVersion").on("change", function() { + if($(this).is(":checked")) { + console.log("top"); + $("#footerDisplayVersion").show(); + } + else { + $("#footerDisplayVersion").hide(); + } +}).trigger("change"); + + // Aperçu du texte $("#themeFooterText").on("change keydown keyup", function() { $("#footerText").html($(this).val()); diff --git a/core/module/theme/view/footer/footer.php b/core/module/theme/view/footer/footer.php index c4726904..b6781027 100755 --- a/core/module/theme/view/footer/footer.php +++ b/core/module/theme/view/footer/footer.php @@ -101,10 +101,20 @@ 'label' => 'Contenu (texte ou HTML)', 'value' => $this->getData(['theme', 'footer', 'text']) ]); ?> - $this->getData(['theme', 'footer', 'loginLink']), - 'help' => 'Visible seulement sur cette page et lorsque vous n\'êtes pas connecté.' - ]); ?> +
+
+ $this->getData(['theme', 'footer', 'loginLink']), + 'help' => 'Visible seulement sur cette page et lorsque vous n\'êtes pas connecté.' + ]); ?> +
+
+ $this->getData(['config', 'displayVersion']), + 'help' => 'Afficher le numéro de version dans le pied de page.' + ]); ?> +
+