Skip to content
Snippets Groups Projects
Commit e043098c authored by aspangaro's avatar aspangaro
Browse files

Add link in modules tools & correct auguria menu

parent 50e49671
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 310__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/support/index.php?leftmenu=admintools', 'HelpCenter', 1, 'help', '', '_blank', 2, 13, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 311__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/about.php?leftmenu=admintools', 'About', 1, 'admin', '', '', 2, 14, __ENTITY__);
-- Home - Module Tools
-- Added by ???
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$user->admin', __HANDLER__, 'left', 700__+MAX_llx_menu__, 'home', 'modulesadmintools', 1__+MAX_llx_menu__, '/admin/tools/index.php?leftmenu=modulesadmintools', 'ModulesSystemTools', 0, 'admin', '', '', 2, 2, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="modulesadmintools"', __HANDLER__, 'left', 701__+MAX_llx_menu__, 'home', '', 700__+MAX_llx_menu__, '/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools', 'ProductVatMassChange', 1, 'products', '', '', 2, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="modulesadmintools"', __HANDLER__, 'left', 702__+MAX_llx_menu__, 'home', '', 700__+MAX_llx_menu__, '/accountancy/admin/productaccount.php?mainmenu=home&leftmenu=modulesadmintools', 'InitAccountancy', 1, 'accountancy', '', '', 2, 0, __ENTITY__);
-- Home - Menu users and groups
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', __HANDLER__, 'left', 400__+MAX_llx_menu__, 'home', 'users', 1__+MAX_llx_menu__, '/user/home.php?leftmenu=users', 'MenuUsersAndGroups', 0, 'users', '', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 401__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/index.php?leftmenu=users', 'Users', 1, 'users', '$user->rights->user->user->lire || $user->admin', '', 2, 0, __ENTITY__);
......
......@@ -108,48 +108,6 @@ class MenuManager
$menuArbo = new Menubase($this->db,'auguria');
$menuArbo->menuLoad($mainmenu, $leftmenu, $this->type_user, 'auguria', $tabMenu);
// Modules system tools
// TODO Find a way to add parent menu only if child menu exists. For the moment, no other method than hard coded methods.
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->barcode->enabled) // TODO We should enabled module system tools entry without hardcoded test, but when at least one modules bringing such entries are on
|| ! empty($conf->global->MAIN_MENU_ENABLE_MODULETOOLS))
{
if (empty($user->societe_id))
{
if ((! empty($conf->product->enabled) || ! empty($conf->service->enabled)) && ($leftmenu=="modulesadmintools" && $user->admin))
{
$langs->load("products");
$array_menu_product=array(
'url'=>"/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools",
'titre'=>$langs->trans("ProductVatMassChange"),
'enabled'=>($user->admin?true:false),
'perms'=>($user->admin?true:false),
'fk_mainmenu'=>'home',
'fk_leftmenu'=>'modulesadmintools',
'fk_menu'=>-1,
'mainmenu'=>'home',
'leftmenu'=>'modulesadmintools_massvat',
'type'=>'left',
'position'=>20
);
array_unshift($tabMenu,$array_menu_product); // add at beginning of array
}
// Main menu title
$array_menu_product=array(
'url'=>"/admin/tools/index.php?mainmenu=home&leftmenu=modulesadmintools",
'titre'=>$langs->trans("ModulesSystemTools"),
'enabled'=>($user->admin?true:false),
'perms'=>($user->admin?true:false),
'fk_mainmenu'=>'home',
'fk_menu'=>-1,
'mainmenu'=>'home',
'leftmenu'=>'modulesadmintools',
'type'=>'left',
'position'=>20
);
array_unshift($tabMenu,$array_menu_product); // add at beginning of array
}
}
$this->tabMenu=$tabMenu;
}
......
......@@ -555,6 +555,9 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
{
$langs->load("products");
$newmenu->add("/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("ProductVatMassChange"), 1, $user->admin);
$langs->load("accountancy");
$newmenu->add("/accountancy/admin/productaccount.php?mainmenu=home&leftmenu=modulesadmintools", $langs->trans("InitAccountancy"), 1, $user->admin);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment