From: cajus Date: Tue, 7 Jun 2005 06:29:38 +0000 (+0000) Subject: Added hook to call helpviewer. The latter is not started yet... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=18dee3c853e42f9c4ff7c0bf181d15b879f6d1db;p=gosa.git Added hook to call helpviewer. The latter is not started yet... git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@607 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/html/helpviewer.php b/html/helpviewer.php new file mode 100644 index 000000000..d2f1e708e --- /dev/null +++ b/html/helpviewer.php @@ -0,0 +1,67 @@ +"._("Help is not available if you are not logged in.").""; + exit; +} + +/* Set template compile directory */ +$config= $_SESSION['config']; +if (isset ($config->data['MAIN']['COMPILE'])){ + $smarty->compile_dir= $config->data['MAIN']['COMPILE']; +} else { + $smarty->compile_dir= '/var/spool/gosa/'; +} + +/* Language setup */ +if ($config->data['MAIN']['LANG'] == ""){ + $lang= get_browser_language(); +} else { + $lang= $config->data['MAIN']['LANG']; +} +$lang.=".UTF-8"; +putenv("LANGUAGE="); +putenv("LANG=$lang"); +setlocale(LC_ALL, $lang); +$GLOBALS['t_language']= $lang; +$GLOBALS['t_gettext_message_dir'] = $BASE_DIR.'/locale/'; + +/* Set the text domain as 'messages' */ +$domain = 'messages'; +bindtextdomain($domain, "$BASE_DIR/locale"); +textdomain($domain); +@DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $lang, "Setting language to"); + +/* Get plugin list */ +$plist= $_SESSION['plist']; + +echo "Help..."; + +// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: +?> diff --git a/html/main.php b/html/main.php index af4f52d67..99746264a 100644 --- a/html/main.php +++ b/html/main.php @@ -202,10 +202,17 @@ if(isset($_SESSION['POST'])){ /* show web frontend */ $smarty->assign ("date", date("l, dS F Y H:i:s O")); $smarty->assign ("must", "*"); +if (isset($plug)){ + $plug= "?plug=$plug"; +} else { + $plug= ""; +} if ($_SESSION['js']==FALSE){ $smarty->assign("javascript", "false"); + $smarty->assign("help_method", "href='helpviewer.php$plug' target='_new'"); } else { $smarty->assign("javascript", "true"); + $smarty->assign("help_method", "href='' onClick=\"window.open('helpviewer.php$plug','{t}GOsa help{/t}','width=600,height=700')\""); } $smarty->assign ("username", $ui->username); $smarty->assign ("go_logo", get_template_path('images/go_logo.png')); @@ -218,11 +225,8 @@ $smarty->assign ("go_left", get_template_path('images/go_left.png')); $smarty->assign ("go_help", get_template_path('images/help.png')); $plist->gen_menu(); $smarty->assign ("menu", $plist->menu); -if (isset($plug)){ - $smarty->assign ("plug", "?plug=$plug"); -} else { - $smarty->assign ("plug", ""); -} +$smarty->assign ("plug", "$plug"); + $header= "".$smarty->fetch(get_template_path('headers.tpl')); diff --git a/ihtml/themes/altlinux/framework.tpl b/ihtml/themes/altlinux/framework.tpl index b8ed5da13..4c1ac5cd2 100644 --- a/ihtml/themes/altlinux/framework.tpl +++ b/ihtml/themes/altlinux/framework.tpl @@ -16,7 +16,7 @@ - + GOSA2 {t}Help{/t} diff --git a/ihtml/themes/default/framework.tpl b/ihtml/themes/default/framework.tpl index 7813effbb..239e725f6 100644 --- a/ihtml/themes/default/framework.tpl +++ b/ihtml/themes/default/framework.tpl @@ -16,7 +16,7 @@ - + GOSA2 {t}Help{/t}