diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php index 2061c79628c..95212e01462 100644 --- a/htdocs/admin/menus.php +++ b/htdocs/admin/menus.php @@ -34,6 +34,7 @@ require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); $langs->load("companies"); $langs->load("products"); $langs->load("admin"); +$langs->load("users"); // Security check if (!$user->admin) accessforbidden(); diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index e14d843cd67..e87b1b68ccd 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -61,6 +61,9 @@ function printBookmarksList ($aDb, $aLangs) } $ret.= ''; $ret.= ''; + + $ret.= ''."\n"; + // Menu with all bookmarks if (! empty($conf->global->BOOKMARKS_SHOW_IN_MENU)) { diff --git a/htdocs/includes/menus/barre_left/auguria.lib.php b/htdocs/includes/menus/barre_left/auguria.lib.php index 9e288244c10..ba7d76026ce 100644 --- a/htdocs/includes/menus/barre_left/auguria.lib.php +++ b/htdocs/includes/menus/barre_left/auguria.lib.php @@ -115,7 +115,6 @@ function print_left_auguria_menu($db,$menu_array) $alt=0; if (is_array($menu_array)) { - $contenu = 0; for ($i = 0 ; $i < sizeof($menu_array) ; $i++) { $alt++; @@ -152,9 +151,8 @@ function print_left_auguria_menu($db,$menu_array) } // Menu niveau 0 - if ($menu_array[$i]['level']==0) + if ($menu_array[$i]['level'] == 0) { - if ($contenu == 1) print ''."\n"; if ($menu_array[$i]['enabled']) { @@ -164,13 +162,11 @@ function print_left_auguria_menu($db,$menu_array) { print ''; } - $contenu = 0; + print ''."\n"; } // Menu niveau > 0 if ($menu_array[$i]['level'] > 0) { - if ($menu_array[$i]['level']==1) $contenu = 1; - if ($menu_array[$i]['enabled']) { print ''; diff --git a/htdocs/includes/menus/barre_left/eldy.lib.php b/htdocs/includes/menus/barre_left/eldy.lib.php index a2aa7e3ada6..d7ba8034d71 100644 --- a/htdocs/includes/menus/barre_left/eldy.lib.php +++ b/htdocs/includes/menus/barre_left/eldy.lib.php @@ -872,7 +872,6 @@ function print_left_eldy_menu($db,$menu_array) $alt=0; if (is_array($menu_array)) { - $contenu = 0; for ($i = 0 ; $i < sizeof($menu_array) ; $i++) { $alt++; @@ -910,27 +909,26 @@ function print_left_eldy_menu($db,$menu_array) { print ''."\n"; } + print ''."\n"; } // Menu niveau > 0 if ($menu_array[$i]['level'] > 0) { + print ''."\n"; } // If next is a new block or end diff --git a/htdocs/includes/menus/barre_left/empty.php b/htdocs/includes/menus/barre_left/empty.php index 9310012e5ae..830957ee850 100644 --- a/htdocs/includes/menus/barre_left/empty.php +++ b/htdocs/includes/menus/barre_left/empty.php @@ -55,7 +55,7 @@ class MenuLeft { // ***** START ***** $langs->load("admin"); // Load translation file admin.lang - $newmenu->add(DOL_URL_ROOT."/admin/index.php?leftmenu=setup", $langs->trans("Setup")); + $newmenu->add(DOL_URL_ROOT."/admin/index.php?leftmenu=setup", $langs->trans("Setup"),0); $newmenu->add(DOL_URL_ROOT."/admin/company.php", $langs->trans("MenuCompanySetup"),1); $newmenu->add(DOL_URL_ROOT."/admin/modules.php", $langs->trans("Modules"),1); $newmenu->add(DOL_URL_ROOT."/admin/menus.php", $langs->trans("Menus"),1); @@ -79,7 +79,7 @@ class MenuLeft { for ($i = 0 ; $i < sizeof($this->menu_array) ; $i++) { $alt++; - if (empty($menu_array[$i]['level'])) + if (empty($this->menu_array[$i]['level'])) { if (($alt%2==0)) { @@ -91,33 +91,42 @@ class MenuLeft { } } - 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'].'
'; + // Place tabulation + $tabstring=''; + $tabul=($this->menu_array[$i]['level'] - 1); + if ($tabul > 0) + { + for ($j=0; $j < $tabul; $j++) + { + $tabstring.='   '; + } + } + + if ($this->menu_array[$i]['level'] == 0) { + if ($this->menu_array[$i]['enabled']) + { + print ''."\n"; + } + else + { + print ''."\n"; + } + print ''."\n"; } - if ($this->menu_array[$i]['level']==1) { - if ($this->menu_array[$i]['enabled']) - print ''.$this->menu_array[$i]['titre'].'
'; + + if ($this->menu_array[$i]['level'] > 0) { + print ''."\n"; } // If next is a new block or end - if (empty($menu_array[$i+1]['level'])) + if (empty($this->menu_array[$i+1]['level'])) { print ''."\n"; print "\n"; diff --git a/htdocs/includes/menus/barre_top/empty.php b/htdocs/includes/menus/barre_top/empty.php index 59ab275df31..d889b2190a6 100644 --- a/htdocs/includes/menus/barre_top/empty.php +++ b/htdocs/includes/menus/barre_top/empty.php @@ -51,69 +51,60 @@ class MenuTop { { global $user,$conf,$langs,$dolibarr_main_db_name;; - print ''; + print_start_menu_array(); - // Menu Home - print ''; + $idsel='none'; + $classname='class="tmenu"'; - // Put here top menu entries - // ***** START ***** + print_start_menu_entry($idsel); + print ''; + print ''; + print_text_menu_entry($langs->trans("Home")); + print ''; + print_end_menu_entry(); - // print ''; - } - else - { - if (! $this->hideifnotallowed) - { - print ''; - } - } - } - } - */ - - print '
'; - print 'atarget?" target=$this->atarget":"").'>'.$langs->trans("Home").''; - print ''; - // print ''; - // print 'db,'empty','top'); - $tabMenu = $menuArbo->menuTopCharger(2,$_SESSION['mainmenu'],'empty'); - - for($i=0; $i'; - print 'atarget?" target=$this->atarget":($this->atarget?" target=$this->atarget":"")).'>'; - print $tabMenu[$i]['titre']; - print ''; - print ''; - print ''.$tabMenu[$i]['titre'].''; - print '
'; + print_end_menu_array(); } } + +function print_start_menu_array() +{ + global $conf; + if (preg_match('/bluelagoon|eldy|freelug|rodolphe|yellow|dev/',$conf->css)) print ''; + else print ''; + else print ''; + print "\n"; +} + +function print_end_menu_array() +{ + global $conf; + if (preg_match('/bluelagoon|eldy|freelug|rodolphe|yellow|dev/',$conf->css)) print '
'; + else print ''; + print "\n"; +} + ?> \ No newline at end of file