From: Moritz Bunkus Date: Tue, 13 Nov 2012 08:32:16 +0000 (+0100) Subject: Druckoptionen 'Drucker' & 'Warteschlange' auch anzeigen, wenn nur OpenDocument aktivi... X-Git-Tag: release-3.0.0beta2~12^2~18 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=66f2badbfcb03c16bf19c3dd2439e1a7264a768c;p=kivitendo-erp.git Druckoptionen 'Drucker' & 'Warteschlange' auch anzeigen, wenn nur OpenDocument aktiviert ist Fixt #1840. --- diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 60a535f36..0d7601ea6 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -38,7 +38,7 @@ use Carp; use CGI; -use List::MoreUtils qw(uniq); +use List::MoreUtils qw(any uniq); use List::Util qw(min max first); use SL::CVar; @@ -1089,11 +1089,12 @@ sub print_options { opthash("inline", $form->{SM}{inline}, $locale->text('In-line')) if ($form->{media} eq 'email'); + my $printable_templates = any { $::lx_office_conf{print_templates}->{$_} } qw(latex opendocument); push @MEDIA, grep $_, opthash("screen", $form->{OP}{screen}, $locale->text('Screen')), - ($form->{printers} && scalar @{ $form->{printers} } && $::lx_office_conf{print_templates}->{latex}) ? + ($printable_templates && $form->{printers} && scalar @{ $form->{printers} }) ? opthash("printer", $form->{OP}{printer}, $locale->text('Printer')) : undef, - ($::lx_office_conf{print_templates}->{latex} && !$options{no_queue}) ? + ($printable_templates && !$options{no_queue}) ? opthash("queue", $form->{OP}{queue}, $locale->text('Queue')) : undef if ($form->{media} ne 'email');