WIP EGroupware Tutorial:

- Add disable option in admin site configuration in order to be able to switch off the tutorials menu in sideboxes
This commit is contained in:
Hadi Nategh 2015-10-09 07:42:13 +00:00
parent 781f128265
commit 52a3e2240c
2 changed files with 24 additions and 11 deletions

View File

@ -100,7 +100,17 @@
</select>
</td>
</tr>
<tr class="row_off">
<td>{lang_Disable_EGroupware_Tutorial_in_sidebox_menu}:</td>
<td>
<select name="newsettings[egw_tutorial_disable]">
<option value="">{lang_No}</option>
<option value="True">{lang_Yes}</option>
</select>
</td>
</tr>
<tr class="th">
<td colspan="2">&nbsp;<b>{lang_security}</b></td>
</tr>

View File

@ -387,15 +387,18 @@ class hooks
*/
public static function egw_tutorial_menu($appname)
{
$file = Array (
array(
'text' => '<div id="egw_tutorial_'.$appname.'_sidebox" class="egwTutorial"/>',
'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' => '<div id="egw_tutorial_'.$appname.'_sidebox" class="egwTutorial"/>',
'no_lang' => true,
'link' => false,
'icon' => false,
),
'menuOpened' => true
);
display_sidebox($appname, lang('EGroupware Tutorial'), $file);
}
}
}