mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-26 03:09:10 +02:00
This also affects that rerendering the layout does only have any effect in case of XHR requests and is not overwritten anymore in this case. Since this property was previously private, this should not break anything.
64 lines
1.8 KiB
PHTML
64 lines
1.8 KiB
PHTML
<?php
|
|
|
|
use Icinga\Web\Url;
|
|
use Icinga\Web\Notification;
|
|
use Icinga\Authentication\Auth;
|
|
|
|
$moduleName = $this->layout()->moduleName;
|
|
if ($moduleName !== 'default') {
|
|
$moduleClass = ' icinga-module module-' . $moduleName;
|
|
} else {
|
|
$moduleClass = '';
|
|
}
|
|
|
|
$refresh = '';
|
|
if ($this->layout()->autorefreshInterval) {
|
|
$refresh = ' data-icinga-refresh="' . $this->layout()->autorefreshInterval . '"';
|
|
}
|
|
|
|
$inlineLayoutScript = $this->layout()->inlineLayout . '.phtml';
|
|
|
|
?>
|
|
<div id="header">
|
|
<div id="announcements" class="container">
|
|
<?= $this->widget('announcements') ?>
|
|
</div>
|
|
<div id="header-logo-container">
|
|
<?= $this->qlink(
|
|
'',
|
|
Auth::getInstance()->isAuthenticated() ? 'dashboard' : '',
|
|
null,
|
|
array(
|
|
'aria-hidden' => 'true',
|
|
'data-base-target' => '_main',
|
|
'id' => 'header-logo'
|
|
)
|
|
); ?>
|
|
</div>
|
|
</div>
|
|
<?php if (! $this->layout()->isIframe): ?>
|
|
<div id="sidebar">
|
|
<?= $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($inlineLayoutScript) ?>
|
|
</div>
|
|
<div id="col2" class="container">
|
|
</div>
|
|
<div id="col3" class="container">
|
|
</div>
|
|
</div>
|
|
<div id="footer">
|
|
<ul role="alert" id="notifications"><?php
|
|
|
|
$notifications = Notification::getInstance();
|
|
if ($notifications->hasMessages()) {
|
|
foreach ($notifications->popMessages() as $m) {
|
|
echo '<li class="' . $m->type . '">' . $this->escape($m->message) . '</li>';
|
|
}
|
|
}
|
|
?></ul>
|
|
</div>
|