From 993089841b44d45d5aed84109a6fa3c81debb0ea Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 26 Mar 2021 21:52:02 +0100 Subject: [PATCH] Option de layout datality --- core/core.php | 26 +++++++++++++++++++++----- core/module/page/page.php | 4 +++- core/module/page/view/edit/edit.js.php | 13 +++++++++++++ core/module/page/view/edit/edit.php | 11 +++++++++-- 4 files changed, 46 insertions(+), 8 deletions(-) diff --git a/core/core.php b/core/core.php index c0de0edc..d75f2813 100755 --- a/core/core.php +++ b/core/core.php @@ -2074,6 +2074,10 @@ class core extends common { 'disable' => $this->getData(['page', $this->getUrl(0), 'disable']), 'contentRight' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'content']), 'contentLeft' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'content']), + 'display' => $this->getData(['page', $this->getUrl(0), 'lity']) === true + && $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') + ? self::DISPLAY_LAYOUT_LITY + : $this->output['display'] ]); } // Importe le module @@ -2656,6 +2660,9 @@ class layout extends common { // Propriétés de l'item $active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? 'active ' : ''; $targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : ''; + $targetLity = $this->getData(['page', $parentPageId, 'lity']) + && $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') + ? ' rel="data-lity" ' : ''; // Mise en page de l'item $itemsLeft .= '
  • '; @@ -2669,7 +2676,7 @@ class layout extends common { ){ $itemsLeft .= ''; } else { - $itemsLeft .= ''; + $itemsLeft .= ''; } switch ($this->getData(['page', $parentPageId, 'typeMenu'])) { @@ -2717,6 +2724,9 @@ class layout extends common { // Propriétés de l'item $active = ($childKey === $currentPageId) ? 'active ' : ''; $targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : ''; + $targetLity = $this->getData(['page', $childKey, 'lity']) + && $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') + ? ' rel="data-lity" ' : ''; // Mise en page du sous-item $itemsLeft .= '
  • '; if ( ( $this->getData(['page',$childKey,'disable']) === true @@ -2729,7 +2739,7 @@ class layout extends common { ){ $itemsLeft .= ''; } else { - $itemsLeft .= ''; + $itemsLeft .= ''; } switch ($this->getData(['page', $childKey, 'typeMenu'])) { @@ -2832,7 +2842,10 @@ class layout extends common { } // Propriétés de l'item $active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? ' class="active"' : ''; - $targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : ''; + $targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank" ' : ''; + $targetLity = $this->getData(['page', $parentPageId, 'lity']) + && $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') + ? ' rel="data-lity" ' : ''; // Mise en page de l'item; // Ne pas afficher le parent d'une sous-page quand l'option est sélectionnée. if ($onlyChildren === false) { @@ -2841,7 +2854,7 @@ class layout extends common { AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) { $items .= ''; } else { - $items .= ''; + $items .= ''; } $items .= $this->getData(['page', $parentPageId, 'title']); $items .= ''; @@ -2856,6 +2869,9 @@ class layout extends common { // Propriétés de l'item $active = ($childKey === $currentPageId) ? ' class="active"' : ''; $targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : ''; + $targetLity = $this->getData(['page', $childKey, 'lity']) + && $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') + ? ' rel="data-lity" ' : ''; // Mise en page du sous-item $itemsChildren .= '