Doc: Add tabs where missing

This commit is contained in:
Eric Lippmann 2016-01-11 11:20:42 +01:00
parent cbfaee8681
commit 3e543808c1
4 changed files with 16 additions and 4 deletions

View File

@ -4,6 +4,7 @@
namespace Icinga\Module\Doc\Controllers;
use Icinga\Module\Doc\DocController;
use Icinga\Web\Url;
/**
* Documentation module index
@ -17,5 +18,10 @@ class IndexController extends DocController
*/
public function indexAction()
{
$this->getTabs()->add('documentation', array(
'active' => true,
'title' => $this->translate('Documentation', 'Tab title'),
'url' => Url::fromRequest()
));
}
}

View File

@ -6,6 +6,7 @@ namespace Icinga\Module\Doc\Controllers;
use Icinga\Application\Icinga;
use Icinga\Module\Doc\DocController;
use Icinga\Module\Doc\Exception\DocException;
use Icinga\Web\Url;
class ModuleController extends DocController
{
@ -53,6 +54,12 @@ class ModuleController extends DocController
}
}
$this->view->modules = $modules;
$this->getTabs()->add('module-documentation', array(
'active' => true,
'title' => $this->translate('Module Documentation', 'Tab title'),
'url' => Url::fromRequest()
));
}
/**

View File

@ -8,12 +8,12 @@
'doc/icingaweb/toc',
null,
array('title' => $this->translate('Show the documentation\'s table of contents for Icinga Web 2'))
); ?></li>
) ?></li>
<li><?= $this->qlink(
$this->translate('Module documentations'),
'doc/module/',
null,
array('title' => $this->translate('List all modules for which documentation is available'))
); ?></li>
) ?></li>
</ul>
</div>

View File

@ -1,6 +1,5 @@
<div class="controls">
<?= $this->tabs ?>
<h1><?= $this->translate('Module documentations'); ?></h1>
</div>
<div class="content">
@ -14,7 +13,7 @@
$this->translate('Show the documentation\'s table of contents for the %s'),
$module->getTitle()
))
); ?></li>
) ?></li>
<?php endforeach ?>
</ul>
</div>