Test menu contextuel
This commit is contained in:
parent
d7e761e877
commit
7c730d62e5
@ -28,15 +28,26 @@
|
||||
|
||||
require("../main.inc.php");
|
||||
|
||||
function llxHeader($head = "", $title="") {
|
||||
global $user, $conf, $langs;
|
||||
|
||||
function llxHeader($head = "", $title="", $addons='') {
|
||||
global $user, $langs;
|
||||
|
||||
|
||||
top_menu($head, $title);
|
||||
|
||||
$menu = new Menu();
|
||||
|
||||
|
||||
if (is_array($addons))
|
||||
{
|
||||
//$menu->add($url, $libelle);
|
||||
|
||||
$menu->add($addons[0][0], $addons[0][1]);
|
||||
}
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/fourn/index.php", $langs->trans("Suppliers"));
|
||||
|
||||
|
||||
/*
|
||||
* Sécurité accés client
|
||||
*/
|
||||
@ -45,24 +56,27 @@ function llxHeader($head = "", $title="") {
|
||||
$menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create&type=f",$langs->trans("New"));
|
||||
}
|
||||
|
||||
if ($conf->societe->enabled) {
|
||||
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
|
||||
}
|
||||
|
||||
if ($conf->facture->enabled) {
|
||||
$langs->load("bills");
|
||||
$menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
|
||||
|
||||
if ($user->societe_id == 0)
|
||||
|
||||
if ($conf->societe->enabled)
|
||||
{
|
||||
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("New"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/fourn/contact.php",$langs->trans("Contacts"));
|
||||
}
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments"));
|
||||
}
|
||||
|
||||
|
||||
if ($conf->facture->enabled)
|
||||
{
|
||||
$langs->load("bills");
|
||||
$menu->add(DOL_URL_ROOT."/fourn/facture/index.php", $langs->trans("Bills"));
|
||||
|
||||
if ($user->societe_id == 0)
|
||||
{
|
||||
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/fiche.php?action=create",$langs->trans("New"));
|
||||
}
|
||||
|
||||
$menu->add_submenu(DOL_URL_ROOT."/fourn/facture/paiement.php", $langs->trans("Payments"));
|
||||
}
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/product/liste.php?type=0", $langs->trans("Products"));
|
||||
|
||||
|
||||
left_menu($menu->liste);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user