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

19 lines
635 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;
}
?>
2014-03-09 23:30:37 +01:00
<div id="menu" data-base-target="_main">
<form action="<?= $this->href('search') ?>" method="get" role="search">
<input type="text" name="q" class="search autofocus" placeholder="<?= $this->translate('Search...') ?>" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
</form>
<?= new MenuRenderer(Menu::load(), Url::fromRequest()->without('renderLayout')->getRelativeUrl()); ?>
2014-02-18 19:16:03 +01:00
</div>