From 9fbeab4975a12b35fa7ea92a383f20b8492c80dc Mon Sep 17 00:00:00 2001 From: fermin831 Date: Thu, 9 Jun 2016 18:54:59 +0200 Subject: [PATCH] Added notification messages on menu --- pandora_console/godmode/menu.php | 7 ++++++ pandora_console/images/um_messages.menu.png | Bin 0 -> 474 bytes pandora_console/include/functions_menu.php | 4 ++++ pandora_console/include/styles/menu.css | 24 ++++++++++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 pandora_console/images/um_messages.menu.png diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 97f453bb48..eec03f4566 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -404,6 +404,13 @@ foreach ($rows as $row) { $menu_godmode["links"]["sub"] = $sub; +if (license_free() && check_acl ($config['id_user'], 0, "PM")) { + $menu_godmode["messages"]["text"] = __('Update manager'); + $menu_godmode["messages"]["sec2"] = ""; + $menu_godmode["messages"]["id"] = "god-um_messages"; + $menu_godmode["messages"]["notification"] = 6; +} + if (!$config['pure']) { menu_print_menu ($menu_godmode); } diff --git a/pandora_console/images/um_messages.menu.png b/pandora_console/images/um_messages.menu.png new file mode 100644 index 0000000000000000000000000000000000000000..2fa73feffb918aaffb975606f3cc88239ff62090 GIT binary patch literal 474 zcmV<00VV#4P)RCwBAV88_!LBxL`0MP&egerq1 zY6w;W695Px2B@C%P_Y7-1S66pOl2VuU%+WSKmZZtra&Nm02hE-3bq`^ng1UNVDnNV zR*L`v2nE4Bf&|_Ju>iUv2P6dwP_gwu+<+~JkQJeW1Ss7AQ`~@LIUg{^J4YVHki#&3lp~ z10cW{iHI!+AmxB2e1VaXaRVt)E`a8FLI4ye2KWqIkInzkWG;Yau>%x0Ag2~W2F^#5 z??5t`v~)pL8&vl=NDFBM8o;Co^OK0F5cPalMi2 Q4FCWD07*qoM6N<$f@7nxod5s; literal 0 HcmV?d00001 diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 9b8026502a..4df2dfeeea 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -403,6 +403,10 @@ function menu_print_menu (&$menu) { $padding_top = ( $length >= 18) ? 6 : 12; $output .= ''; + // Add the notification ball if defined + if (isset($main["notification"])) { + $output .= '
' . $main["notification"] . '
'; + } $padding_top = 0; $length = 0; //$output .= html_print_image("include/styles/images/toggle.png", true, array("class" => "toggle", "alt" => "toogle")); diff --git a/pandora_console/include/styles/menu.css b/pandora_console/include/styles/menu.css index e6bdf4390e..c3a8860f4d 100644 --- a/pandora_console/include/styles/menu.css +++ b/pandora_console/include/styles/menu.css @@ -196,6 +196,10 @@ li:hover ul { display: block; } border-color: #777; background: url(../../images/links.menu.png) no-repeat 50% 50%; } +#icon_god-um_messages { + border-color: #777; + background: url(../../images/um_messages.menu.png) no-repeat 50% 50%; +} #subicon_god-setup { top: -140px; @@ -215,6 +219,10 @@ li:hover ul { display: block; } top: -130px; } +#subicon_god-um_messages { + top: -300px; +} + #menu_container { z-index: 3; position: absolute; @@ -222,6 +230,22 @@ li:hover ul { display: block; } background-color: #AAA; } +.notification_ball { + margin-top: 2px; + margin-left: 29px; + font-size: 6pt; + font-weight: 900; + background: red; + height: 12px; + width: 12px; + border-radius: 50px; + position: absolute; + text-align: center; + color: white; + padding-top: 1px; + font-family: sans-serif; +} + ul { margin: 0; padding: 0;