From b12e8d1411cb7af3a1a9b6f7637692f0758b4741 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 19 Apr 2007 09:08:26 +0000 Subject: [PATCH] Die Funktionen zum Bearbeiten von HTML-, LaTeX-Vorlagen und Stylesheets neu geschrieben. --- SL/AM.pm | 73 ++++++++++-- SL/Form.pm | 20 +++- bin/mozilla/am.pl | 260 ++++++++++++++++++++++++++++++++---------- css/lx-office-erp.css | 5 + locale/de/all | 18 ++- locale/de/am | 38 +++++- locale/de/menu | 13 +-- locale/de/menunew | 13 +-- menu.ini | 132 ++------------------- 9 files changed, 343 insertions(+), 229 deletions(-) diff --git a/SL/AM.pm b/SL/AM.pm index fec1b038c..323556bd4 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -1220,36 +1220,85 @@ sub delete_payment { $main::lxdebug->leave_sub(); } -sub load_template { + +sub prepare_template_filename { $main::lxdebug->enter_sub(); - my ($self, $form) = @_; + my ($self, $myconfig, $form) = @_; + + my ($filename, $display_filename); + + if ($form->{type} eq "stylesheet") { + $filename = "css/$myconfig->{stylesheet}"; + $display_filename = $myconfig->{stylesheet}; + + } else { + $filename = $form->{formname}; + + if ($form->{language}) { + my ($id, $template_code) = split(/--/, $form->{language}); + $filename .= "_${template_code}"; + } - open(TEMPLATE, "$form->{file}") or $form->error("$form->{file} : $!"); + if ($form->{printer}) { + my ($id, $template_code) = split(/--/, $form->{printer}); + $filename .= "_${template_code}"; + } - while (