From d2b91e850f2b94efc289c37dc14a6609c1265fd0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 21 Jan 2006 15:33:57 +0000 Subject: [PATCH] Fix: N'affiche pas menu Outil si aucun module outils actif dans gestionnaire de menu eldy --- .../menus/barre_left/eldy_backoffice.php | 86 ++++++++++--------- 1 file changed, 47 insertions(+), 39 deletions(-) diff --git a/htdocs/includes/menus/barre_left/eldy_backoffice.php b/htdocs/includes/menus/barre_left/eldy_backoffice.php index 7d6530c79a4..3ee6be52550 100644 --- a/htdocs/includes/menus/barre_left/eldy_backoffice.php +++ b/htdocs/includes/menus/barre_left/eldy_backoffice.php @@ -633,51 +633,59 @@ class MenuLeft { // Affichage du menu $alt=0; - for ($i = 0 ; $i < sizeof($this->menu_array) ; $i++) + if (! sizeof($this->menu_array)) { - $alt++; - if ($this->menu_array[$i]['level']==0) { - if (($alt%2==0)) - { - print '
'."\n"; + print '
'."\n"; + print $langs->trans("NoPermission"); + print '
'; + } + else + { + for ($i = 0 ; $i < sizeof($this->menu_array) ; $i++) + { + $alt++; + if ($this->menu_array[$i]['level']==0) { + if (($alt%2==0)) + { + print '
'."\n"; + } + else + { + print '
'."\n"; + } } - else - { - print '
'."\n"; + + if ($this->menu_array[$i]['level']==0) { + if ($this->menu_array[$i]['enabled']) + print ''.$this->menu_array[$i]['titre'].'
'; + else + print ''.$this->menu_array[$i]['titre'].'
'; + } + if ($this->menu_array[$i]['level']==1) { + if ($this->menu_array[$i]['enabled']) + print ''.$this->menu_array[$i]['titre'].'
'; + else + print ''.$this->menu_array[$i]['titre'].'
'; + } + if ($this->menu_array[$i]['level']==2) { + if ($this->menu_array[$i]['enabled']) + print '    '.$this->menu_array[$i]['titre'].'
'; + else + print '    '.$this->menu_array[$i]['titre'].'
'; + } + if ($this->menu_array[$i]['level']==3) { + if ($this->menu_array[$i]['enabled']) + print '        '.$this->menu_array[$i]['titre'].'
'; + else + print '        '.$this->menu_array[$i]['titre'].'
'; + } + + if ($i == (sizeof($this->menu_array)-1) || $this->menu_array[$i+1]['level']==0) { + print "
\n"; } - } - - if ($this->menu_array[$i]['level']==0) { - if ($this->menu_array[$i]['enabled']) - print ''.$this->menu_array[$i]['titre'].'
'; - else - print ''.$this->menu_array[$i]['titre'].'
'; - } - if ($this->menu_array[$i]['level']==1) { - if ($this->menu_array[$i]['enabled']) - print ''.$this->menu_array[$i]['titre'].'
'; - else - print ''.$this->menu_array[$i]['titre'].'
'; - } - if ($this->menu_array[$i]['level']==2) { - if ($this->menu_array[$i]['enabled']) - print '    '.$this->menu_array[$i]['titre'].'
'; - else - print '    '.$this->menu_array[$i]['titre'].'
'; - } - if ($this->menu_array[$i]['level']==3) { - if ($this->menu_array[$i]['enabled']) - print '        '.$this->menu_array[$i]['titre'].'
'; - else - print '        '.$this->menu_array[$i]['titre'].'
'; - } - - if ($i == (sizeof($this->menu_array)-1) || $this->menu_array[$i+1]['level']==0) { - print "
\n"; } } - } }