mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 17:24:16 +02:00
parent
8c58bec721
commit
71cb484299
@ -4,59 +4,60 @@ use Icinga\Web\Url;
|
|||||||
use Icinga\Web\Notification;
|
use Icinga\Web\Notification;
|
||||||
use Icinga\Authentication\Auth;
|
use Icinga\Authentication\Auth;
|
||||||
|
|
||||||
|
$moduleName = $this->layout()->moduleName;
|
||||||
|
if ($moduleName) {
|
||||||
|
$moduleClass = ' icinga-module module-' . $moduleName;
|
||||||
|
} else {
|
||||||
|
$moduleClass = '';
|
||||||
|
}
|
||||||
|
|
||||||
if (Auth::getInstance()->isAuthenticated()):
|
$refresh = '';
|
||||||
$moduleName = $this->layout()->moduleName;
|
if ($this->layout()->autorefreshInterval) {
|
||||||
if ($moduleName) {
|
$refresh = ' data-icinga-refresh="' . $this->layout()->autorefreshInterval . '"';
|
||||||
$moduleClass = ' icinga-module module-' . $moduleName;
|
}
|
||||||
} else {
|
|
||||||
$moduleClass = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$refresh = '';
|
|
||||||
if ($this->layout()->autorefreshInterval) {
|
|
||||||
$refresh = ' data-icinga-refresh="' . $this->layout()->autorefreshInterval . '"';
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="logo" data-base-target="_main">
|
<div id="logo">
|
||||||
<?= $this->qlink(
|
<?php if (Auth::getInstance()->isAuthenticated()): ?>
|
||||||
'',
|
<?= $this->qlink(
|
||||||
'/dashboard',
|
'',
|
||||||
null,
|
'/dashboard',
|
||||||
array(
|
null,
|
||||||
'icon' => '../logo_icinga-inv.png',
|
array(
|
||||||
'aria-hidden' => 'true',
|
'icon' => '../logo_icinga-inv.png',
|
||||||
'tabindex' => -1
|
'data-base-target' => '_main',
|
||||||
)
|
'aria-hidden' => 'true',
|
||||||
); ?>
|
'tabindex' => -1
|
||||||
</div>
|
)
|
||||||
</div>
|
); ?>
|
||||||
|
<?php else: ?>
|
||||||
<?php if (!$this->layout()->isIframe): ?>
|
<?= $this->icon('../logo_icinga-inv.png'); ?>
|
||||||
<div id="sidebar">
|
<?php endif ?>
|
||||||
<?php echo $this->render('parts/navigation.phtml') ?>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<?php if (! $this->layout()->isIframe): ?>
|
||||||
|
<div id="sidebar">
|
||||||
|
<?= $this->render('parts/navigation.phtml'); ?>
|
||||||
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<div id="main" role="main">
|
<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">
|
<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') ?>
|
<?= $this->render('inline.phtml') ?>
|
||||||
</div>
|
</div>
|
||||||
<div id="col2" class="container">
|
<div id="col2" class="container">
|
||||||
</div>
|
</div>
|
||||||
<div id="col3" class="container">
|
<div id="col3" class="container">
|
||||||
</div>
|
</div>
|
||||||
</div><!-- END of main -->
|
</div>
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<ul id="notifications"><?php
|
<ul id="notifications"><?php
|
||||||
$notifications = Notification::getInstance();
|
|
||||||
if ($notifications->hasMessages()) {
|
$notifications = Notification::getInstance();
|
||||||
foreach ($notifications->popMessages() as $m) {
|
if ($notifications->hasMessages()) {
|
||||||
echo '<li class="' . $m->type . '">' . $this->escape($m->message) . '</li>';
|
foreach ($notifications->popMessages() as $m) {
|
||||||
|
echo '<li class="' . $m->type . '">' . $this->escape($m->message) . '</li>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
?></ul>
|
||||||
?></ul>
|
</div>
|
||||||
</div>
|
|
||||||
<?php else: ?>
|
|
||||||
<?= $this->render('inline.phtml') ?>
|
|
||||||
<?php endif ?>
|
|
Loading…
x
Reference in New Issue
Block a user