Some more HTML changes
This commit is contained in:
parent
508a96124b
commit
0753b28342
application/layouts/scripts
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$jsfiles = array(
|
$jsfiles = array(
|
||||||
'js/jquery-1.8.3.js',
|
'js/vendor/jquery-1.8.3.js',
|
||||||
'js/helpers.js',
|
'js/helpers.js',
|
||||||
'js/icinga.js',
|
'js/icinga.js',
|
||||||
'js/icinga/logger.js',
|
'js/icinga/logger.js',
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
foreach ($this->items as $item) {
|
||||||
|
|
||||||
|
printf(
|
||||||
|
' <li%s><a href="%s">%s%s</a>',
|
||||||
|
$this->href($this->url) === $this->href($item->getUrl()) ? ' class="active"' : '',
|
||||||
|
$item->getUrl() ? $this->href($item->getUrl()) : '#',
|
||||||
|
$item->getIcon() ? $this->img(
|
||||||
|
$item->getIcon(),
|
||||||
|
array('height' => '16px', 'width' => '16px')
|
||||||
|
) . ' ' : '',
|
||||||
|
$item->getTitle()
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($item->hasChildren()) {
|
||||||
|
echo $this->partial(
|
||||||
|
'parts/menu.phtml',
|
||||||
|
array('items' => $item->getChildren(), 'url' => $this->url)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "</li>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
</ul>
|
|
@ -1,7 +1,9 @@
|
||||||
<div id="menu-header"><img src="<?= $this->href('img/logo_icinga-inv.png') ?>" style="height: 2em; width:6em; float: left; margin-left: 1.5em; margin-right: 9em; margin-top: 0.5em;" alt="" /></div>
|
<div id="menu-header"><img src="<?= $this->href('img/logo_icinga-inv.png') ?>" style="height: 2em; width:6em; float: left; margin-left: 1.5em; margin-right: 9em; margin-top: 0.5em;" alt="" /></div>
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
<?php
|
<?php
|
||||||
|
// determine current key
|
||||||
|
$url = Icinga\Web\Url::fromRequest()->getRelativeUrl();
|
||||||
|
$menu = Icinga\Web\Menu::fromConfig();
|
||||||
|
|
||||||
if ($this->auth()->isAuthenticated()) {
|
if ($this->auth()->isAuthenticated()) {
|
||||||
echo $this->partial(
|
echo $this->partial(
|
||||||
|
|
Loading…
Reference in New Issue