mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 23:24:57 +00:00
allow context sensitive help files
This commit is contained in:
parent
2cd37d90b1
commit
0e8a385b6d
|
@ -25,8 +25,16 @@ include("../inc/inc.ClassUI.php");
|
||||||
include("../inc/inc.Authentication.php");
|
include("../inc/inc.Authentication.php");
|
||||||
|
|
||||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
$view = UI::factory($theme, $tmp[1]);
|
||||||
|
|
||||||
|
if(isset($_GET['context']))
|
||||||
|
$context = $_GET['context'];
|
||||||
|
else
|
||||||
|
$context = '';
|
||||||
if($view) {
|
if($view) {
|
||||||
|
$view->setParam('dms', $dms);
|
||||||
|
$view->setParam('user', $user);
|
||||||
|
$view->setParam('context', $context);
|
||||||
$view->show();
|
$view->show();
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
|
@ -314,7 +314,8 @@ $(document).ready(function () {
|
||||||
// echo " <li><a href=\"../out/out.SearchForm.php?folderid=".$this->params['rootfolderid']."\">".getMLText("search")."</a></li>\n";
|
// echo " <li><a href=\"../out/out.SearchForm.php?folderid=".$this->params['rootfolderid']."\">".getMLText("search")."</a></li>\n";
|
||||||
if ($this->params['enablecalendar']) echo " <li><a href=\"../out/out.Calendar.php?mode=".$this->params['calendardefaultview']."\">".getMLText("calendar")."</a></li>\n";
|
if ($this->params['enablecalendar']) echo " <li><a href=\"../out/out.Calendar.php?mode=".$this->params['calendardefaultview']."\">".getMLText("calendar")."</a></li>\n";
|
||||||
if ($this->params['user']->isAdmin()) echo " <li><a href=\"../out/out.AdminTools.php\">".getMLText("admin_tools")."</a></li>\n";
|
if ($this->params['user']->isAdmin()) echo " <li><a href=\"../out/out.AdminTools.php\">".getMLText("admin_tools")."</a></li>\n";
|
||||||
echo " <li><a href=\"../out/out.Help.php\">".getMLText("help")."</a></li>\n";
|
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||||
|
echo " <li><a href=\"../out/out.Help.php?context=".$tmp[1]."\">".getMLText("help")."</a></li>\n";
|
||||||
echo " </ul>\n";
|
echo " </ul>\n";
|
||||||
echo " <form action=\"../op/op.Search.php\" class=\"form-inline navbar-search pull-left\" autocomplete=\"off\">";
|
echo " <form action=\"../op/op.Search.php\" class=\"form-inline navbar-search pull-left\" autocomplete=\"off\">";
|
||||||
if ($folder!=null && is_object($folder) && !strcasecmp(get_class($folder), $dms->getClassname('folder'))) {
|
if ($folder!=null && is_object($folder) && !strcasecmp(get_class($folder), $dms->getClassname('folder'))) {
|
||||||
|
|
|
@ -34,15 +34,20 @@ class SeedDMS_View_Help extends SeedDMS_Bootstrap_Style {
|
||||||
function show() { /* {{{ */
|
function show() { /* {{{ */
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
$user = $this->params['user'];
|
$user = $this->params['user'];
|
||||||
|
$context = $this->params['context'];
|
||||||
|
|
||||||
$this->htmlStartPage(getMLText("help"));
|
$this->htmlStartPage(getMLText("help"));
|
||||||
$this->globalNavigation();
|
$this->globalNavigation();
|
||||||
$this->contentStart();
|
$this->contentStart();
|
||||||
$this->pageNavigation(getMLText("help"), "");
|
$this->pageNavigation(getMLText("help").": ".getMLText('help_'.strtolower($context), array(), $context), "");
|
||||||
|
|
||||||
$this->contentContainerStart();
|
$this->contentContainerStart();
|
||||||
|
|
||||||
readfile("../languages/".$this->params['session']->getLanguage()."/help.htm");
|
$helpfile = "../languages/".$this->params['session']->getLanguage()."/help/".$context.".html";
|
||||||
|
if(file_exists($helpfile))
|
||||||
|
readfile($helpfile);
|
||||||
|
else
|
||||||
|
readfile("../languages/".$this->params['session']->getLanguage()."/help.htm");
|
||||||
|
|
||||||
$this->contentContainerEnd();
|
$this->contentContainerEnd();
|
||||||
$this->htmlEndPage();
|
$this->htmlEndPage();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user