doc: Use module name for tab and window title

This commit is contained in:
Eric Lippmann 2016-04-01 12:04:49 +02:00
parent 38892a971f
commit 3ecf390a4b
2 changed files with 5 additions and 4 deletions

View File

@ -90,11 +90,12 @@ class ModuleController extends DocController
{
$module = $this->params->getRequired('moduleName');
$this->assertModuleInstalled($module);
$this->view->moduleName = $module;
$moduleManager = Icinga::app()->getModuleManager();
$name = $moduleManager->getModule($module)->getTitle();
try {
$this->renderToc(
$this->getPath($module, Icinga::app()->getModuleManager()->getModuleDir($module, '/doc')),
$module,
$name,
'doc/module/chapter',
array('moduleName' => $module)
);

View File

@ -71,10 +71,10 @@ class DocController extends Controller
->setUrl($url)
->setUrlParams($urlParams);
$name = ucfirst($name);
$this->view->title = sprintf($this->translate('%s Documentation'), $name);
$title = sprintf($this->translate('%s Documentation'), $name);
$this->getTabs()->add('toc', array(
'active' => true,
'title' => $name,
'title' => $title,
'url' => Url::fromRequest()
));
$this->render('toc', null, true);