Behebt circular includes von SL::Layout::Base -> SL::Controller::Base -> SL::Request -> SL::Layout::Base
package SL::Layout::Base;
use strict;
-use parent qw(SL::Controller::Base);
+use parent qw(Rose::Object);
use List::MoreUtils qw(uniq);
use Time::HiRes qw();
);
use SL::Menu;
+use SL::Presenter;
my %menu_cache;
$_[0]{_header_done};
}
+sub presenter {
+ SL::Presenter->get;
+}
+
1;
$callback = URI->new($callback)->rel($callback) if $callback;
$callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/;
- $self->render("menu/menunew", { output => 0 },
+ $self->presenter->render("menu/menunew",
force_ul_width => 1,
date => $self->clock_line,
menu_items => $self->acc_menu,
my $self = shift;
$self->SUPER::javascripts_inline;
my $sections = [ section_menu($self->menu) ];
- $self->render('menu/menu', { output => 0 },
+ $self->presenter->render('menu/menu',
sections => $sections,
)
}
s/y+/yy/gi;
} $::myconfig{dateformat};
- return $self->render(
+ return $self->presenter->render(
'layout/javascript_setup',
- { type => 'js', output => 0, },
+ { type => 'js' },
datefmt => $datefmt,
focus => $::request->layout->focus,
ajax_spinner => 1,
sub pre_content {
my ($self) = @_;
- $self->SUPER::render('menu/header', { output => 0 },
+ $self->presenter->render('menu/header',
now => DateTime->now_local,
is_fastcgi => scalar($::dispatcher->interface_type =~ /fastcgi/i),
is_links => scalar($ENV{HTTP_USER_AGENT} =~ /links/i));
$callback = URI->new($callback)->rel($callback) if $callback;
$callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/;
- $self->SUPER::render('menu/menuv3', { output => 0 },
+ $self->presenter->render('menu/menuv3',
force_ul_width => 1,
date => $self->clock_line,
menu => $self->print_menu,
use Support::TestSetup;
use SL::Presenter;
+use SL::Controller::Base;
+use SL::Layout::Javascript;
no warnings 'uninitialized';