Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 9d8f72a0

Von Moritz Bunkus vor etwa 7 Jahren hinzugefügt

  • ID 9d8f72a0f92d01e1e25b14788b193cd662cad0d3
  • Vorgänger 0a265435
  • Nachfolger 9c6cbe0f

Form: Template-Objekt aus Presenter nehmen und nicht selber speichern

Unterschiede anzeigen:

SL/Form.pm
621 621
  $additional_params ||= { };
622 622

  
623 623
  my $real_file = $self->_prepare_html_template($file, $additional_params);
624
  my $template  = $self->template || $self->init_template;
624
  my $template  = $self->template;
625 625

  
626 626
  map { $additional_params->{$_} ||= $self->{$_} } keys %{ $self };
627 627

  
......
633 633
  return $output;
634 634
}
635 635

  
636
sub init_template {
637
  my $self = shift;
638

  
639
  return $self->template if $self->template;
640

  
641
  # Force scripts/locales.pl to pick up the exception handling template.
642
  # parse_html_template('generic/exception')
643
  return $self->template(Template->new({
644
     'INTERPOLATE'  => 0,
645
     'EVAL_PERL'    => 0,
646
     'ABSOLUTE'     => 1,
647
     'CACHE_SIZE'   => 0,
648
     'PLUGIN_BASE'  => 'SL::Template::Plugin',
649
     'INCLUDE_PATH' => '.:templates/webpages',
650
     'COMPILE_EXT'  => '.tcc',
651
     'COMPILE_DIR'  => $::lx_office_conf{paths}->{userspath} . '/templates-cache',
652
     'ERROR'        => 'templates/webpages/generic/exception.html',
653
     'ENCODING'     => 'utf8',
654
  })) || die;
655
}
656

  
657
sub template {
658
  my $self = shift;
659
  $self->{template_object} = shift if @_;
660
  return $self->{template_object};
661
}
636
sub template { $::request->presenter->get_template }
662 637

  
663 638
sub show_generic_error {
664 639
  $main::lxdebug->enter_sub();

Auch abrufbar als: Unified diff