From f96974fc796d825ba23b46603e1f4342313c0d0a Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 5 Feb 2014 12:35:44 +0100 Subject: [PATCH] Modules/Doc: Use Icinga\Web\Menu for the toc refs #4820 --- application/controllers/LayoutController.php | 19 +++++++ application/layouts/scripts/body.phtml | 9 ++- application/layouts/scripts/parts/menu.phtml | 28 --------- .../layouts/scripts/parts/navigation.phtml | 4 +- application/views/scripts/layout/menu.phtml | 40 +++++++++++++ .../views/scripts/module/view.phtml | 17 +++--- modules/doc/library/Doc/Controller.php | 1 + modules/doc/library/Doc/DocParser.php | 57 +++++++++++++------ modules/monitoring/{docs => doc}/instances.md | 0 .../test/how_to_test_controllers.md | 0 10 files changed, 117 insertions(+), 58 deletions(-) create mode 100644 application/controllers/LayoutController.php delete mode 100644 application/layouts/scripts/parts/menu.phtml create mode 100644 application/views/scripts/layout/menu.phtml rename modules/monitoring/{docs => doc}/instances.md (100%) rename modules/monitoring/{docs => doc}/test/how_to_test_controllers.md (100%) diff --git a/application/controllers/LayoutController.php b/application/controllers/LayoutController.php new file mode 100644 index 000000000..81bf36083 --- /dev/null +++ b/application/controllers/LayoutController.php @@ -0,0 +1,19 @@ +view->url = Url::fromRequest()->getRelativeUrl(); + $this->view->items = Menu::fromConfig()->getChildren(); + $this->view->sub = false; + } +} +// @codingStandardsIgnoreEnd diff --git a/application/layouts/scripts/body.phtml b/application/layouts/scripts/body.phtml index 24dae76ea..565a3122d 100755 --- a/application/layouts/scripts/body.phtml +++ b/application/layouts/scripts/body.phtml @@ -1,9 +1,12 @@ render('parts/topbar.phtml') ?>
- -