X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=themes%2Fdefault%2Frenderer.php;h=53c2ea4410fdf07301891eb245eca56a7674268b;hb=7561718ee5113232ce917f63085d272884b0929c;hp=ad3ccc578da603f1b65a6051602628d593d70498;hpb=7d03ec68dff8a33808ef94238010e9d569b2948c;p=fa-stable.git diff --git a/themes/default/renderer.php b/themes/default/renderer.php index ad3ccc57..53c2ea44 100644 --- a/themes/default/renderer.php +++ b/themes/default/renderer.php @@ -1,31 +1,160 @@ . +***********************************************************************/ - class renderer + class renderer { - function wa_header() + function get_icon($category) { - page(_("Main Menu"), false, true); + global $path_to_root, $SysPrefs; + + if ($SysPrefs->show_menu_category_icons) + $img = $category == '' ? 'right.gif' : $category.'.png'; + else + $img = 'right.gif'; + return " "; } - function wa_footer() + function wa_header() + { + page(_($help_context = "Main Menu"), false, true); + } + + function wa_footer() { end_page(false, true); } - function menu_header(&$menu) + function menu_header($title, $no_menu, $is_index) { + global $path_to_root, $SysPrefs, $db_connections; + echo "
\n";
+
+ echo "
|
".$SysPrefs->app_title + ." $version - " . _("Theme:") . " " . user_theme() . " - ".show_users_online()." | \n"; + echo "
".$SysPrefs->power_by." | \n"; + echo "
";
- foreach ($module->lappfunctions as $appfunction)
+ foreach ($module->lappfunctions as $appfunction)
{
- if ($_SESSION["wa_current_user"]->can_access_page($appfunction->access))
- echo " " . $appfunction->label . " "; + $img = $this->get_icon($appfunction->category); + if ($appfunction->label == "") + echo " "; + elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) + { + echo $img.menu_link($appfunction->link, $appfunction->label)." \n"; + } + elseif (!$_SESSION["wa_current_user"]->hide_inaccessible_menu_items()) + { + echo $img.'' + .access_string($appfunction->label, true) + ." \n"; + } } echo " | ";
- //echo "\nOA_current_user name = " . $_SESSION["wa_current_user"]->username;
- if (sizeof($module->rappfunctions) > 0)
+ if (sizeof($module->rappfunctions) > 0)
{
echo "";
- foreach ($module->rappfunctions as $appfunction)
+ foreach ($module->rappfunctions as $appfunction)
{
- if ($_SESSION["wa_current_user"]->can_access_page($appfunction->access))
- echo " " . $appfunction->label . " "; + $img = $this->get_icon($appfunction->category); + if ($appfunction->label == "") + echo " "; + elseif ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) + { + echo $img.menu_link($appfunction->link, $appfunction->label)." \n"; + } + elseif (!$_SESSION["wa_current_user"]->hide_inaccessible_menu_items()) + { + echo $img.'' + .access_string($appfunction->label, true) + ." \n"; + } } echo " | ";
}
echo "