mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-25 18:59:04 +02:00
LayoutController: Use dashboard home menu class to loadd the navigation items
This commit is contained in:
parent
ef528a0f3f
commit
faebd29271
@ -4,7 +4,7 @@
|
|||||||
namespace Icinga\Controllers;
|
namespace Icinga\Controllers;
|
||||||
|
|
||||||
use Icinga\Web\Controller\ActionController;
|
use Icinga\Web\Controller\ActionController;
|
||||||
use Icinga\Web\Menu;
|
use Icinga\Web\HomeMenu;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create complex layout parts
|
* Create complex layout parts
|
||||||
@ -18,7 +18,7 @@ class LayoutController extends ActionController
|
|||||||
{
|
{
|
||||||
$this->setAutorefreshInterval(15);
|
$this->setAutorefreshInterval(15);
|
||||||
$this->_helper->layout()->disableLayout();
|
$this->_helper->layout()->disableLayout();
|
||||||
$this->view->menuRenderer = (new Menu())->getRenderer();
|
$this->view->menuRenderer = (new HomeMenu())->getRenderer();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function announcementsAction()
|
public function announcementsAction()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Icinga\Web\Menu;
|
use Icinga\Web\HomeMenu;
|
||||||
|
|
||||||
// Don't render a menu for unauthenticated users unless menu is auth aware
|
// Don't render a menu for unauthenticated users unless menu is auth aware
|
||||||
if (! $this->auth()->isAuthenticated()) {
|
if (! $this->auth()->isAuthenticated()) {
|
||||||
@ -25,7 +25,7 @@ if (! $this->auth()->isAuthenticated()) {
|
|||||||
'layout/menu.phtml',
|
'layout/menu.phtml',
|
||||||
'default',
|
'default',
|
||||||
array(
|
array(
|
||||||
'menuRenderer' => (new Menu())->getRenderer()->setUseStandardItemRenderer()
|
'menuRenderer' => (new HomeMenu())->getRenderer()->setUseStandardItemRenderer()
|
||||||
)
|
)
|
||||||
) ?>
|
) ?>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user