1 package SL::Layout::V3;
4 use parent qw(SL::Layout::Base);
9 my ($Sekunden, $Minuten, $Stunden, $Monatstag, $Monat,
10 $Jahr, $Wochentag, $Jahrestag, $Sommerzeit)
14 $Monat = $Monat < 10 ? $Monat = "0" . $Monat : $Monat;
15 $Monatstag = $Monatstag < 10 ? $Monatstag = "0" . $Monatstag : $Monatstag;
17 my @Wochentage = ("Sonntag", "Montag", "Dienstag", "Mittwoch",
18 "Donnerstag", "Freitag", "Samstag");
19 my @Monatsnamen = ("", "Januar", "Februar", "März",
20 "April", "Mai", "Juni", "Juli",
21 "August", "September", "Oktober", "November",
24 $Wochentage[$Wochentag] . ", der "
31 my ($self, $parent, $depth) = @_;
35 die if ($depth * 1 > 5);
38 my $menu = $self->menu;
40 @menuorder = $menu->access_control(\%::myconfig, $parent);
42 $parent .= "--" if ($parent);
44 foreach my $item (@menuorder) {
45 substr($item, 0, length($parent)) = "";
46 next if (($item eq "") || ($item =~ /--/));
48 my $menu_item = $menu->{"${parent}${item}"};
49 my $menu_title = $::locale->text($item);
50 my $menu_text = $menu_title;
52 if ($menu_item->{"submenu"} || !defined($menu_item->{"module"}) && !defined($menu_item->{href})) {
54 my $h = $self->print_menu("${parent}${item}", $depth * 1 + 1)."\n";
56 $html .= qq|<ul><li><h2>${menu_text}</h2><ul>${h}</ul></li></ul>\n|;
58 $html .= qq|<li><div class="x">${menu_text}</div><ul>${h}</ul></li>\n|;
61 if ($self->{sub_class} && $depth > 1) {
62 $html .= qq|<li class='sub'>|;
66 $html .= $self->menuitem_v3("${parent}$item", { "title" => $menu_title });
67 $html .= qq|${menu_text}</a></li>\n|;
75 $main::lxdebug->enter_sub();
77 my ($self, $item, $other) = @_;
78 my $menuitem = $self->menu->{$item};
80 my $action = "section_menu";
83 if ($menuitem->{module}) {
84 $module = $menuitem->{module};
86 if ($menuitem->{action}) {
87 $action = $menuitem->{action};
90 my $level = $::form->escape($item);
92 my $str = qq|<a href="$module?action=| . $::form->escape($action) . qq|&level=| . $::form->escape($level);
94 my @vars = qw(module action target href);
96 if ($menuitem->{href}) {
97 $str = qq|<a href="$menuitem->{href}|;
98 @vars = qw(module target href);
101 map { delete $menuitem->{$_} } @vars;
104 foreach my $key (keys %{ $menuitem }) {
105 $str .= "&" . $::form->escape($key, 1) . "=";
106 my ($value, $conf) = split(/=/, $menuitem->{$key}, 2);
107 $value = $::myconfig{$value} . "/$conf" if ($conf);
108 $str .= $::form->escape($value, 1);
114 foreach my $key (keys(%{$other})) {
115 $str .= qq| ${key}="| . $::form->quote($other->{$key}) . qq|"|;
121 $main::lxdebug->leave_sub();
126 sub init_sub_layouts {
127 [ SL::Layout::None->new ]
133 frame_header/header.css
135 $self->SUPER::use_stylesheet(@_);
141 js/quicksearch_input.js
143 $self->SUPER::use_javascript(@_);
151 "<div id='content'>\n";
161 my $callback = $::form->unescape($::form->{callback});
162 $callback = URI->new($callback)->rel($callback) if $callback;
163 $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/;
165 $self->SUPER::render('menu/menuv3', { no_menu => 1, no_output => 1 },
167 date => $self->clock_line,
168 menu => $self->print_menu,
169 callback => $callback,