From 8ffca0413a1288b85b0f033a07f9f7ebed9c596a Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Wed, 30 Mar 2022 14:47:25 -0400 Subject: [PATCH] Move "Switch CO" link from Main Menu (CFM-157) (#9) * Move "Switch CO" link out of the Main Menu and move it to the User Panel (CFM-157) * Hide main navigation and breadcrumbs when in the Select CO view (CFM-157) * Revert "Switch Collaboration" text back to "Switch CO" (CFM-157) --- app/templates/element/menuMain.php | 11 ----------- app/templates/element/menuTop.php | 13 ++++++++++++- app/templates/layout/default.php | 13 ++++++++----- app/webroot/css/co-base.css | 16 ++++++++++++++++ 4 files changed, 36 insertions(+), 17 deletions(-) diff --git a/app/templates/element/menuMain.php b/app/templates/element/menuMain.php index 5e6ad6a14..66f0af399 100644 --- a/app/templates/element/menuMain.php +++ b/app/templates/element/menuMain.php @@ -51,17 +51,6 @@ ] ]; - if(count($vv_available_cos) > 1) { - // More than one CO is available, so present the switcher - $menuItems[] = [ - 'controller' => 'cos', - 'action' => 'select', - 'permission' => null, - 'icon' => 'transfer_within_a_station', - 'label' => __d('menu', 'co.switch') - ]; - } - foreach($menuItems as $m) { if(!isset($m['permission']) || $vv_menu_permissions[ $m['permission'] ]) { $linkContent = '' diff --git a/app/templates/element/menuTop.php b/app/templates/element/menuTop.php index 01feae8c5..06ea25f00 100644 --- a/app/templates/element/menuTop.php +++ b/app/templates/element/menuTop.php @@ -36,11 +36,12 @@ person - diff --git a/app/templates/layout/default.php b/app/templates/layout/default.php index 765f49a50..356bd917b 100644 --- a/app/templates/layout/default.php +++ b/app/templates/layout/default.php @@ -79,6 +79,8 @@ $controller_stripped = preg_replace('/[^a-zA-Z0-9\-_]/', '', strtolower($this->request->getParam('controller'))); $action_stripped = preg_replace('/[^a-zA-Z0-9\-_]/', '', strtolower($this->request->getParam('action'))); $bodyClasses = $controller_stripped . ' ' .$action_stripped; + $isCoSelectView = $controller_stripped == 'cos' && $action_stripped == 'select'; + $isDashboard = $controller_stripped == 'dashboards' && $action_stripped == 'dashboard'; // add further body classes as needed if(!empty($vv_user)) { @@ -95,7 +97,7 @@
- +
menu