[icinga-checkins] icinga.org: icingaweb2/master: doc/styles: add tabs, more to come

git at icinga.org git at icinga.org
Mon Nov 17 10:39:55 CET 2014


Module: icingaweb2
Branch: master
Commit: 56b00d3d584efa49c6772fd5bb271c658c699f58
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=56b00d3d584efa49c6772fd5bb271c658c699f58

Author: Thomas Gelf <thomas at gelf.net>
Date:   Mon Nov 17 10:39:25 2014 +0100

doc/styles: add tabs, more to come

---

 modules/doc/application/controllers/StyleController.php    |    8 ++++++++
 modules/doc/application/views/scripts/module/chapter.phtml |    3 +++
 modules/doc/application/views/scripts/module/toc.phtml     |    6 ++++++
 modules/doc/application/views/scripts/style/font.phtml     |    1 +
 modules/doc/configuration.php                              |    2 +-
 5 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/modules/doc/application/controllers/StyleController.php b/modules/doc/application/controllers/StyleController.php
index dc61a97..889187e 100644
--- a/modules/doc/application/controllers/StyleController.php
+++ b/modules/doc/application/controllers/StyleController.php
@@ -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));
     }
diff --git a/modules/doc/application/views/scripts/module/chapter.phtml b/modules/doc/application/views/scripts/module/chapter.phtml
new file mode 100644
index 0000000..7657d69
--- /dev/null
+++ b/modules/doc/application/views/scripts/module/chapter.phtml
@@ -0,0 +1,3 @@
+<div class="chapter">
+    <?= $sectionRenderer->render($this, $this->getHelper('Url')); ?>
+</div>
diff --git a/modules/doc/application/views/scripts/module/toc.phtml b/modules/doc/application/views/scripts/module/toc.phtml
new file mode 100644
index 0000000..ca6283d
--- /dev/null
+++ b/modules/doc/application/views/scripts/module/toc.phtml
@@ -0,0 +1,6 @@
+<div class="controls">
+    <h1><?= $title ?></h1>
+</div>
+<div class="content toc">
+    <?= $tocRenderer->render($this, $this->getHelper('Url')); ?>
+</div>
diff --git a/modules/doc/application/views/scripts/style/font.phtml b/modules/doc/application/views/scripts/style/font.phtml
index 97d0c61..c84a983 100644
--- a/modules/doc/application/views/scripts/style/font.phtml
+++ b/modules/doc/application/views/scripts/style/font.phtml
@@ -1,4 +1,5 @@
 <div class="controls">
+<?= $this->tabs ?>
 <h1>Icinga Web 2 Icons</h1>
 </div>
 
diff --git a/modules/doc/configuration.php b/modules/doc/configuration.php
index bfea1e8..491321a 100644
--- a/modules/doc/configuration.php
+++ b/modules/doc/configuration.php
@@ -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,
 ));



More information about the icinga-checkins mailing list