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) {
$path = $this->getPath($module, $moduleManager->getModuleDir($module, '/doc'), true);
if ($path !== null) {
$modules[] = $module;
$modules[] = $moduleManager->getModule($module);
}
}
$this->view->modules = $modules;

View File

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