From a74031056eda7ea2929d769df3692324ad18e503 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 4 Jan 2007 13:31:58 +0000 Subject: [PATCH] =?utf8?q?Das=20Vorlagenformat,=20das=20beim=20Aufrufen=20?= =?utf8?q?der=20Masken=20vorausgew=C3=A4hlt=20ist,=20kann=20jetzt=20in=20d?= =?utf8?q?en=20Benutzereinstellungen=20festgelegt=20werden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/User.pm | 3 ++- bin/mozilla/am.pl | 45 +++++++++++++++++++++++++++++++++++++++++++++ bin/mozilla/io.pl | 11 ++++++++++- bin/mozilla/is.pl | 2 -- bin/mozilla/oe.pl | 1 - bin/mozilla/rp.pl | 11 ++++++++++- locale/de/all | 3 +++ locale/de/am | 7 +++++++ 8 files changed, 77 insertions(+), 6 deletions(-) diff --git a/SL/User.pm b/SL/User.pm index 9697dffb6..e936023d7 100644 --- a/SL/User.pm +++ b/SL/User.pm @@ -1071,7 +1071,8 @@ sub config_vars { currency dateformat dbconnect dbdriver dbhost dbport dboptions dbname dbuser dbpasswd email fax name numberformat in_numberformat password printer role sid signature stylesheet tel templates vclimit angebote bestellungen rechnungen - anfragen lieferantenbestellungen einkaufsrechnungen taxnumber co_ustid duns menustyle); + anfragen lieferantenbestellungen einkaufsrechnungen taxnumber co_ustid duns menustyle + template_format copies); $main::lxdebug->leave_sub(); diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index 7894f4cd2..42aa6d5b2 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -2907,6 +2907,37 @@ sub config { $myconfig{$item} =~ s/\\n/\r\n/g; } + @formats = (); + if ($opendocument_templates && $openofficeorg_writer_bin && + $xvfb_bin && (-x $openofficeorg_writer_bin) && (-x $xvfb_bin)) { + push(@formats, { "name" => $locale->text("PDF (OpenDocument/OASIS)"), + "value" => "opendocument_pdf" }); + } + if ($latex_templates) { + push(@formats, { "name" => $locale->text("PDF"), "value" => "pdf" }); + } + push(@formats, { "name" => "HTML", "value" => "html" }); + if ($latex_templates) { + push(@formats, { "name" => $locale->text("Postscript"), + "value" => "postscript" }); + } + if ($opendocument_templates) { + push(@formats, { "name" => $locale->text("OpenDocument/OASIS"), + "value" => "opendocument" }); + } + + if (!$myconfig{"template_format"}) { + $myconfig{"template_format"} = "pdf"; + } + $template_format = ""; + foreach $item (@formats) { + $template_format .= + ""; + } + %countrycodes = User->country_codes; $countrycodes = ''; foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} } @@ -3038,6 +3069,20 @@ sub config {  Old + + | . $locale->text("Print options") . qq| + + + | . $locale->text('Default template format') . qq| + + + + | . $locale->text('Number of copies') . qq| + + + +   diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 64a59f7b0..1add7b354 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -1352,7 +1352,16 @@ sub send_email { sub print_options { $lxdebug->enter_sub(); $form->{sendmode} = "attachment"; - $form->{copies} = 3 unless $form->{copies}; + + $form->{"format"} = + $form->{"format"} ? $form->{"format"} : + $myconfig{"template_format"} ? $myconfig{"template_format"} : + "pdf"; + + $form->{"copies"} = + $form->{"copies"} ? $form->{"copies"} : + $myconfig{"copies"} ? $myconfig{"copies"} : + 3; $form->{PD}{ $form->{formname} } = "selected"; $form->{DF}{ $form->{format} } = "selected"; diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 6ef3fb24f..1646e7cfc 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -69,8 +69,6 @@ sub add { } &invoice_links; &prepare_invoice; - $form->{format} = "pdf"; - &display_form; $lxdebug->leave_sub(); diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index eb5772ef8..b99127866 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -284,7 +284,6 @@ sub order_links { sub prepare_order { $lxdebug->enter_sub(); - $form->{format} = "pdf" unless ($form->{print_and_save} && $form->{format}); $form->{media} = "screen"; $form->{formname} = $form->{type} unless $form->{formname}; diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index cf5bad33a..c2dcb2854 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -2637,7 +2637,16 @@ sub print_options { $lxdebug->enter_sub(); $form->{sendmode} = "attachment"; - $form->{copies} = 2 unless $form->{copies}; + + $form->{"format"} = + $form->{"format"} ? $form->{"format"} : + $myconfig{"template_format"} ? $myconfig{"template_format"} : + "pdf"; + + $form->{"copies"} = + $form->{"copies"} ? $form->{"copies"} : + $myconfig{"copies"} ? $myconfig{"copies"} : + 2; $form->{PD}{ $form->{type} } = "selected"; $form->{DF}{ $form->{format} } = "selected"; diff --git a/locale/de/all b/locale/de/all index 164c7dfbe..9b19eb2e7 100644 --- a/locale/de/all +++ b/locale/de/all @@ -315,6 +315,7 @@ aktualisieren wollen?', 'December' => 'Dezember', 'Decimalplaces' => 'Dezimalstellen', 'Decrease' => 'Verringern', + 'Default template format' => 'Standardvorlagenformat', 'Delete' => 'Löschen', 'Delete Account' => 'Konto löschen', 'Delete Dataset' => 'Datenbank löschen', @@ -674,6 +675,7 @@ gestartet', 'Number' => 'Nummer', 'Number Format' => 'Zahlenformat', 'Number missing in Row' => 'Nummer fehlt in Zeile', + 'Number of copies' => 'Anzahl Kopien', 'O' => 'O', 'OBE Export erfolgreich!' => 'OBE-Export erfolgreich!', 'Obsolete' => 'Ungültig', @@ -764,6 +766,7 @@ gestartet', 'Pricegroups' => 'Preisgruppen', 'Print' => 'Drucken', 'Print and Post' => 'Drucken und Buchen', + 'Print options' => 'Druckoptionen', 'Printed' => 'gedruckt.', 'Printer' => 'Drucker', 'Printer Command' => 'Druckbefehl', diff --git a/locale/de/am b/locale/de/am index d643edd7a..b8246f330 100644 --- a/locale/de/am +++ b/locale/de/am @@ -66,6 +66,7 @@ $self->{texts} = { 'Dataset upgrade' => 'Datenbankaktualisierung', 'Date Format' => 'Datumsformat', 'Debit' => 'Soll', + 'Default template format' => 'Standardvorlagenformat', 'Delete' => 'Löschen', 'Delete Account' => 'Konto löschen', 'Department deleted!' => 'Abteilung gelöscht.', @@ -154,7 +155,11 @@ $self->{texts} = { 'No project was found matching the search parameters.' => 'Es wurde kein Projekt gefunden, auf das die Suchparameter zutreffen.', 'Number' => 'Nummer', 'Number Format' => 'Zahlenformat', + 'Number of copies' => 'Anzahl Kopien', + 'OpenDocument/OASIS' => 'OpenDocument/OASIS', 'Output Number Format' => 'Zahlenformat (Ausgabe)', + 'PDF' => 'PDF', + 'PDF (OpenDocument/OASIS)' => 'PDF (OpenDocument/OASIS)', 'Part Number' => 'Artikelnummer', 'Part description' => 'Artikelbeschreibung', 'Parts Inventory' => 'Warenliste', @@ -166,7 +171,9 @@ $self->{texts} = { 'Payment terms deleted!' => 'Zahlungskonditionen gelöscht!', 'Phone' => 'Telefon', 'Please enter values' => 'Bitte Werte eingeben', + 'Postscript' => 'Postscript', 'Preferences saved!' => 'Einstellungen gespeichert!', + 'Print options' => 'Druckoptionen', 'Printer' => 'Drucker', 'Printer Command' => 'Druckbefehl', 'Printer Command missing!' => 'Druckbefehl fehlt', -- 2.20.1