icingaweb2/modules/doc/application/controllers/StyleController.php

42 lines
1.1 KiB
PHP
Raw Normal View History

<?php
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
namespace Icinga\Module\Doc\Controllers;
use Icinga\Application\Icinga;
use Icinga\Web\Controller;
2014-11-17 10:39:25 +01:00
use Icinga\Web\Widget;
class StyleController extends Controller
{
public function guideAction()
{
$this->view->tabs = $this->tabs()->activate('guide');
}
public function fontAction()
{
$this->view->tabs = $this->tabs()->activate('font');
$confFile = Icinga::app()->getApplicationDir('fonts/fontello-ifont/config.json');
$this->view->font = json_decode(file_get_contents($confFile));
}
protected function tabs()
{
return Widget::create('tabs')->add(
'guide',
array(
2015-02-27 09:32:44 +01:00
'label' => $this->translate('Style Guide'),
'url' => 'doc/style/guide'
)
)->add(
2014-11-20 17:25:58 +01:00
'font',
2014-11-17 10:39:25 +01:00
array(
2015-02-27 09:32:44 +01:00
'label' => $this->translate('Icons'),
'title' => $this->translate('List all available icons'),
'url' => 'doc/style/font'
2014-11-17 10:39:25 +01:00
)
);
}
}