From eb7d2d5a9ba37b44f3eee94cf8e8808f99c838e7 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Wed, 31 Oct 2007 01:31:37 +0000 Subject: [PATCH] stylesheet.css - added styles for CSS-based dropdown menu, based on "Son of Suckerfish" http://www.htmldog.com/articles/suckerfish/dropdowns/ menu.tpl - merged admin_menu.tpl into menu.tpl - changed menu layout: the "create ..." items are now submenu items Notes: - superadmins still see the old menu - dropdowns don't work in IE yet (requires some JS) git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@167 a1433add-5e2c-0410-b055-b7f2511e0802 --- stylesheet.css | 54 ++++++++++++++++++++---- templates/menu.tpl | 101 ++++++++++++++++++++++++++++++++++----------- 2 files changed, 124 insertions(+), 31 deletions(-) diff --git a/stylesheet.css b/stylesheet.css index c53c2f70..e03a6d60 100644 --- a/stylesheet.css +++ b/stylesheet.css @@ -87,28 +87,66 @@ table { white-space: nowrap; } -#menu ul li { - display: inline; +#menu ul { + padding: 0; + margin: 0; + margin-left:auto; + margin-right:auto; + list-style: none; +} + +#menu li { + float: left; background: #efefef; - padding: 20px 5px 5px 5px; margin-right: 3px; border-top: 4px solid #aaaaaa; } -#menu ul li:hover { - background: #BFFF00; /* #F32121; */ - color: white; +#menu li:hover { + background: #BFFF00; } -#menu ul li a { +#menu li ul { + position: absolute; + width: auto; + left: -999em; + border:2px solid white; + border-top:none; +} +#menu li:hover ul { + left: auto; +} + + +#menu li ul li { + float: none; + margin-right: 0px; + border-top:2px solid white;; + text-align:left; +} + + + + +#menu a { + display: block; + width: auto; + padding: 20px 5px 5px 5px; color: #888888; } -#menu ul li a:hover { +#menu a:hover { color: #888888; } + +#menu li ul li a { + padding: 5px 5px 5px 5px; +} + + + #main_menu, #edit_form { width: 750px; margin: 0 auto; diff --git a/templates/menu.tpl b/templates/menu.tpl index a11cb15f..21fce795 100644 --- a/templates/menu.tpl +++ b/templates/menu.tpl @@ -1,29 +1,84 @@ - -
  • $title$submenu
  • "; + return "
  • $title$submenu
  • "; +} + +authentication_has_role('global-admin'); + +echo "\n"; + +print "

    "; # TODO + +if (authentication_has_role('global-admin')) { + $motd_file = "motd-admin.txt"; +} else { + $motd_file = "motd.txt"; +} + +if (file_exists (realpath ($motd_file))) { print "
    \n"; - include ("motd.txt"); + include ($motd_file); print "
    "; } + +/* vim: set ft=php expandtab softtabstop=3 tabstop=3 shiftwidth=3: */ ?>