From 3af7680219b879d23022b5ab8fed353fc36b1c91 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Sat, 16 Jan 2016 23:02:27 +0100 Subject: [PATCH] =?utf8?q?PrintOptions-Helper:=20Ausgabe=20der=20Header=20?= =?utf8?q?erm=C3=B6glichen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Helper/PrintOptions.pm | 20 +++++---- templates/webpages/generic/print_options.html | 41 ++++++++++++++----- 2 files changed, 41 insertions(+), 20 deletions(-) diff --git a/SL/Helper/PrintOptions.pm b/SL/Helper/PrintOptions.pm index 7e6a87c07..2d842afc0 100644 --- a/SL/Helper/PrintOptions.pm +++ b/SL/Helper/PrintOptions.pm @@ -107,16 +107,17 @@ sub get_print_options { if ((ref $form->{printers} eq 'ARRAY') && scalar @{ $form->{printers } }); @SELECTS = map { - sname => $_->[1], - DATA => $_->[0], - show => !$options->{"hide_" . $_->[1]} && scalar @{ $_->[0] } + sname => $_->[1], + DATA => $_->[0], + show => !$options->{"hide_" . $_->[1]} && scalar @{ $_->[0]}, + hname => $locale->text($_->[2]) }, - [ \@FORMNAME, 'formname', ], - [ \@LANGUAGE_ID, 'language_id', ], - [ \@FORMAT, 'format', ], - [ \@SENDMODE, 'sendmode', ], - [ \@MEDIA, 'media', ], - [ \@PRINTER_ID, 'printer_id', ]; + [ \@FORMNAME, 'formname', 'Formname' ], + [ \@LANGUAGE_ID, 'language_id', 'Language' ], + [ \@FORMAT, 'format', 'Format' ], + [ \@SENDMODE, 'sendmode', 'Sendmode' ], + [ \@MEDIA, 'media', 'Media' ], + [ \@PRINTER_ID, 'printer_id', 'Printer' ]; my %dont_display_groupitems = ( 'dunning' => 1, @@ -125,6 +126,7 @@ sub get_print_options { my %template_vars = ( name_prefix => $prefix || '', + show_headers => $options->{show_headers}, display_copies => scalar @{ $form->{printers} || [] } && $::lx_office_conf{print_templates}->{latex} && $form->{media} ne 'email', display_remove_draft => (!$form->{id} && $form->{draft_id}), display_groupitems => !$dont_display_groupitems{$form->{type}}, diff --git a/templates/webpages/generic/print_options.html b/templates/webpages/generic/print_options.html index 95de1f762..b5757e1cb 100644 --- a/templates/webpages/generic/print_options.html +++ b/templates/webpages/generic/print_options.html @@ -5,28 +5,48 @@ + [%- IF show_headers %] + [%- FOREACH row = SELECTS %] + [%- IF row.show %] + + [%- END %] + [%- END %] + [%- IF display_copies %] + + [%- END %] + [%- IF display_groupitems %] + + [%- END %] + [%- IF display_remove_draft %] + + [%- END %] + + [%- END %] + + [%- FOREACH row = SELECTS %] + [%- IF row.show %] + [%- END %] + [%- END %] [%- IF display_copies %] - + [%- END %] [%- IF display_groupitems %] - - + [%- END %] [%- IF display_remove_draft %] - - + [%- END %]
[%- row.hname %][% 'Copies' | $T8 %][% 'Group Items' | $T8 %][% 'Remove Draft' | $T8 %]
- [%- FOREACH row = SELECTS %] - [%- IF row.show %] - [%- END %] - [%- END %] [% 'Copies' | $T8 %] [%- IF !show_headers %][%- 'Copies' | $T8 %][%- END %][% 'Group Items' | $T8 %][%- IF !show_headers %][% 'Group Items' | $T8 %][%- END %] + + [% 'Remove Draft' | $T8 %][%- IF !show_headers %][% 'Remove Draft' | $T8 %][%- END %] + +
@@ -36,4 +56,3 @@ - -- 2.20.1