From 418173956b0f3f41d1a9e5d01a1d5639537d7a7b Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 4 Jan 2019 21:51:21 +0100 Subject: [PATCH] =?UTF-8?q?filtre=20liste=20de=20page=20=C3=A0=20=C3=A9dit?= =?UTF-8?q?er?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 38 ++++++++++++++++++++++++++--- core/module/page/page.php | 7 ------ core/module/page/view/edit/edit.php | 4 +-- 3 files changed, 35 insertions(+), 14 deletions(-) diff --git a/core/core.php b/core/core.php index 7fb63773..3ce62f5d 100644 --- a/core/core.php +++ b/core/core.php @@ -176,6 +176,38 @@ class common { 'group' => self::GROUP_VISITOR, 'targetBlank' => false, 'title' => 'Contact' + ], + 'blockRight' => [ + 'typeMenu' => 'text', + 'iconUrl' => '', + 'disable' => false, + 'content' => '

Bloc à droite du site

', + 'hideTitle' => false, + 'metaDescription' => '', + 'metaTitle' => '', + 'moduleId' => '', + 'modulePosition' => '', + 'parentPageId' => '', + 'position' => 0, + 'group' => self::GROUP_VISITOR, + 'targetBlank' => false, + 'title' => 'blockRight' + ], + 'blockLeft' => [ + 'typeMenu' => 'text', + 'iconUrl' => '', + 'disable' => false, + 'content' => '

Bloc à gauche du site

', + 'hideTitle' => false, + 'metaDescription' => '', + 'metaTitle' => '', + 'moduleId' => '', + 'modulePosition' => '', + 'parentPageId' => '', + 'position' => 0, + 'group' => self::GROUP_VISITOR, + 'targetBlank' => false, + 'title' => 'blockLeft' ] ], 'module' => [ @@ -996,8 +1028,6 @@ class common { // Version 9.0.0 if($this->getData(['core', 'dataVersion']) < 900) { $this->setData(['theme', 'site', 'blocks','100']); - $this->setData(['page', 'blockLeft', 'content','']); - $this->setData(['page', 'blockRight', 'content','']); $this->setData(['core', 'dataVersion', 900]); $this->SaveData(); } @@ -2136,8 +2166,8 @@ class layout extends common { $leftItems .= ''; $currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2); foreach($this->getHierarchy(null, false) as $parentPageId => $childrenPageIds) { - if ($this->getData(['page', $parentPageId, 'title']) === 'blockLeft' - OR $this->getData(['page', $parentPageId, 'title']) === 'blockRight') { continue; } + if ($this->getData(['page', $parentPageId]) === 'blockLeft' + OR $this->getData(['page', $parentPageId]) === 'blockRight') { continue; } $leftItems .= ''; foreach($childrenPageIds as $childKey) { $leftItems .= ''; diff --git a/core/module/page/page.php b/core/module/page/page.php index 8f3b92c6..4acad103 100755 --- a/core/module/page/page.php +++ b/core/module/page/page.php @@ -75,7 +75,6 @@ class page extends common { * Suppression */ public function delete() { - if($this->isPost()) { // La page n'existe pas if($this->getData(['page', $this->getUrl(2)]) === null) { // Valeurs en sortie @@ -110,12 +109,6 @@ class page extends common { 'state' => true ]); } - } else { - // Valeurs en sortie - $this->addOutput([ - 'access' => false - ]); - } } diff --git a/core/module/page/view/edit/edit.php b/core/module/page/view/edit/edit.php index 2092d534..e9bc02e8 100755 --- a/core/module/page/view/edit/edit.php +++ b/core/module/page/view/edit/edit.php @@ -55,8 +55,7 @@
-
- +
'Sélectionnez le type de menu.', 'label' => 'Type de menu', @@ -64,7 +63,6 @@ ]); ?>
- 'Icône', 'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl'])