66 lines
2.0 KiB
PHTML
66 lines
2.0 KiB
PHTML
<?php
|
|
|
|
use Icinga\Web\Url;
|
|
use Icinga\Web\Notification;
|
|
use Icinga\Authentication\Manager as Auth;
|
|
|
|
|
|
if (Auth::getInstance()->isAuthenticated()): ?>
|
|
<div id="header">
|
|
<div class="skip-links">
|
|
<h2 class="sr-only"><?= t('Accessibility Skip Links'); ?></h2>
|
|
<ul>
|
|
<li>
|
|
<a tabindex="0" href="#main"><?= t('Skip to Content'); ?></a>
|
|
</li>
|
|
<li>
|
|
<a tabindex="0" href="#search"><?= t('Skip to Search'); ?></a>
|
|
</li>
|
|
<li>
|
|
<a tabindex="0" href="#navigation"><?= t('Skip to Navigation'); ?></a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<ul id="notifications"><?php
|
|
|
|
$moduleName = $this->layout()->moduleName;
|
|
if ($moduleName) {
|
|
$moduleClass = ' icinga-module module-' . $moduleName;
|
|
} else {
|
|
$moduleClass = '';
|
|
}
|
|
|
|
$refresh = '';
|
|
if ($this->layout()->autorefreshInterval) {
|
|
$refresh = ' data-icinga-refresh="' . $this->layout()->autorefreshInterval . '"';
|
|
}
|
|
|
|
$notifications = Notification::getInstance();
|
|
if ($notifications->hasMessages()) {
|
|
foreach ($notifications->getMessages() as $m) {
|
|
echo '<li class="' . $m->type . '">' . $this->escape($m->message) . '</li>';
|
|
}
|
|
}
|
|
?></ul>
|
|
<div id="logo" data-base-target="_main"><a href="<?= $this->href('/dashboard') ?>"><img aria-hidden="true" src="<?= $this->href('img/logo_icinga-inv.png') ?>" class="logo" alt="<?= t('Dashboard') ?>" /></a>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if (!$this->layout()->isIframe): ?>
|
|
<div id="sidebar">
|
|
<?php echo $this->render('parts/navigation.phtml') ?>
|
|
</div>
|
|
<?php endif ?>
|
|
<div id="main" role="main">
|
|
<div id="col1" class="container<?= $moduleClass ?>"<?php if ($moduleName): ?> data-icinga-module="<?= $moduleName ?>" <?php endif ?> data-icinga-url="<?= Url::fromRequest()->without('renderLayout') ?>"<?= $refresh ?> style="display: block">
|
|
<?= $this->render('inline.phtml') ?>
|
|
</div>
|
|
<div id="col2" class="container">
|
|
</div>
|
|
<div id="col3" class="container">
|
|
</div>
|
|
</div><!-- END of main -->
|
|
<?php else: ?>
|
|
<?= $this->render('inline.phtml') ?>
|
|
<?php endif ?>
|