icingaweb2/application/layouts/scripts/parts/navigation.phtml

26 lines
683 B
PHTML
Raw Normal View History

<?php
2014-02-25 11:13:36 +01:00
use Icinga\Web\Url;
use Icinga\Web\Menu;
use Icinga\Web\MenuRenderer;
2014-02-25 11:13:36 +01:00
// Don't render a menu for unauthenticated users unless menu is auth aware
if (! $this->auth()->isAuthenticated()) {
return;
}
?>
<div id="menu" data-last-update="<?= (time() - 14) ?>000" data-base-target="_main" class="container"
data-icinga-url="<?= $this->href('layout/menu') ?>" data-icinga-refresh="15">
<?= $this->partial(
'layout/menu.phtml',
'default',
array(
'menuRenderer' => new MenuRenderer(
Menu::load(),
Url::fromRequest()->without('renderLayout')->getRelativeUrl()
)
)
) ?>
2014-02-18 19:16:03 +01:00
</div>