From c16a88c4c4dc67d90311fffa711c0925d886fb42 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Wed, 13 Sep 2023 05:19:47 +0200 Subject: [PATCH] NEW Add option to access directly in project list when you click in menu (PROJECT_FORCE_LIST_ACCESS) --- htdocs/custom/oblyon/core/menus/standard/oblyon.lib.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/custom/oblyon/core/menus/standard/oblyon.lib.php b/htdocs/custom/oblyon/core/menus/standard/oblyon.lib.php index c439a5d..52105cd 100644 --- a/htdocs/custom/oblyon/core/menus/standard/oblyon.lib.php +++ b/htdocs/custom/oblyon/core/menus/standard/oblyon.lib.php @@ -279,8 +279,12 @@ function print_oblyon_menu($db, $atarget, $type_user = 0, &$tabMenu, &$menu, $no $idsel='project'; if (empty($noout)) print_start_menu_entry($idsel,$itemsel,$showmode); - if (empty($noout)) print_text_menu_entry($langs->trans("MenuProjectsOpportunities"), $showmode, DOL_URL_ROOT.'/projet/index.php?mainmenu=project&leftmenu=', $id, $idsel, $atarget); - if (empty($noout)) print_end_menu_entry($showmode); + if (!empty($conf->global->PROJECT_FORCE_LIST_ACCESS)) { + if (empty($noout)) print_text_menu_entry($langs->trans("MenuProjectsOpportunities"), $showmode, DOL_URL_ROOT . '/projet/list.php?mainmenu=project&leftmenu=', $id, $idsel, $atarget); + } else { + if (empty($noout)) print_text_menu_entry($langs->trans("MenuProjectsOpportunities"), $showmode, DOL_URL_ROOT . '/projet/index.php?mainmenu=project&leftmenu=', $id, $idsel, $atarget); + } + if (empty($noout)) print_end_menu_entry($showmode); $title = $langs->trans("LeadsOrProjects"); // Leads and opportunities by default $showmodel = $showmodep = $showmode; if (empty($conf->global->PROJECT_USE_OPPORTUNITIES))