2014-11-13 09:54:31 -05:00
|
|
|
<?php
|
2016-02-08 09:41:00 -05:00
|
|
|
/* Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+ */
|
2014-11-13 09:54:31 -05:00
|
|
|
|
2015-08-27 08:22:35 -04:00
|
|
|
namespace Icinga\Module\Doc\Controllers;
|
|
|
|
|
|
2014-11-13 09:54:31 -05:00
|
|
|
use Icinga\Application\Icinga;
|
|
|
|
|
use Icinga\Web\Controller;
|
2014-11-17 04:39:25 -05:00
|
|
|
use Icinga\Web\Widget;
|
2014-11-13 09:54:31 -05:00
|
|
|
|
2015-08-27 08:22:35 -04:00
|
|
|
class StyleController extends Controller
|
2014-11-13 09:54:31 -05:00
|
|
|
{
|
2014-11-17 10:53:14 -05:00
|
|
|
public function guideAction()
|
|
|
|
|
{
|
|
|
|
|
$this->view->tabs = $this->tabs()->activate('guide');
|
|
|
|
|
}
|
|
|
|
|
|
2014-11-13 09:54:31 -05:00
|
|
|
public function fontAction()
|
|
|
|
|
{
|
2014-11-17 10:53:14 -05:00
|
|
|
$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 03:32:44 -05:00
|
|
|
'label' => $this->translate('Style Guide'),
|
|
|
|
|
'url' => 'doc/style/guide'
|
2014-11-17 10:53:14 -05:00
|
|
|
)
|
|
|
|
|
)->add(
|
2014-11-20 11:25:58 -05:00
|
|
|
'font',
|
2014-11-17 04:39:25 -05:00
|
|
|
array(
|
2015-02-27 03:32:44 -05:00
|
|
|
'label' => $this->translate('Icons'),
|
|
|
|
|
'title' => $this->translate('List all available icons'),
|
|
|
|
|
'url' => 'doc/style/font'
|
2014-11-17 04:39:25 -05:00
|
|
|
)
|
2014-11-17 10:53:14 -05:00
|
|
|
);
|
2014-11-13 09:54:31 -05:00
|
|
|
}
|
|
|
|
|
}
|