icingaweb2/application/layouts/scripts/body.phtml

62 lines
1.7 KiB
PHTML
Raw Normal View History

<?php
use Icinga\Web\Url;
use Icinga\Web\Notification;
use Icinga\Authentication\Manager as Auth;
if (Auth::getInstance()->isAuthenticated()): ?>
2014-02-18 19:06:27 +01:00
<div id="header">
<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">
<?= $this->qlink(
'',
'/dashboard',
null,
array(
'icon' => '../logo_icinga-inv.png',
'aria-hidden' => 'true',
'tabindex' => -1
)
); ?>
</div>
2014-02-18 19:06:27 +01:00
</div>
2014-02-25 11:13:36 +01:00
<?php if (!$this->layout()->isIframe): ?>
2014-02-18 19:06:27 +01:00
<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">
2014-02-18 19:06:27 +01:00
<?= $this->render('inline.phtml') ?>
</div>
2014-02-18 19:06:27 +01:00
<div id="col2" class="container">
</div>
2014-02-18 19:06:27 +01:00
<div id="col3" class="container">
</div>
2014-02-18 19:06:27 +01:00
</div><!-- END of main -->
<?php else: ?>
<?= $this->render('inline.phtml') ?>
<?php endif ?>