Skip to content

Commit

Permalink
#173 [Menu] fix: rename dashboard menu entry
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-theo committed Apr 6, 2023
1 parent 456f879 commit 4b7d49d
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions core/modules/modDoliCar.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public function __construct($db)
// Add here entries to declare new menus
/* BEGIN MODULEBUILDER TOPMENU */
$this->menu[$r++] = array(
'fk_menu'=>'fk_mainmenu=dolicar', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'fk_menu'=>'', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'top', // This is a Top menu entry
'titre'=>'DoliCar',
'prefix' => '<i class="fas fa-home pictofixedwidth"></i>',
Expand All @@ -262,7 +262,21 @@ public function __construct($db)
'target'=>'',
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);

$this->menu[$r++] = array(
'fk_menu'=>'fk_mainmenu=dolicar', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'left', // This is a Top menu entry
'titre'=> $langs->trans('Dashboard'),
'prefix' => '<i class="fas fa-home pictofixedwidth"></i>',
'mainmenu'=>'dolicar',
'leftmenu'=>'',
'url'=>'/dolicar/dolicarindex.php',
'langs'=>'dolicar@dolicar', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>1000 + $r,
'enabled'=>'$conf->dolicar->enabled', // Define condition to show or hide menu entry. Use '$conf->dolicar->enabled' if entry must be visible if module is enabled.
'perms' => '$user->rights->dolicar->lire',
'target'=>'',
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
$this->menu[$r++]=array(
// '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'fk_menu'=>'fk_mainmenu=dolicar',
Expand Down

0 comments on commit 4b7d49d

Please sign in to comment.