Module: check_mk
Branch: master
Commit: ff1d13b3d6252ae8e2e61273558c061a14e552d9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ff1d13b3d6252a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 11 15:31:39 2011 +0100
Implemented logout functionality in OMD environments
---
ChangeLog | 1 +
web/htdocs/check_mk.css | 29 +++++++++++++++++++++++++----
web/htdocs/sidebar.py | 7 +++++--
3 files changed, 31 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 661397c..346535d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -33,6 +33,7 @@
Multisite:
* New nifty sidebar snapin "Speed-O-Meter"
+ * Implemented logout functionality in OMD environments
* FIX: Fixed encoding problem when opening dashboard
* FIX: Fixed styling of view header in older IE browsers
diff --git a/web/htdocs/check_mk.css b/web/htdocs/check_mk.css
index f7891a6..a13539b 100644
--- a/web/htdocs/check_mk.css
+++ b/web/htdocs/check_mk.css
@@ -247,17 +247,24 @@ body.side {
background-image: url("images/sidebar_bottom.png");
}
-#side_footer div.button {
- width: 75px;
+#side_footer ul.buttons {
height: 20px;
z-index: 20;
position: absolute;
top: 10px;
left: 15px;
+ margin: 0;
+ padding: 0;
+}
+
+#side_footer ul.buttons li {
+ list-style-type: none;
float: left;
+ display: inline;
+ margin-left: none;
}
-#side_footer div.button a {
+#side_footer ul.buttons a {
width: 75px;
height: 17px;
display: block;
@@ -271,10 +278,24 @@ body.side {
margin: 0;
}
-#side_footer div.button a:hover {
+#side_footer ul.buttons a:hover {
background-image: url("images/sidebar_button_hi.png");
}
+#side_footer ul.buttons a.logout {
+ width: 20px;
+ margin-left: 15px;
+ background-image: url("images/sidebar_logout_lo.png");
+}
+
+#side_footer ul.buttons a.logout:hover {
+ background-image: url("images/sidebar_logout_hi.png");
+}
+
+#side_footer div.buttons a {
+ float: left;
+}
+
#side_footer div.copyright {
color: #fff;
position: relative;
diff --git a/web/htdocs/sidebar.py b/web/htdocs/sidebar.py
index 37e463c..c3958d7 100644
--- a/web/htdocs/sidebar.py
+++ b/web/htdocs/sidebar.py
@@ -124,9 +124,12 @@ def sidebar_head():
def sidebar_foot():
html.write('<div id="side_footer">')
+ html.write('<ul class=buttons>\n')
if config.may("configure_sidebar"):
- html.write('<div class=button>\n')
- html.write('<a target="main"
href="sidebar_add_snapin.py">Add snapin</a></div>')
+ html.write('<li><a target="main"
href="sidebar_add_snapin.py">Add snapin</a></li>')
+ if html.omd_mode != (None, None):
+ html.write('<li><a class=logout target="_top"
href="../omd/logout.php" title="%s"></a></li>' %
_('Logout'))
+ html.write('</ul>')
html.write("<div class=copyright>© <a
target=\"main\" href=\"http://mathias-kettner.de\">Mathias
Kettner</a></div>\n")
html.write('</div>')