2013-06-14 13:51:44 +02:00
|
|
|
<?php
|
2014-02-25 11:13:36 +01:00
|
|
|
|
2014-03-04 11:52:37 +01:00
|
|
|
use Icinga\Web\Url;
|
|
|
|
use Icinga\Web\Menu;
|
|
|
|
|
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-03-04 11:52:37 +01:00
|
|
|
$url = Url::fromRequest()->remove('_render')->getRelativeUrl();
|
|
|
|
$menu = Menu::fromConfig();
|
2014-02-25 11:13:36 +01:00
|
|
|
?>
|
2014-03-09 23:30:37 +01:00
|
|
|
<div id="menu" data-base-target="_main">
|
2014-03-17 16:59:22 +01:00
|
|
|
<form action="<?= $this->href('search') ?>" method="get">
|
2014-03-04 11:52:37 +01:00
|
|
|
<input type="text" name="q" class="search" placeholder="Search..." autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
|
|
|
|
</form>
|
2014-02-25 11:13:36 +01:00
|
|
|
<?= $this->partial('parts/menu.phtml', array(
|
|
|
|
'items' => $menu->getChildren(),
|
|
|
|
'url' => $url
|
2014-03-04 11:52:37 +01:00
|
|
|
)) ?>
|
2014-02-18 19:16:03 +01:00
|
|
|
</div>
|