From 52a3e2240cacaebb4e85a37a4a96268cf17daa6b Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 9 Oct 2015 07:42:13 +0000 Subject: [PATCH] WIP EGroupware Tutorial: - Add disable option in admin site configuration in order to be able to switch off the tutorials menu in sideboxes --- admin/templates/default/config.tpl | 12 +++++++++++- phpgwapi/inc/class.hooks.inc.php | 23 +++++++++++++---------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/admin/templates/default/config.tpl b/admin/templates/default/config.tpl index 75877b260c..2a16bca796 100644 --- a/admin/templates/default/config.tpl +++ b/admin/templates/default/config.tpl @@ -100,7 +100,17 @@ - + + + {lang_Disable_EGroupware_Tutorial_in_sidebox_menu}: + + + + +  {lang_security} diff --git a/phpgwapi/inc/class.hooks.inc.php b/phpgwapi/inc/class.hooks.inc.php index 018ea16067..d74f7d571e 100644 --- a/phpgwapi/inc/class.hooks.inc.php +++ b/phpgwapi/inc/class.hooks.inc.php @@ -387,15 +387,18 @@ class hooks */ public static function egw_tutorial_menu($appname) { - $file = Array ( - array( - 'text' => '
', - 'no_lang' => true, - 'link' => false, - 'icon' => false, - ), - 'menuOpened' => true - ); - display_sidebox($appname, lang('EGroupware Tutorial'), $file); + if (!$GLOBALS['egw_info']['server']['egw_tutorial_disable']) + { + $file = Array ( + array( + 'text' => '
', + 'no_lang' => true, + 'link' => false, + 'icon' => false, + ), + 'menuOpened' => true + ); + display_sidebox($appname, lang('EGroupware Tutorial'), $file); + } } }