X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=themes%2Fdefault%2Frenderer.php;h=6c4db65cde8062540e34a318497e06275f4bb00e;hb=47cdc160884d49ca90e9470a609cd42eac0a709e;hp=21c263fb250b52468723a53b344760ad7e879310;hpb=818719f38b8327cdca616d58b13913dbd174d96a;p=fa-stable.git diff --git a/themes/default/renderer.php b/themes/default/renderer.php index 21c263fb..6c4db65c 100644 --- a/themes/default/renderer.php +++ b/themes/default/renderer.php @@ -1,18 +1,19 @@ . + See the License here . ***********************************************************************/ class renderer { function wa_header() { +// add_js_ufile("themes/default/renderer.js"); page(_("Main Menu"), false, true); } @@ -23,7 +24,7 @@ function menu_header($title, $no_menu, $is_index) { - global $path_to_root, $applications, $help_base_url, $db_connections; + global $path_to_root, $help_base_url, $db_connections; // you can owerride the table styles from config.php here, if you want. //global $table_style, $table_style2; //$table_style = "cellpadding=3 border=1 bordercolor='#8cacbb' style='border-collapse: collapse'"; @@ -40,16 +41,20 @@ echo "\n"; if (!$no_menu) { + $applications = $_SESSION['App']->applications; $local_path_to_root = $path_to_root; + $img = ""._(  "; + $himg = ""._(  "; $sel_app = $_SESSION['sel_app']; echo "
"; echo "
"; - foreach($applications as $app => $name) + foreach($applications as $app) { - $acc = access_string($name); - echo "" .$acc[0] . ""; + $acc = access_string($app->name); + echo "id ? + ("class='selected'") : "") + ." href='$local_path_to_root/index.php?application=".$app->id + ."'$acc[1]>" .$acc[0] . ""; } echo "
"; echo "
"; @@ -63,9 +68,9 @@ if ($help_base_url != null) { - echo "" . _("Help") . "   "; + echo "$himg" . _("Help") . "   "; } - echo "" . _("Logout") . "   "; + echo "$img" . _("Logout") . "   "; echo ""; } echo ""; @@ -123,9 +128,11 @@ function display_applications(&$waapp) { + global $path_to_root; $selected_app = $waapp->get_selected_application(); + $img = "  "; foreach ($selected_app->modules as $module) { // image @@ -142,8 +149,10 @@ { if ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) { - $lnk = access_string($appfunction->label); - echo "$lnk[0]
"; + if ($appfunction->label == "") + echo " 
"; + else + echo $img.menu_link($appfunction->link, $appfunction->label)."
\n"; } } echo ""; @@ -154,8 +163,10 @@ { if ($_SESSION["wa_current_user"]->can_access_page($appfunction->access)) { - $lnk = access_string($appfunction->label); - echo "$lnk[0]
"; + if ($appfunction->label == "") + echo " 
"; + else + echo $img.menu_link($appfunction->link, $appfunction->label)."
\n"; } } echo "";