Update entries menus

This commit is contained in:
atm-ph 2017-03-25 19:10:16 +01:00
parent 4197254209
commit 21e30e43d9

View File

@ -214,63 +214,53 @@ class modinventory extends DolibarrModules
$this->menu = array(); // List of menus to add $this->menu = array(); // List of menus to add
$r=0; $r=0;
// Add here entries to declare new menus
// $this->menu[$r]=array(
// Example to declare a new Top Menu entry and its Left menu entry: 'fk_menu'=>'fk_mainmenu=products', // Put 0 if this is a top menu
// $this->menu[$r]=array( 'fk_menu'=>0, // Put 0 if this is a top menu 'type'=>'left', // This is a Top menu entry
// 'type'=>'top', // This is a Top menu entry 'titre'=>'Inventory',
// 'titre'=>'inventory top menu', 'mainmenu'=>'products',
// 'mainmenu'=>'inventory', 'leftmenu'=>'inventory_left',
// 'leftmenu'=>'inventory', 'url'=>'/inventory/list.php',
// 'url'=>'/inventory/pagetop.php', 'langs'=>'inventory', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
// 'langs'=>'mylangfile@inventory', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>100+$r,
// 'position'=>100, 'enabled'=>'$conf->inventory->enabled', // Define condition to show or hide menu entry. Use '$conf->inventory->enabled' if entry must be visible if module is enabled.
// 'enabled'=>'$conf->inventory->enabled', // Define condition to show or hide menu entry. Use '$conf->inventory->enabled' if entry must be visible if module is enabled. 'perms'=>'$user->rights->inventory->read', // Use 'perms'=>'$user->rights->inventory->level1->level2' if you want your menu with a permission rules
// 'perms'=>'1', // Use 'perms'=>'$user->rights->inventory->level1->level2' if you want your menu with a permission rules 'target'=>'',
// 'target'=>'', 'user'=>2
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both ); // 0=Menu for internal users, 1=external users, 2=both
// $r++; $r++;
//
// Example to declare a Left Menu entry into an existing Top menu entry: $this->menu[$r]=array(
// $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=xxx', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode 'fk_menu'=>'fk_mainmenu=products,fk_leftmenu=inventory_left', // Put 0 if this is a top menu
// 'type'=>'left', // This is a Left menu entry 'type'=>'left', // This is a Top menu entry
// 'titre'=>'inventory left menu', 'titre'=>'NewInventory',
// 'mainmenu'=>'xxx', 'mainmenu'=>'products',
// 'leftmenu'=>'inventory', 'leftmenu'=>'inventory_left_create',
// 'url'=>'/inventory/pagelevel2.php', 'url'=>'/inventory/inventory.php?action=create',
// 'langs'=>'mylangfile@inventory', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'position'=>100+$r,
// 'position'=>100, 'enabled'=>'$conf->inventory->enabled', // Define condition to show or hide menu entry. Use '$conf->inventory->enabled' if entry must be visible if module is enabled.
// 'enabled'=>'$conf->inventory->enabled', // Define condition to show or hide menu entry. Use '$conf->inventory->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. 'perms'=>'$user->rights->inventory->create', // Use 'perms'=>'$user->rights->inventory->level1->level2' if you want your menu with a permission rules
// 'perms'=>'1', // Use 'perms'=>'$user->rights->inventory->level1->level2' if you want your menu with a permission rules 'target'=>'',
// 'target'=>'', 'user'=>2
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both ); // 0=Menu for internal users, 1=external users, 2=both
// $r++;
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=products,fk_leftmenu=stock', // Put 0 if this is a top menu
'type'=>'left', // This is a Top menu entry
'titre'=>'ListInventory',
'mainmenu'=>'inventory',
'leftmenu'=>'inventory',
'url'=>'/inventory/list.php',
'langs'=>'inventory', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>100,
'enabled'=>'$conf->inventory->enabled', // Define condition to show or hide menu entry. Use '$conf->inventory->enabled' if entry must be visible if module is enabled.
'perms'=>'$user->rights->inventory->read', // Use 'perms'=>'$user->rights->inventory->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
$r++; $r++;
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=products,fk_leftmenu=stock', // Put 0 if this is a top menu $this->menu[$r]=array(
'type'=>'left', // This is a Top menu entry 'fk_menu'=>'fk_mainmenu=products,fk_leftmenu=inventory_left', // Put 0 if this is a top menu
'titre'=>'NewInventory', 'type'=>'left', // This is a Top menu entry
'mainmenu'=>'inventory', 'titre'=>'ListInventory',
'leftmenu'=>'inventory', 'mainmenu'=>'products',
'url'=>'/inventory/inventory.php?action=create', 'leftmenu'=>'inventory_left_list',
'position'=>100, 'url'=>'/inventory/list.php',
'enabled'=>'$conf->inventory->enabled', // Define condition to show or hide menu entry. Use '$conf->inventory->enabled' if entry must be visible if module is enabled. 'langs'=>'inventory', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'perms'=>'$user->rights->inventory->create', // Use 'perms'=>'$user->rights->inventory->level1->level2' if you want your menu with a permission rules 'position'=>100+$r,
'target'=>'', 'enabled'=>'$conf->inventory->enabled', // Define condition to show or hide menu entry. Use '$conf->inventory->enabled' if entry must be visible if module is enabled.
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both 'perms'=>'$user->rights->inventory->read', // Use 'perms'=>'$user->rights->inventory->level1->level2' if you want your menu with a permission rules
$r++; 'target'=>'',
'user'=>2
); // 0=Menu for internal users, 1=external users, 2=both
$r++;
// Exports // Exports
$r=1; $r=1;