LayoutController: Use dashboard home menu class to loadd the navigation items

This commit is contained in:
Yonas Habteab 2022-03-11 16:46:24 +01:00
parent ef528a0f3f
commit faebd29271
2 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@
namespace Icinga\Controllers;
use Icinga\Web\Controller\ActionController;
use Icinga\Web\Menu;
use Icinga\Web\HomeMenu;
/**
* Create complex layout parts
@ -18,7 +18,7 @@ class LayoutController extends ActionController
{
$this->setAutorefreshInterval(15);
$this->_helper->layout()->disableLayout();
$this->view->menuRenderer = (new Menu())->getRenderer();
$this->view->menuRenderer = (new HomeMenu())->getRenderer();
}
public function announcementsAction()

View File

@ -1,6 +1,6 @@
<?php
use Icinga\Web\Menu;
use Icinga\Web\HomeMenu;
// Don't render a menu for unauthenticated users unless menu is auth aware
if (! $this->auth()->isAuthenticated()) {
@ -25,7 +25,7 @@ if (! $this->auth()->isAuthenticated()) {
'layout/menu.phtml',
'default',
array(
'menuRenderer' => (new Menu())->getRenderer()->setUseStandardItemRenderer()
'menuRenderer' => (new HomeMenu())->getRenderer()->setUseStandardItemRenderer()
)
) ?>
</div>