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);
93 my $target = $menuitem->{target} ? qq| target="| . $::form->escape($menuitem->{target}) . '"' : '';
94 my $str = qq|<a${target} href="|;
96 if ($menuitem->{href}) {
97 $main::lxdebug->leave_sub();
98 return $str . $menuitem->{href} . '">';
101 $str .= qq|$module?action=| . $::form->escape($action) . qq|&level=| . $::form->escape($level);
103 map { delete $menuitem->{$_} } qw(module action target href);
106 foreach my $key (keys %{ $menuitem }) {
107 $str .= "&" . $::form->escape($key, 1) . "=";
108 my ($value, $conf) = split(/=/, $menuitem->{$key}, 2);
109 $value = $::myconfig{$value} . "/$conf" if ($conf);
110 $str .= $::form->escape($value, 1);
116 foreach my $key (keys(%{$other})) {
117 $str .= qq| ${key}="| . $::form->quote($other->{$key}) . qq|"|;
123 $main::lxdebug->leave_sub();
128 sub init_sub_layouts {
129 [ SL::Layout::None->new ]
135 icons16.css frame_header/header.css
137 $self->SUPER::use_stylesheet(@_);
143 js/quicksearch_input.js
145 $self->SUPER::use_javascript(@_);
153 "<div id='content'>\n";
163 my $callback = $::form->unescape($::form->{callback});
164 $callback = URI->new($callback)->rel($callback) if $callback;
165 $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/;
167 $self->presenter->render('menu/menuv3',
169 date => $self->clock_line,
170 menu => $self->print_menu,
171 callback => $callback,