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

21 lines
599 B
PHTML
Raw Normal View History

<?php
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;
}
// Current url
2014-02-18 19:23:03 +01:00
$url = Icinga\Web\Url::fromRequest()->getRelativeUrl();
$menu = Icinga\Web\Menu::fromConfig();
2014-02-25 11:13:36 +01:00
?>
<div id="menu">
<form action="<?= $this->href('search') ?>" method="post"><input type="text" name="q" class="search" placeholder="Search..." autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" /></form>
<?= $this->partial('parts/menu.phtml', array(
'items' => $menu->getChildren(),
'url' => $url
))
2014-02-18 19:16:03 +01:00
?>
</div>