Move notifications to the bottom of the page

refs #8247
This commit is contained in:
Alexander A. Klimov 2015-05-29 14:17:12 +02:00
parent 068bfc0c71
commit 0ba4d24880
3 changed files with 32 additions and 22 deletions

View File

@ -5,29 +5,20 @@ use Icinga\Web\Notification;
use Icinga\Authentication\Manager as Auth; use Icinga\Authentication\Manager as Auth;
if (Auth::getInstance()->isAuthenticated()): ?> if (Auth::getInstance()->isAuthenticated()):
<div id="header"> $moduleName = $this->layout()->moduleName;
<ul id="notifications"><?php if ($moduleName) {
$moduleName = $this->layout()->moduleName;
if ($moduleName) {
$moduleClass = ' icinga-module module-' . $moduleName; $moduleClass = ' icinga-module module-' . $moduleName;
} else { } else {
$moduleClass = ''; $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> $refresh = '';
if ($this->layout()->autorefreshInterval) {
$refresh = ' data-icinga-refresh="' . $this->layout()->autorefreshInterval . '"';
}
?>
<div id="header">
<div id="logo" data-base-target="_main"> <div id="logo" data-base-target="_main">
<?= $this->qlink( <?= $this->qlink(
'', '',
@ -56,6 +47,16 @@ if ($notifications->hasMessages()) {
<div id="col3" class="container"> <div id="col3" class="container">
</div> </div>
</div><!-- END of main --> </div><!-- END of main -->
<div id="footer">
<ul id="notifications"><?php
$notifications = Notification::getInstance();
if ($notifications->hasMessages()) {
foreach ($notifications->getMessages() as $m) {
echo '<li class="' . $m->type . '">' . $this->escape($m->message) . '</li>';
}
}
?></ul>
</div>
<?php else: ?> <?php else: ?>
<?= $this->render('inline.phtml') ?> <?= $this->render('inline.phtml') ?>
<?php endif ?> <?php endif ?>

View File

@ -18,6 +18,7 @@ class StyleSheet
'css/icinga/layout-structure.less', 'css/icinga/layout-structure.less',
'css/icinga/menu.less', 'css/icinga/menu.less',
'css/icinga/header-elements.less', 'css/icinga/header-elements.less',
'css/icinga/footer-elements.less',
'css/icinga/main-content.less', 'css/icinga/main-content.less',
'css/icinga/tabs.less', 'css/icinga/tabs.less',
'css/icinga/forms.less', 'css/icinga/forms.less',

View File

@ -0,0 +1,8 @@
/*! Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
div#footer {
position: fixed;
left: 0px;
right: 0px;
bottom: 0px;
}