Add proper title to each module documentation link

refs #8458
This commit is contained in:
Johannes Meyer 2015-02-23 17:17:48 +01:00
parent b626a96e16
commit de744fdc83
2 changed files with 15 additions and 11 deletions

View File

@ -52,7 +52,7 @@ class Doc_ModuleController extends DocController
foreach ($moduleManager->listEnabledModules() as $module) { foreach ($moduleManager->listEnabledModules() as $module) {
$path = $this->getPath($module, $moduleManager->getModuleDir($module, '/doc'), true); $path = $this->getPath($module, $moduleManager->getModuleDir($module, '/doc'), true);
if ($path !== null) { if ($path !== null) {
$modules[] = $module; $modules[] = $moduleManager->getModule($module);
} }
} }
$this->view->modules = $modules; $this->view->modules = $modules;

View File

@ -1,15 +1,19 @@
<div class="controls"> <div class="controls">
<?= /** @type \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton() ?> <?= /** @type \Icinga\Web\Widget\Tabs $tabs */ $tabs->showOnlyCloseButton(); ?>
<h1><?= $this->translate('Module documentations') ?></h1> <h1><?= $this->translate('Module documentations'); ?></h1>
</div> </div>
<div class="content"> <div class="content">
<ul> <ul>
<?php foreach ($modules as $module): ?> <?php foreach ($modules as $module): ?>
<li> <li><?= $this->qlink(
<a href="<?= $this->getHelper('Url')->url(array('moduleName' => $module), 'doc/module/toc', false, false) ?>"> $module->getTitle(),
<?= $module ?> 'doc/module/toc',
</a> array('moduleName' => $module->getName()),
</li> array('title' => sprintf(
<?php endforeach ?> $this->translate('Show the documentation\'s table of contents for the %s'),
$module->getTitle()
))
); ?></li>
<?php endforeach ?>
</ul> </ul>
</div> </div>