Fix position of menu entries
This commit is contained in:
parent
6846d8821d
commit
db46d82de3
@ -132,6 +132,37 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode
|
|||||||
$menu->add('/product/index.php?mainmenu=products&leftmenu=', $chaine, 0, $showmode, $atarget, "products", '', 30, $id, $idsel, $classname);
|
$menu->add('/product/index.php?mainmenu=products&leftmenu=', $chaine, 0, $showmode, $atarget, "products", '', 30, $id, $idsel, $classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Projects
|
||||||
|
$tmpentry=array('enabled'=>(! empty($conf->projet->enabled)),
|
||||||
|
'perms'=>(! empty($user->rights->projet->lire)),
|
||||||
|
'module'=>'projet');
|
||||||
|
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
|
||||||
|
if ($showmode)
|
||||||
|
{
|
||||||
|
$langs->load("projects");
|
||||||
|
|
||||||
|
$classname="";
|
||||||
|
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "project") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; }
|
||||||
|
else $classname = 'class="tmenu"';
|
||||||
|
$idsel='project';
|
||||||
|
|
||||||
|
$title = $langs->trans("LeadsOrProjects"); // Leads and opportunities by default
|
||||||
|
$showmodel = $showmodep = $showmode;
|
||||||
|
if (empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||||
|
{
|
||||||
|
$title = $langs->trans("Projects");
|
||||||
|
$showmodel = 0;
|
||||||
|
}
|
||||||
|
if ($conf->global->PROJECT_USE_OPPORTUNITIES == 2) {
|
||||||
|
$title = $langs->trans("Leads");
|
||||||
|
$showmodep = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$menu->add('/projet/index.php?mainmenu=project&leftmenu=', $title, 0, $showmode, $atarget, "project", '', 35, $id, $idsel, $classname);
|
||||||
|
//$menu->add('/projet/index.php?mainmenu=project&leftmenu=&search_opp_status=openedopp', $langs->trans("ListLeads"), 0, $showmodel & $conf->global->PROJECT_USE_OPPORTUNITIES, $atarget, "project", '', 70, $id, $idsel, $classname);
|
||||||
|
//$menu->add('/projet/index.php?mainmenu=project&leftmenu=&search_opp_status=notopenedopp', $langs->trans("ListProjects"), 0, $showmodep, $atarget, "project", '', 70, $id, $idsel, $classname);
|
||||||
|
}
|
||||||
|
|
||||||
// Commercial
|
// Commercial
|
||||||
$menuqualified=0;
|
$menuqualified=0;
|
||||||
if (! empty($conf->propal->enabled)) $menuqualified++;
|
if (! empty($conf->propal->enabled)) $menuqualified++;
|
||||||
@ -222,37 +253,6 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode
|
|||||||
$menu->add('/accountancy/index.php?mainmenu=accountancy&leftmenu=', $langs->trans("MenuAccountancy"), 0, $showmode, $atarget, "accountancy", '', 54, $id, $idsel, $classname);
|
$menu->add('/accountancy/index.php?mainmenu=accountancy&leftmenu=', $langs->trans("MenuAccountancy"), 0, $showmode, $atarget, "accountancy", '', 54, $id, $idsel, $classname);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Projects
|
|
||||||
$tmpentry=array('enabled'=>(! empty($conf->projet->enabled)),
|
|
||||||
'perms'=>(! empty($user->rights->projet->lire)),
|
|
||||||
'module'=>'projet');
|
|
||||||
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
|
|
||||||
if ($showmode)
|
|
||||||
{
|
|
||||||
$langs->load("projects");
|
|
||||||
|
|
||||||
$classname="";
|
|
||||||
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "project") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; }
|
|
||||||
else $classname = 'class="tmenu"';
|
|
||||||
$idsel='project';
|
|
||||||
|
|
||||||
$title = $langs->trans("LeadsOrProjects"); // Leads and opportunities by default
|
|
||||||
$showmodel = $showmodep = $showmode;
|
|
||||||
if (empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
|
||||||
{
|
|
||||||
$title = $langs->trans("Projects");
|
|
||||||
$showmodel = 0;
|
|
||||||
}
|
|
||||||
if ($conf->global->PROJECT_USE_OPPORTUNITIES == 2) {
|
|
||||||
$title = $langs->trans("Leads");
|
|
||||||
$showmodep = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
$menu->add('/projet/index.php?mainmenu=project&leftmenu=', $title, 0, $showmode, $atarget, "project", '', 70, $id, $idsel, $classname);
|
|
||||||
//$menu->add('/projet/index.php?mainmenu=project&leftmenu=&search_opp_status=openedopp', $langs->trans("ListLeads"), 0, $showmodel & $conf->global->PROJECT_USE_OPPORTUNITIES, $atarget, "project", '', 70, $id, $idsel, $classname);
|
|
||||||
//$menu->add('/projet/index.php?mainmenu=project&leftmenu=&search_opp_status=notopenedopp', $langs->trans("ListProjects"), 0, $showmodep, $atarget, "project", '', 70, $id, $idsel, $classname);
|
|
||||||
}
|
|
||||||
|
|
||||||
// HRM
|
// HRM
|
||||||
$tmpentry=array('enabled'=>(! empty($conf->hrm->enabled) || ! empty($conf->holiday->enabled) || ! empty($conf->deplacement->enabled) || ! empty($conf->expensereport->enabled)),
|
$tmpentry=array('enabled'=>(! empty($conf->hrm->enabled) || ! empty($conf->holiday->enabled) || ! empty($conf->deplacement->enabled) || ! empty($conf->expensereport->enabled)),
|
||||||
'perms'=>(! empty($user->rights->hrm->employee->read) || ! empty($user->rights->holiday->write) || ! empty($user->rights->deplacement->lire) || ! empty($user->rights->expensereport->lire)),
|
'perms'=>(! empty($user->rights->hrm->employee->read) || ! empty($user->rights->holiday->write) || ! empty($user->rights->deplacement->lire) || ! empty($user->rights->expensereport->lire)),
|
||||||
@ -1196,8 +1196,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
*/
|
*/
|
||||||
if ($mainmenu == 'bank')
|
if ($mainmenu == 'bank')
|
||||||
{
|
{
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("withdrawals","banks","bills","categories"));
|
$langs->loadLangs(array("withdrawals","banks","bills","categories"));
|
||||||
|
|
||||||
// Bank-Caisse
|
// Bank-Caisse
|
||||||
if (! empty($conf->banque->enabled))
|
if (! empty($conf->banque->enabled))
|
||||||
@ -1212,11 +1212,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
$newmenu->add("/compta/bank/transfer.php",$langs->trans("MenuBankInternalTransfer"),1,$user->rights->banque->transfer);
|
$newmenu->add("/compta/bank/transfer.php",$langs->trans("MenuBankInternalTransfer"),1,$user->rights->banque->transfer);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->categorie->enabled)) {
|
if (! empty($conf->categorie->enabled))
|
||||||
$langs->load("categories");
|
{
|
||||||
$newmenu->add("/categories/index.php?type=5",$langs->trans("Rubriques"),1,$user->rights->categorie->creer, '', $mainmenu, 'tags');
|
$langs->load("categories");
|
||||||
$newmenu->add("/compta/bank/categ.php",$langs->trans("RubriquesTransactions"),1,$user->rights->categorie->creer, '', $mainmenu, 'tags');
|
$newmenu->add("/categories/index.php?type=5",$langs->trans("Rubriques"),1,$user->rights->categorie->creer, '', $mainmenu, 'tags');
|
||||||
}
|
$newmenu->add("/compta/bank/categ.php",$langs->trans("RubriquesTransactions"),1,$user->rights->categorie->creer, '', $mainmenu, 'tags');
|
||||||
|
}
|
||||||
|
|
||||||
// Prelevements
|
// Prelevements
|
||||||
if (! empty($conf->prelevement->enabled))
|
if (! empty($conf->prelevement->enabled))
|
||||||
|
|||||||
@ -210,7 +210,7 @@ class modAgenda extends DolibarrModules
|
|||||||
'mainmenu'=>'agenda',
|
'mainmenu'=>'agenda',
|
||||||
'url'=>'/comm/action/index.php',
|
'url'=>'/comm/action/index.php',
|
||||||
'langs'=>'agenda',
|
'langs'=>'agenda',
|
||||||
'position'=>15,
|
'position'=>86,
|
||||||
'perms'=>'$user->rights->agenda->myactions->read',
|
'perms'=>'$user->rights->agenda->myactions->read',
|
||||||
'enabled'=>'$conf->agenda->enabled',
|
'enabled'=>'$conf->agenda->enabled',
|
||||||
'target'=>'',
|
'target'=>'',
|
||||||
|
|||||||
@ -129,7 +129,7 @@ class modECM extends DolibarrModules
|
|||||||
'mainmenu'=>'ecm',
|
'mainmenu'=>'ecm',
|
||||||
'url'=>'/ecm/index.php',
|
'url'=>'/ecm/index.php',
|
||||||
'langs'=>'ecm',
|
'langs'=>'ecm',
|
||||||
'position'=>100,
|
'position'=>82,
|
||||||
'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup',
|
'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup',
|
||||||
'enabled'=>'$conf->ecm->enabled',
|
'enabled'=>'$conf->ecm->enabled',
|
||||||
'target'=>'',
|
'target'=>'',
|
||||||
|
|||||||
@ -32,7 +32,6 @@ require_once DOL_DOCUMENT_ROOT . "/core/modules/DolibarrModules.class.php";
|
|||||||
*/
|
*/
|
||||||
class modTicket extends DolibarrModules
|
class modTicket extends DolibarrModules
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor. Define names, constants, directories, boxes, permissions
|
* Constructor. Define names, constants, directories, boxes, permissions
|
||||||
*
|
*
|
||||||
@ -194,7 +193,7 @@ class modTicket extends DolibarrModules
|
|||||||
'leftmenu' => '1', // Use 1 if you also want to add left menu entries using this descriptor.
|
'leftmenu' => '1', // Use 1 if you also want to add left menu entries using this descriptor.
|
||||||
'url' => '/ticket/index.php',
|
'url' => '/ticket/index.php',
|
||||||
'langs' => 'ticket', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
'langs' => 'ticket', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||||
'position' => 100,
|
'position' => 88,
|
||||||
'enabled' => '$conf->ticket->enabled', // Define condition to show or hide menu entry. Use '$conf->ticket->enabled' if entry must be visible if module is enabled.
|
'enabled' => '$conf->ticket->enabled', // Define condition to show or hide menu entry. Use '$conf->ticket->enabled' if entry must be visible if module is enabled.
|
||||||
'perms' => '$user->rights->ticket->read', // Use 'perms'=>'$user->rights->ticket->level1->level2' if you want your menu with a permission rules
|
'perms' => '$user->rights->ticket->read', // Use 'perms'=>'$user->rights->ticket->level1->level2' if you want your menu with a permission rules
|
||||||
'target' => '',
|
'target' => '',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user