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()); + ?> @@ -68,7 +83,6 @@ if ($this->layout()->inlineLayout) { diff --git a/application/layouts/scripts/layout.phtml b/application/layouts/scripts/layout.phtml index 880c2a9f19..feaf213ad4 100644 --- a/application/layouts/scripts/layout.phtml +++ b/application/layouts/scripts/layout.phtml @@ -34,6 +34,7 @@ $innerLayoutScript = $this->layout()->innerLayout . '.phtml'; + baseUrl('img/manifest.json') ?>> diff --git a/application/layouts/scripts/parts/navigation.phtml b/application/layouts/scripts/parts/navigation.phtml index dd973f5c5b..48c1f4fad5 100644 --- a/application/layouts/scripts/parts/navigation.phtml +++ b/application/layouts/scripts/parts/navigation.phtml @@ -20,7 +20,7 @@ if (! $this->auth()->isAuthenticated()) {