Some more HTML changes

This commit is contained in:
Thomas Gelf 2014-02-18 18:23:03 +00:00
parent 508a96124b
commit 0753b28342
3 changed files with 32 additions and 2 deletions

View File

@ -1,7 +1,7 @@
<?php
$jsfiles = array(
'js/jquery-1.8.3.js',
'js/vendor/jquery-1.8.3.js',
'js/helpers.js',
'js/icinga.js',
'js/icinga/logger.js',

View File

@ -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>

View File

@ -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">
<?php
// determine current key
$url = Icinga\Web\Url::fromRequest()->getRelativeUrl();
$menu = Icinga\Web\Menu::fromConfig();
if ($this->auth()->isAuthenticated()) {
echo $this->partial(