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;
if (Auth::getInstance()->isAuthenticated()): ?>
<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>';
if (Auth::getInstance()->isAuthenticated()):
$moduleName = $this->layout()->moduleName;
if ($moduleName) {
$moduleClass = ' icinga-module module-' . $moduleName;
} else {
$moduleClass = '';
}
}
?></ul>
$refresh = '';
if ($this->layout()->autorefreshInterval) {
$refresh = ' data-icinga-refresh="' . $this->layout()->autorefreshInterval . '"';
}
?>
<div id="header">
<div id="logo" data-base-target="_main">
<?= $this->qlink(
'',
@ -56,6 +47,16 @@ if ($notifications->hasMessages()) {
<div id="col3" class="container">
</div>
</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: ?>
<?= $this->render('inline.phtml') ?>
<?php endif ?>

View File

@ -18,6 +18,7 @@ class StyleSheet
'css/icinga/layout-structure.less',
'css/icinga/menu.less',
'css/icinga/header-elements.less',
'css/icinga/footer-elements.less',
'css/icinga/main-content.less',
'css/icinga/tabs.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;
}