Revision 8bed51b5
Von Sven Schöling vor etwa 12 Jahren hinzugefügt
SL/Layout/Admin.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
use parent qw(SL::Layout::Base); |
5 | 5 |
|
6 |
sub new { |
|
7 |
my ($class, @slurp) = @_; |
|
8 |
|
|
9 |
my $self = $class->SUPER::new(@slurp); |
|
10 |
|
|
11 |
$self->add_sub_layouts([ |
|
12 |
SL::Layout::None->new, |
|
13 |
]); |
|
14 |
|
|
15 |
$self; |
|
6 |
sub init_sub_layouts { |
|
7 |
[ SL::Layout::None->new ] |
|
16 | 8 |
} |
17 | 9 |
|
18 | 10 |
sub start_content { |
SL/Layout/Base.pm | ||
---|---|---|
11 | 11 |
'array' => [ |
12 | 12 |
'add_stylesheets_inline' => { interface => 'add', hash_key => 'stylesheets_inline' }, |
13 | 13 |
'add_javascripts_inline' => { interface => 'add', hash_key => 'javascripts_inline' }, |
14 |
'sub_layouts', |
|
15 |
'add_sub_layouts' => { interface => 'add', hash_key => 'sub_layouts' },
|
|
14 |
'sub_layouts', => { interface => 'get_set_init' },
|
|
15 |
'add_sub_layouts' => { interface => 'add', hash_key => 'sub_layouts' }, |
|
16 | 16 |
], |
17 | 17 |
); |
18 | 18 |
|
... | ... | |
60 | 60 |
@{ $_[0]->{javascripts_inline} || [] }; |
61 | 61 |
} |
62 | 62 |
|
63 |
sub init_sub_layouts { [] } |
|
64 |
|
|
63 | 65 |
|
64 | 66 |
######################################### |
65 | 67 |
# Interface |
SL/Layout/Classic.pm | ||
---|---|---|
5 | 5 |
|
6 | 6 |
use SL::Layout::Top; |
7 | 7 |
use SL::Layout::MenuLeft; |
8 |
use SL::Layout::None; |
|
8 | 9 |
|
9 |
sub new { |
|
10 |
my ($class, @slurp) = @_; |
|
11 |
|
|
12 |
my $self = $class->SUPER::new(@slurp); |
|
13 |
|
|
14 |
$self->add_sub_layouts([ |
|
10 |
sub init_sub_layouts { |
|
11 |
[ |
|
15 | 12 |
SL::Layout::Top->new, |
16 | 13 |
SL::Layout::MenuLeft->new, |
17 | 14 |
SL::Layout::None->new, |
18 |
]); |
|
19 |
|
|
20 |
$self; |
|
15 |
] |
|
21 | 16 |
} |
22 | 17 |
|
23 | 18 |
1; |
SL/Layout/Javascript.pm | ||
---|---|---|
6 | 6 |
use List::Util qw(max); |
7 | 7 |
use URI; |
8 | 8 |
|
9 |
sub new { |
|
10 |
my ($class, @slurp) = @_; |
|
11 |
|
|
12 |
my $self = $class->SUPER::new(@slurp); |
|
13 |
|
|
14 |
$self->add_sub_layouts([ |
|
15 |
SL::Layout::None->new, |
|
16 |
]); |
|
17 |
|
|
18 |
$self; |
|
9 |
sub init_sub_layouts { |
|
10 |
[ SL::Layout::None->new ] |
|
19 | 11 |
} |
20 | 12 |
|
21 | 13 |
sub pre_content { |
SL/Layout/V3.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use URI; |
8 | 8 |
|
9 |
sub new { |
|
10 |
my ($class, @slurp) = @_; |
|
11 |
|
|
12 |
my $self = $class->SUPER::new(@slurp); |
|
13 |
|
|
14 |
$self->add_sub_layouts([ |
|
15 |
SL::Layout::None->new, |
|
16 |
]); |
|
17 |
|
|
18 |
$self; |
|
9 |
sub init_sub_layouts { |
|
10 |
[ SL::Layout::None->new ] |
|
19 | 11 |
} |
20 | 12 |
|
21 | 13 |
sub pre_content { |
SL/Layout/V4.pm | ||
---|---|---|
7 | 7 |
|
8 | 8 |
use URI; |
9 | 9 |
|
10 |
sub new { |
|
11 |
my ($class, @slurp) = @_; |
|
12 |
|
|
13 |
my $self = $class->SUPER::new(@slurp); |
|
14 |
$self->add_sub_layouts( |
|
10 |
sub init_sub_layouts { |
|
11 |
[ |
|
15 | 12 |
SL::Layout::Top->new, |
16 | 13 |
SL::Layout::None->new, |
17 |
); |
|
18 |
$self; |
|
14 |
] |
|
19 | 15 |
} |
20 | 16 |
|
21 | 17 |
sub start_content { |
Auch abrufbar als: Unified diff
init_sub_layouts ist sauberer