From 826e6264ebda9ba8dec68e85915e99c8baf49b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Tue, 17 Sep 2024 18:27:02 +0200 Subject: [PATCH] Corrige l'affichage des boutons de navigation dans les vues des modules --- CHANGES.md | 1 + core/class/layout.class.php | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 0dc6f668..ba717bae 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -18,6 +18,7 @@ - Edition de page, delete et duplicate renvoyant vers une mauvaise page. - Supprime un warning à la création d'une page. - Bouton de génération du site inopérant. +- Affichage intempestif des boutons de navigation de pages dans les vues des modules. ## Versions 13.3.06 diff --git a/core/class/layout.class.php b/core/class/layout.class.php index 9a7ef9f6..7883f44b 100644 --- a/core/class/layout.class.php +++ b/core/class/layout.class.php @@ -82,17 +82,25 @@ class layout extends common $content = 'col' . $blocks[1]; $blockright = 'col' . $blocks[2]; } - // Page pleine pour la configuration des modules et l'édition des pages sauf l'affichage d'un article de blog - $pattern = ['config', 'edit', 'add', 'comment', 'data']; + // Toujours en pleine page pour la configuration des modules et l'édition des pages sauf l'affichage d'un article de blog + $pattern = ['config', 'edit', 'add', 'comment', 'data', 'option', 'theme', 'comment', 'article', 'data', 'gallery', 'update', 'users', 'validate']; if ( (sizeof($blocks) === 1 || in_array($this->getUrl(1), $pattern)) ) { // Pleine page en mode configuration - if ($this->getData(['page', $this->getUrl(0), 'navLeft']) === 'top' || $this->getData(['page', $this->getUrl(0), 'navRight']) === 'top') { + if ( + ($this->getData(['page', $this->getUrl(0), 'navLeft']) === 'top' + || $this->getData(['page', $this->getUrl(0), 'navRight']) === 'top') + && in_array($this->getUrl(1), $pattern) === false + ) { $this->showNavButtons('top'); } $this->showContent(); - if ($this->getData(['page', $this->getUrl(0), 'navLeft']) === 'bottom' || $this->getData(['page', $this->getUrl(0), 'navRight']) === 'bottom') { + if ( + ($this->getData(['page', $this->getUrl(0), 'navLeft']) === 'bottom' + || $this->getData(['page', $this->getUrl(0), 'navRight']) === 'bottom') + && in_array($this->getUrl(1), $pattern) === false + ) { $this->showNavButtons('bottom'); } } else {