2014-03-06 10:19:48 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Icinga\Web\Url;
|
2014-03-08 00:15:51 +01:00
|
|
|
use Icinga\Web\Notification;
|
|
|
|
use Icinga\Authentication\Manager as Auth;
|
2014-03-06 10:19:48 +01:00
|
|
|
|
2014-03-17 17:11:56 +01:00
|
|
|
|
2014-03-08 00:15:51 +01:00
|
|
|
if (Auth::getInstance()->isAuthenticated()): ?>
|
2014-02-18 19:06:27 +01:00
|
|
|
<div id="header">
|
2014-03-08 00:15:51 +01:00
|
|
|
<ul id="notifications"><?php
|
|
|
|
|
2014-03-17 17:11:56 +01:00
|
|
|
$moduleName = $this->layout()->moduleName;
|
|
|
|
if ($moduleName) {
|
|
|
|
$moduleClass = ' icinga-module module-' . $moduleName;
|
|
|
|
} else {
|
|
|
|
$moduleClass = '';
|
|
|
|
}
|
|
|
|
|
2014-06-21 01:54:32 +02:00
|
|
|
$refresh = '';
|
|
|
|
if ($this->layout()->autorefreshInterval) {
|
|
|
|
$refresh = ' data-icinga-refresh="' . $this->layout()->autorefreshInterval . '"';
|
|
|
|
}
|
|
|
|
|
2014-03-08 00:15:51 +01:00
|
|
|
$notifications = Notification::getInstance();
|
|
|
|
if ($notifications->hasMessages()) {
|
|
|
|
foreach ($notifications->getMessages() as $m) {
|
|
|
|
echo '<li class="' . $m->type . '">' . $this->escape($m->message) . '</li>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?></ul>
|
2015-02-16 10:57:31 +01:00
|
|
|
<div id="logo" data-base-target="_main">
|
2015-03-06 13:44:14 +01:00
|
|
|
<?= $this->qlink(
|
|
|
|
'',
|
|
|
|
'/dashboard',
|
|
|
|
null,
|
|
|
|
array(
|
|
|
|
'icon' => '../logo_icinga-inv.png',
|
|
|
|
'aria-hidden' => 'true',
|
|
|
|
'tabindex' => -1
|
|
|
|
)
|
|
|
|
); ?>
|
2015-02-16 10:57:31 +01:00
|
|
|
</div>
|
2014-02-18 19:06:27 +01:00
|
|
|
</div>
|
2014-02-25 11:13:36 +01:00
|
|
|
|
2014-06-22 16:30:06 +02: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>
|
2014-06-22 16:30:06 +02:00
|
|
|
<?php endif ?>
|
2014-06-20 15:02:19 +02:00
|
|
|
<div id="main" role="main">
|
2014-08-19 10:10:23 +02:00
|
|
|
<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') ?>
|
2013-08-21 16:11:22 +02:00
|
|
|
</div>
|
2014-02-18 19:06:27 +01:00
|
|
|
<div id="col2" class="container">
|
2013-06-14 13:51:44 +02:00
|
|
|
</div>
|
2014-02-18 19:06:27 +01:00
|
|
|
<div id="col3" class="container">
|
2013-09-03 18:43:17 +02:00
|
|
|
</div>
|
2014-02-18 19:06:27 +01:00
|
|
|
</div><!-- END of main -->
|
|
|
|
<?php else: ?>
|
|
|
|
<?= $this->render('inline.phtml') ?>
|
|
|
|
<?php endif ?>
|