diff --git a/out/out.Help.php b/out/out.Help.php index 3c9a3192e..e68154dae 100644 --- a/out/out.Help.php +++ b/out/out.Help.php @@ -23,8 +23,16 @@ include("../inc/inc.ClassUI.php"); include("../inc/inc.Authentication.php"); $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) { + $view->setParam('dms', $dms); + $view->setParam('user', $user); + $view->setParam('context', $context); $view->show(); exit; } diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index c855e1be4..63e75a575 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -296,7 +296,8 @@ $(document).ready(function () { // echo "
  • params['rootfolderid']."\">".getMLText("search")."
  • \n"; if ($this->params['enablecalendar']) echo "
  • params['calendardefaultview']."\">".getMLText("calendar")."
  • \n"; if ($this->params['user']->isAdmin()) echo "
  • ".getMLText("admin_tools")."
  • \n"; - echo "
  • ".getMLText("help")."
  • \n"; + $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); + echo "
  • ".getMLText("help")."
  • \n"; echo " \n"; echo "
    "; if ($folder!=null && is_object($folder) && !strcasecmp(get_class($folder), "SeedDMS_Core_Folder")) { diff --git a/views/bootstrap/class.Help.php b/views/bootstrap/class.Help.php index 96864e17b..5a209068e 100644 --- a/views/bootstrap/class.Help.php +++ b/views/bootstrap/class.Help.php @@ -34,15 +34,20 @@ class SeedDMS_View_Help extends SeedDMS_Bootstrap_Style { function show() { /* {{{ */ $dms = $this->params['dms']; $user = $this->params['user']; + $context = $this->params['context']; $this->htmlStartPage(getMLText("help")); $this->globalNavigation(); $this->contentStart(); - $this->pageNavigation(getMLText("help"), ""); + $this->pageNavigation(getMLText("help").": ".getMLText('help_'.strtolower($context), array(), $context), ""); $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->htmlEndPage();