diff --git a/htdocs/docs/pre.inc.php b/htdocs/docs/pre.inc.php index b85f5fb34aa755c5034431b482063e887ed4bab9..f3b9b7cf72a649feeece8b06cf771acbea967761 100644 --- a/htdocs/docs/pre.inc.php +++ b/htdocs/docs/pre.inc.php @@ -37,45 +37,26 @@ function llxHeader($head = "", $title="", $help_url='') $menu = new Menu(); - if ($conf->societe->enabled && $user->rights->societe->lire) + if (! empty($conf->societe->enabled) && $user->rights->societe->lire) { $langs->load("companies"); - $menu->add(DOL_URL_ROOT."/societe.php", $langs->trans("Companies")); + $menu->add(DOL_URL_ROOT."/societe.php", $langs->trans("ThirdParties")); - if(is_dir("societe/groupe")) + if ($user->rights->societe->creer) { - $menu->add_submenu(DOL_URL_ROOT."/societe/groupe/index.php", $langs->trans("MenuSocGroup")); + $menu->add_submenu(DOL_URL_ROOT."/soc.php?action=create", $langs->trans("MenuNewThirdParty")); } - $menu->add_submenu(DOL_URL_ROOT."/contact/index.php",$langs->trans("Contacts")); - } - - if ($conf->commercial->enabled && $user->rights->commercial->main->lire) - { - $langs->load("commercial"); - $menu->add(DOL_URL_ROOT."/comm/index.php",$langs->trans("Commercial")); - - $menu->add_submenu(DOL_URL_ROOT."/comm/clients.php",$langs->trans("Customers")); - $menu->add_submenu(DOL_URL_ROOT."/comm/prospect/prospects.php",$langs->trans("Prospects")); - if ($user->rights->propale->lire) - { - $langs->load("propal"); - $menu->add_submenu(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Prop")); - } + $menu->add_submenu(DOL_URL_ROOT."/contact/index.php",$langs->trans("Contacts")); } - if ($conf->compta->enabled || $conf->comptaexpert->enabled) + if (! empty($conf->categorie->enabled)) { - $langs->load("compta"); - $menu->add(DOL_URL_ROOT."/compta/index.php", $langs->trans("MenuFinancial")); - - if ($user->rights->facture->lire) { - $langs->load("bills"); - $menu->add_submenu(DOL_URL_ROOT."/compta/facture.php", $langs->trans("Bills")); - } + $langs->load("categories"); + $menu->add(DOL_URL_ROOT."/categories/index.php?type=0", $langs->trans("Categories")); } - if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire) + if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire) { $langs->trans("interventions"); $menu->add(DOL_URL_ROOT."/fichinter/index.php", $langs->trans("Interventions")); diff --git a/htdocs/includes/menus/barre_top/eldy_backoffice.php b/htdocs/includes/menus/barre_top/eldy_backoffice.php index cd854fb35614b0eb5180ee4da9fdd7f64f04f10e..18e4de137212114fcce7c8513b5d7bfe83d38641 100644 --- a/htdocs/includes/menus/barre_top/eldy_backoffice.php +++ b/htdocs/includes/menus/barre_top/eldy_backoffice.php @@ -162,7 +162,7 @@ class MenuTop { } $idsel='id="commercial" '; - if($user->rights->societe->lire) + if($user->rights->societe->lire || $user->rights->societe->contact->lire) { print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.DOL_URL_ROOT.'/comm/index.php?mainmenu=commercial&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Commercial").'</a></td>'; } diff --git a/htdocs/includes/menus/barre_top/eldy_frontoffice.php b/htdocs/includes/menus/barre_top/eldy_frontoffice.php index 4dbd1ba9a75f8ffd4fbe82842d53f73227ba3b90..265fd5e955f9c439c5995f9f90caf3358def4ace 100644 --- a/htdocs/includes/menus/barre_top/eldy_frontoffice.php +++ b/htdocs/includes/menus/barre_top/eldy_frontoffice.php @@ -162,7 +162,7 @@ class MenuTop { } $idsel='id="commercial" '; - if($user->rights->societe->lire) + if($user->rights->societe->lire || $user->rights->societe->contact->lire) { print '<td class="tmenu"><a '.$class.' '.$idsel.'href="'.DOL_URL_ROOT.'/comm/index.php?mainmenu=commercial&leftmenu="'.($this->atarget?" target=$this->atarget":"").'>'.$langs->trans("Commercial").'</a></td>'; } diff --git a/htdocs/includes/menus/init_menu_auguria.sql b/htdocs/includes/menus/init_menu_auguria.sql index 6a6414ef53dde7f1a600c2d206c52dac29a11403..0036209f870313a55f1da80b47f12ce114f11061 100644 --- a/htdocs/includes/menus/init_menu_auguria.sql +++ b/htdocs/includes/menus/init_menu_auguria.sql @@ -19,7 +19,7 @@ insert into `llx_menu` (`rowid`, `menu_handler`, `type`, `mainmenu`, `leftmenu`, insert into `llx_menu` (`rowid`, `menu_handler`, `type`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ( 2__+MAX_llx_menu__, 'auguria', 'top', 'companies', '', 0, '/index.php?mainmenu=companies&leftmenu=', 'ThirdParties', -1, 'companies', '', '', 2, 2); insert into `llx_menu` (`rowid`, `menu_handler`, `type`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ( 3__+MAX_llx_menu__, 'auguria', 'top', 'products', '', 0, '/product/index.php?mainmenu=products&leftmenu=', 'Products/Services', -1, 'products', '$user->rights->produit->lire', '', 0, 3); insert into `llx_menu` (`rowid`, `menu_handler`, `type`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ( 4__+MAX_llx_menu__, 'auguria', 'top', 'suppliers', '', 0, '/fourn/index.php?mainmenu=suppliers&leftmenu=', 'Suppliers', -1, 'suppliers', '$user->rights->fournisseur->lire', '', 0, 4); -insert into `llx_menu` (`rowid`, `menu_handler`, `type`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ( 5__+MAX_llx_menu__, 'auguria', 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->commercial->main->lire', '', 2, 5); +insert into `llx_menu` (`rowid`, `menu_handler`, `type`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ( 5__+MAX_llx_menu__, 'auguria', 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 5); insert into `llx_menu` (`rowid`, `menu_handler`, `type`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ( 6__+MAX_llx_menu__, 'auguria', 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->compta->resultat->lire || $user->rights->comptaexpert->plancompte->lire || $user->rights->commande->lire || $user->rights->facture->lire || $user->rights->banque->lire', '', 2, 6); insert into `llx_menu` (`rowid`, `menu_handler`, `type`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ( 7__+MAX_llx_menu__, 'auguria', 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 0, 7); insert into `llx_menu` (`rowid`, `menu_handler`, `type`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ( 8__+MAX_llx_menu__, 'auguria', 'top', 'tools', '', 0, '/index.php?mainmenu=tools&leftmenu=', 'Tools', -1, 'other', '$user->rights->mailing->lire || $user->rights->bookmark->lire || $user->rights->export->lire', '', 2, 8); diff --git a/htdocs/pre.inc.php b/htdocs/pre.inc.php index aba0e3fe90d78efaa8a6df2df055aab3aabefd30..762e8d56d6f56bafe0298138db9454badc4c7751 100644 --- a/htdocs/pre.inc.php +++ b/htdocs/pre.inc.php @@ -55,21 +55,6 @@ function llxHeader($head = '', $title='', $help_url='') $menu->add(DOL_URL_ROOT."/categories/index.php?type=0", $langs->trans("Categories")); } - if (! empty($conf->commercial->enabled) && isset($user->rights->commercial->main->lire) && $user->rights->commercial->main->lire) - { - $langs->load("commercial"); - $menu->add(DOL_URL_ROOT."/comm/index.php",$langs->trans("Commercial")); - - $menu->add_submenu(DOL_URL_ROOT."/comm/clients.php",$langs->trans("Customers")); - $menu->add_submenu(DOL_URL_ROOT."/comm/prospect/prospects.php",$langs->trans("Prospects")); - - if ($user->rights->propale->lire) - { - $langs->load("propal"); - $menu->add_submenu(DOL_URL_ROOT."/comm/propal.php", $langs->trans("Prop")); - } - } - if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire) { $langs->trans("interventions");