diff --git a/application/controllers/LayoutController.php b/application/controllers/LayoutController.php index 237681cfa5..dffdc343a3 100644 --- a/application/controllers/LayoutController.php +++ b/application/controllers/LayoutController.php @@ -3,13 +3,15 @@ namespace Icinga\Controllers; -use Icinga\Web\Controller\ActionController; use Icinga\Web\Menu; +use Icinga\Web\Navigation\Mobile\MobileConfigMenu; +use Icinga\Web\Navigation\Mobile\MobileMenu; +use ipl\Web\Compat\CompatController; /** * Create complex layout parts */ -class LayoutController extends ActionController +class LayoutController extends CompatController { /** * Render the menu @@ -21,6 +23,22 @@ public function menuAction() $this->view->menuRenderer = (new Menu())->getRenderer(); } + public function mobileConfigMenuAction() + { + $this->setAutorefreshInterval(15); + $this->_helper->layout()->disableLayout(); + $this->view->compact = true; + $this->getDocument()->addHtml(new MobileConfigMenu()); + } + + public function mobileMenuAction() + { + $this->setAutorefreshInterval(15); + $this->_helper->layout()->disableLayout(); + $this->view->compact = true; + $this->getDocument()->addHtml(new MobileMenu()); + } + public function announcementsAction() { $this->_helper->layout()->disableLayout(); diff --git a/application/layouts/scripts/body.phtml b/application/layouts/scripts/body.phtml index 87b570bfe5..c398e115ca 100644 --- a/application/layouts/scripts/body.phtml +++ b/application/layouts/scripts/body.phtml @@ -1,8 +1,11 @@ layout()->inlineLayout) { $inlineLayoutScript = 'inline.phtml'; } +$searchDashboard = new SearchDashboard(); +$searchDashboard->setUser($this->Auth()->getUser()); + ?>