Layouts eingeführt
[kivitendo-erp.git] / SL / Controller / Layout / V4.pm
1 package SL::Controller::Layout::V4;
2
3 use strict;
4 use parent qw(SL::Controller::Layout::Base);
5 use SL::Controller::Layout::Css;
6 use SL::Controller::Layout::Top;
7
8 use URI;
9
10 sub new {
11   my ($class, @slurp) = @_;
12
13   my $self = $class->SUPER::new(@slurp);
14   $self->{top} = SL::Controller::Layout::Top->new;
15   $self;
16 }
17
18 sub pre_content {
19   $_[0]{top}->render .
20   &render;
21 }
22
23 sub stylesheets {
24   $_[0]{top}->stylesheets
25 }
26
27 sub start_content {
28   "<div id='content'>\n";
29 }
30
31 sub end_content {
32   "</div>\n";
33 }
34
35 sub render {
36   my ($self) = @_;
37
38   $self->{sub_class} = 1;
39
40   my $callback            = $::form->unescape($::form->{callback});
41   $callback               = URI->new($callback)->rel($callback) if $callback;
42   $callback               = "login.pl?action=company_logo"      if $callback =~ /^(\.\/)?$/;
43
44   $self->SUPER::render('menu/menuv4', { no_menu => 1, no_output => 1 },
45     force_ul_width => 1,
46     date           => $self->clock_line,
47     menu           => $self->print_menu,
48     callback       => $callback,
49   );
50 }
51
52 1;