Skip to content

Commit

Permalink
Fix position of menu
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 16, 2018
1 parent a0bcf99 commit 4151ca4
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions htdocs/core/menus/standard/eldy.lib.php
Expand Up @@ -75,6 +75,21 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode
if (! empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE)) $titlehome = '&nbsp; <span class="fa fa-home"></span> &nbsp;';
$menu->add('/index.php?mainmenu=home&amp;leftmenu=home', $titlehome, 0, $showmode, $atarget, "home", '', 10, $id, $idsel, $classname);

// Members
$tmpentry=array('enabled'=>(! empty($conf->adherent->enabled)),
'perms'=>(! empty($user->rights->adherent->lire)),
'module'=>'adherent');
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
if ($showmode)
{
$classname="";
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "members") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; }
else $classname = 'class="tmenu"';
$idsel='members';

$menu->add('/adherents/index.php?mainmenu=members&amp;leftmenu=', $langs->trans("MenuMembers"), 0, $showmode, $atarget, "members", '', 18, $id, $idsel, $classname);
}

// Third parties
$tmpentry=array('enabled'=>(( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)), 'perms'=>(! empty($user->rights->societe->lire) || ! empty($user->rights->fournisseur->lire)), 'module'=>'societe|fournisseur');
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
Expand Down Expand Up @@ -241,8 +256,6 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode
$menu->add('/hrm/index.php?mainmenu=hrm&amp;leftmenu=', $langs->trans("HRM"), 0, $showmode, $atarget, "hrm", '', 80, $id, $idsel, $classname);
}



// Tools
$tmpentry=array(
'enabled'=>1,
Expand All @@ -261,21 +274,6 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode
$menu->add('/core/tools.php?mainmenu=tools&amp;leftmenu=', $langs->trans("Tools"), 0, $showmode, $atarget, "tools", '', 90, $id, $idsel, $classname);
}

// Members
$tmpentry=array('enabled'=>(! empty($conf->adherent->enabled)),
'perms'=>(! empty($user->rights->adherent->lire)),
'module'=>'adherent');
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
if ($showmode)
{
$classname="";
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "members") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; }
else $classname = 'class="tmenu"';
$idsel='members';

$menu->add('/adherents/index.php?mainmenu=members&amp;leftmenu=', $langs->trans("MenuMembers"), 0, $showmode, $atarget, "members", '', 100, $id, $idsel, $classname);
}

// Show personalized menus
$menuArbo = new Menubase($db,'eldy');
$newTabMenu = $menuArbo->menuTopCharger('','',$type_user,'eldy',$tabMenu); // Return tabMenu with only top entries
Expand Down

0 comments on commit 4151ca4

Please sign in to comment.