From 9017575c4eb24b3f97a86b96eb6ee4f82d816747 Mon Sep 17 00:00:00 2001 From: Mathieu Lutfy Date: Tue, 11 Jul 2023 11:45:43 -0400 Subject: [PATCH] Standalone: do not show the Hide Menu option --- CRM/Core/BAO/Navigation.php | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/CRM/Core/BAO/Navigation.php b/CRM/Core/BAO/Navigation.php index 470280d4ac..f9b4d52cec 100644 --- a/CRM/Core/BAO/Navigation.php +++ b/CRM/Core/BAO/Navigation.php @@ -892,30 +892,31 @@ ORDER BY weight"; unset($item['attributes']['label'], $item['attributes']['url']); $item['attributes']['icon'] = 'crm-logo-sm'; $item['attributes']['attr']['accesskey'] = 'm'; - $item['child'] = [ - [ - 'attributes' => [ - 'label' => ts('CiviCRM Home'), - 'name' => 'CiviCRM Home', - 'url' => 'civicrm/dashboard?reset=1', - 'weight' => 1, - ], + $item['child'] = []; + $item['child'][] = [ + 'attributes' => [ + 'label' => ts('CiviCRM Home'), + 'name' => 'CiviCRM Home', + 'url' => 'civicrm/dashboard?reset=1', + 'weight' => 1, ], - [ + ]; + if (CIVICRM_UF !== 'Standalone') { + $item['child'][] = [ 'attributes' => [ 'label' => ts('Hide Menu'), 'name' => 'Hide Menu', 'url' => '#hidemenu', 'weight' => 2, ], - ], - [ - 'attributes' => [ - 'label' => ts('Log out'), - 'name' => 'Log out', - 'url' => 'civicrm/logout?reset=1', - 'weight' => 3, - ], + ]; + } + $item['child'][] = [ + 'attributes' => [ + 'label' => ts('Log out'), + 'name' => 'Log out', + 'url' => 'civicrm/logout?reset=1', + 'weight' => 3, ], ]; return; -- 2.25.1