diff --git a/core/core.php b/core/core.php
index 7a2a402f..04462acb 100644
--- a/core/core.php
+++ b/core/core.php
@@ -2338,7 +2338,7 @@ class layout extends common {
*/
public function showMenu() {
// Met en forme les items du menu
- $items = '';
+ $itemsLeft = '';
$currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2);
foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) {
// Passer les entrées masquées
@@ -2346,36 +2346,36 @@ class layout extends common {
$active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? 'active ' : '';
$targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page de l'item
- $items .= '
';
+ $itemsLeft .= '';
if ( $this->getData(['page',$parentPageId,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') )
- {$items .= '';
+ {$itemsLeft .= '';
} else {
- $items .= '';
+ $itemsLeft .= '';
}
switch ($this->getData(['page', $parentPageId, 'typeMenu'])) {
case '' :
- $items .= $this->getData(['page', $parentPageId, 'title']);
+ $itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
break;
case 'text' :
- $items .= $this->getData(['page', $parentPageId, 'title']);
+ $itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
break;
case 'icon' :
if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") {
- $items .= '';
+ $itemsLeft .= '';
} else {
- $items .= $this->getData(['page', $parentPageId, 'title']);
+ $itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
}
break;
case 'icontitle' :
if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") {
- $items .= '';
+ $itemsLeft .= '';
} else {
- $items .= $this->getData(['page', $parentPageId, 'title']);
+ $itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
}
break;
}
@@ -2388,64 +2388,65 @@ class layout extends common {
}
if($childrenPageIds && $disableChild !== $totalChild &&
$this->getdata(['page',$parentPageId,'hideMenuChildren']) === false) {
- $items .= template::ico('down', 'left');
+ $itemsLeft .= template::ico('down', 'left');
}
// ------------------------------------------------
- $items .= '';
+ $itemsLeft .= '';
if ($this->getdata(['page',$parentPageId,'hideMenuChildren']) === true ||
empty($childrenPageIds)) {
continue;
}
- $items .= '';
+ $itemsLeft .= '';
foreach($childrenPageIds as $childKey) {
// Propriétés de l'item
$active = ($childKey === $currentPageId) ? 'active ' : '';
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page du sous-item
- $items .= '- ';
+ $itemsLeft .= '
- ';
if ( $this->getData(['page',$childKey,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
- $items .= '';
+ $itemsLeft .= '';
} else {
- $items .= '';
+ $itemsLeft .= '';
}
switch ($this->getData(['page', $childKey, 'typeMenu'])) {
case '' :
- $items .= $this->getData(['page', $childKey, 'title']);
+ $itemsLeft .= $this->getData(['page', $childKey, 'title']);
break;
case 'text' :
- $items .= $this->getData(['page', $childKey, 'title']);
+ $itemsLeft .= $this->getData(['page', $childKey, 'title']);
break;
case 'icon' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
- $items .= '';
+ $itemsLeft .= '';
} else {
- $items .= $this->getData(['page', $parentPageId, 'title']);
+ $itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
}
break;
case 'icontitle' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
- $items .= '';
+ $itemsLeft .= '';
} else {
- $items .= $this->getData(['page', $childKey, 'title']);
+ $itemsLeft .= $this->getData(['page', $childKey, 'title']);
}
break;
case 'icontext' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
- $items .= '';
- $items .= $this->getData(['page', $childKey, 'title']);
+ $itemsLeft .= '';
+ $itemsLeft .= $this->getData(['page', $childKey, 'title']);
} else {
- $items .= $this->getData(['page', $childKey, 'title']);
+ $itemsLeft .= $this->getData(['page', $childKey, 'title']);
}
break;
}
- $items .= '
';
+ $itemsLeft .= '
';
}
- $items .= '';
+ $itemsLeft .= '';
}
// Lien de connexion
+ $itemsRight = '';
if(
(
$this->getData(['theme', 'menu', 'loginLink'])
@@ -2453,7 +2454,7 @@ class layout extends common {
)
OR $this->getUrl(0) === 'theme'
) {
- $items .= '';
- $items .= '' . template::ico('logout') . '';
+ $itemsRight .= '' . template::ico('user', 'right') . '';
+ $itemsRight .= '' . template::ico('logout') . '';
}
// Retourne les items du menu
- echo '';
+ echo '';
}
/**
diff --git a/core/layout/common.css b/core/layout/common.css
index 7bb2747d..b9a1e83b 100755
--- a/core/layout/common.css
+++ b/core/layout/common.css
@@ -521,6 +521,27 @@ nav a {
nav a:hover {
text-decoration: none;
}
+
+nav #menuLeft {
+ display: flex;
+ float: left;
+}
+nav #menuRight {
+ display: flex;
+ float: right;
+}
+/* fin barre de menu */
+nav::after {
+ content: " ";
+ clear: both;
+ display: flex;
+}
+nav::before {
+ content: " ";
+ clear: left;
+ display: flex;
+}
+
@media (min-width: 768px) {
nav #menu {
display: block;