doc/styles: add tabs, more to come

This commit is contained in:
Thomas Gelf 2014-11-17 10:39:25 +01:00
parent fc4b0cf40c
commit 56b00d3d58
5 changed files with 19 additions and 1 deletions

View File

@ -2,11 +2,19 @@
use Icinga\Application\Icinga;
use Icinga\Web\Controller;
use Icinga\Web\Widget;
class Doc_StyleController extends Controller
{
public function fontAction()
{
$this->view->tabs = Widget::create('tabs')->add(
'fonts',
array(
'title' => $this->translate('Icons'),
'url' => 'doc/style/font'
)
)->activate('fonts');
$confFile = Icinga::app()->getApplicationDir('fonts/fontanello-ifont/config.json');
$this->view->font = json_decode(file_get_contents($confFile));
}

View File

@ -0,0 +1,3 @@
<div class="chapter">
<?= $sectionRenderer->render($this, $this->getHelper('Url')); ?>
</div>

View File

@ -0,0 +1,6 @@
<div class="controls">
<h1><?= $title ?></h1>
</div>
<div class="content toc">
<?= $tocRenderer->render($this, $this->getHelper('Url')); ?>
</div>

View File

@ -1,4 +1,5 @@
<div class="controls">
<?= $this->tabs ?>
<h1>Icinga Web 2 Icons</h1>
</div>

View File

@ -17,7 +17,7 @@ $section->add('Icinga Web 2', array(
$section->add('Module documentations', array(
'url' => 'doc/module',
));
$section->add($this->translate('Fonts'), array(
$section->add($this->translate('Developer - Style'), array(
'url' => 'doc/style/font',
'priority' => 200,
));