X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fmenuv4.pl;h=e9e7ac499995ce14202071e1042a14ec7278385a;hb=772ec8725a6da1fd25a9e256d16e44b4c5231904;hp=ffe3e82c975ed9eac4c2d73e354c9fca1e5943b4;hpb=e0201a3f8f11b3a32f76b0c89eebb475e4798eca;p=kivitendo-erp.git
diff --git a/bin/mozilla/menuv4.pl b/bin/mozilla/menuv4.pl
index ffe3e82c9..e9e7ac499 100644
--- a/bin/mozilla/menuv4.pl
+++ b/bin/mozilla/menuv4.pl
@@ -32,24 +32,34 @@
#
#######################################################################
-$menufile = "menu.ini";
use SL::Menu;
+use URI;
+
+use strict;
1;
# end of main
sub display {
- $form->header(qq||);
+ my $form = $main::form;
+
+ $form->header(extra_code => qq||);
- $form->{date} = clock_line();
- $form->{menu} = acc_menu();
+ $form->{date} = clock_line();
+ $form->{menu} = acc_menu();
+ my $callback = $form->unescape($form->{callback});
+ $callback = URI->new($callback)->rel($callback) if $callback;
+ $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/;
+ $form->{callback} = $callback;
print $form->parse_html_template("menu/menuv4");
}
sub clock_line {
+ my $form = $main::form;
+
my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat,
$Jahr, $Wochentag, $Jahrestag, $Sommerzeit)
= localtime(time);
@@ -72,11 +82,12 @@ sub clock_line {
}
sub acc_menu {
- $locale = Locale->new($language, "menu");
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
- $mainlevel = $form->{level};
+ my $mainlevel = $form->{level};
$mainlevel =~ s/\Q$mainlevel\E--//g;
- my $menu = new Menu "$menufile";
+ my $menu = Menu->new("menu.ini");
$| = 1;
@@ -85,6 +96,10 @@ sub acc_menu {
sub print_menu {
my ($menu, $parent, $depth) = @_;
+
+ my $form = $main::form;
+ my %myconfig = %main::myconfig;
+
my $html;
die if ($depth * 1 > 5);
@@ -100,7 +115,7 @@ sub print_menu {
next if (($item eq "") || ($item =~ /--/));
my $menu_item = $menu->{"${parent}${item}"};
- my $menu_title = $locale->text($item);
+ my $menu_title = $::locale->text($item);
my $menu_text = $menu_title;
my $target = "main_window";