kivitendo/SL/Controller/Layout.pm @ e72ecdf8
2b4d64f0 | Sven Schöling | package SL::Controller::Layout;
|
||
use strict;
|
||||
use parent qw(SL::Controller::Base);
|
||||
7647d46a | Moritz Bunkus | use SL::JSON ();
|
||
2b4d64f0 | Sven Schöling | |||
sub action_empty {
|
||||
my ($self) = @_;
|
||||
if ($::form->{format} eq 'json') {
|
||||
my $layout = {
|
||||
pre_content => $::request->{layout}->pre_content,
|
||||
start_content => $::request->{layout}->start_content,
|
||||
end_content => $::request->{layout}->end_content,
|
||||
post_content => $::request->{layout}->post_content,
|
||||
javascripts => [ $::request->{layout}->javascripts ],
|
||||
javascripts_inline => [ $::request->{layout}->javascripts_inline ],
|
||||
stylesheets => [ $::request->{layout}->stylesheets ],
|
||||
stylesheets_inline => [ $::request->{layout}->stylesheets_inline ],
|
||||
};
|
||||
7647d46a | Moritz Bunkus | $self->render(\ SL::JSON::to_json($layout), { type => 'json', process => 0 });
|
||
2b4d64f0 | Sven Schöling | }
|
||
}
|
||||
1;
|