From 3f5c10470eca4b5863c310627104bd0af8c1c18a Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Thu, 1 Oct 2009 20:07:07 +0000 Subject: [PATCH] Unaccesable menu options are now displayed in grey. --- themes/aqua/default.css | 4 ++++ themes/aqua/renderer.php | 28 +++++++++++++++++++--------- themes/cool/default.css | 4 ++++ themes/cool/renderer.php | 26 ++++++++++++++++++-------- themes/default/default.css | 4 ++++ themes/default/renderer.php | 26 ++++++++++++++++++-------- 6 files changed, 67 insertions(+), 25 deletions(-) diff --git a/themes/aqua/default.css b/themes/aqua/default.css index e7584a94..e5898c47 100644 --- a/themes/aqua/default.css +++ b/themes/aqua/default.css @@ -80,6 +80,10 @@ a:hover, a:focus { text-decoration: underline; } +.inactive { + color: gray; +} + button { font-size: 11px; border: 1px #0066cc solid; diff --git a/themes/aqua/renderer.php b/themes/aqua/renderer.php index 9e4f2c0d..96bbd30c 100644 --- a/themes/aqua/renderer.php +++ b/themes/aqua/renderer.php @@ -150,13 +150,18 @@ foreach ($module->lappfunctions as $appfunction) { - if ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) + if ($appfunction->label == "") + echo " 
"; + elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) { - if ($appfunction->label == "") - echo " 
"; - else echo $img.menu_link($appfunction->link, $appfunction->label)."
\n"; } + else + { + echo $img.'' + .access_string($appfunction->label, true) + ."
\n"; + } } echo ""; if (sizeof($module->rappfunctions) > 0) @@ -164,13 +169,18 @@ echo ""; foreach ($module->rappfunctions as $appfunction) { - if ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) + if ($appfunction->label == "") + echo " 
"; + elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) { - if ($appfunction->label == "") - echo " 
"; - else echo $img.menu_link($appfunction->link, $appfunction->label)."
\n"; - } + } + else + { + echo $img.'' + .access_string($appfunction->label, true) + ."
\n"; + } } echo ""; } diff --git a/themes/cool/default.css b/themes/cool/default.css index a2dddc9a..4917647e 100644 --- a/themes/cool/default.css +++ b/themes/cool/default.css @@ -80,6 +80,10 @@ a:hover, a:focus { text-decoration: underline; } +.inactive { + color: gray; +} + button { font-size: 11px; border: 1px #0066cc solid; diff --git a/themes/cool/renderer.php b/themes/cool/renderer.php index 73520c51..d72557d1 100644 --- a/themes/cool/renderer.php +++ b/themes/cool/renderer.php @@ -149,13 +149,18 @@ foreach ($module->lappfunctions as $appfunction) { - if ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) + if ($appfunction->label == "") + echo " 
"; + elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) { - if ($appfunction->label == "") - echo " 
"; - else echo $img.menu_link($appfunction->link, $appfunction->label)."
\n"; } + else + { + echo $img.'' + .access_string($appfunction->label, true) + ."
\n"; + } } echo ""; if (sizeof($module->rappfunctions) > 0) @@ -163,13 +168,18 @@ echo ""; foreach ($module->rappfunctions as $appfunction) { - if ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) + if ($appfunction->label == "") + echo " 
"; + elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) { - if ($appfunction->label == "") - echo " 
"; - else echo $img.menu_link($appfunction->link, $appfunction->label)."
\n"; } + else + { + echo $img.'' + .access_string($appfunction->label, true) + ."
\n"; + } } echo ""; } diff --git a/themes/default/default.css b/themes/default/default.css index d5d5dde0..70d020e0 100644 --- a/themes/default/default.css +++ b/themes/default/default.css @@ -80,6 +80,10 @@ a:hover, a:focus { text-decoration: underline; } +.inactive { + color: gray; +} + button { font-size: 11px; border: 1px #0066cc solid; diff --git a/themes/default/renderer.php b/themes/default/renderer.php index cde08ae3..12c6ef65 100644 --- a/themes/default/renderer.php +++ b/themes/default/renderer.php @@ -151,13 +151,18 @@ foreach ($module->lappfunctions as $appfunction) { - if ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) + if ($appfunction->label == "") + echo " 
"; + elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) { - if ($appfunction->label == "") - echo " 
"; - else echo $img.menu_link($appfunction->link, $appfunction->label)."
\n"; } + else + { + echo $img.'' + .access_string($appfunction->label, true) + ."
\n"; + } } echo ""; if (sizeof($module->rappfunctions) > 0) @@ -165,13 +170,18 @@ echo ""; foreach ($module->rappfunctions as $appfunction) { - if ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) + if ($appfunction->label == "") + echo " 
"; + elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) { - if ($appfunction->label == "") - echo " 
"; - else echo $img.menu_link($appfunction->link, $appfunction->label)."
\n"; } + else + { + echo $img.'' + .access_string($appfunction->label, true) + ."
\n"; + } } echo ""; } -- 2.30.2