Bug 38089: (QA follow-up) Ensure style works on members/printslip.pl
When moving the style up, it was moved before the code that handles printing a single slip, i.e. taking the variables and forming a slip hash. This patch moves that code to the top and additionally passes through the CODE of the notice so the ID is not blank Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
4465931242
commit
03e17cda38
|
|
@ -3,6 +3,9 @@
|
|||
[% USE Koha %]
|
||||
[% PROCESS 'i18n.inc' %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
[% UNLESS slips && slips.size %]
|
||||
[% SET slips = [{content => slip, is_html => !plain, style => style, id => id }] %]
|
||||
[% END %]
|
||||
<title>[% FILTER collapse %]
|
||||
[% IF ( caller == 'hold-transfer' ) %]
|
||||
[% t("Hold transfer print receipt") | html %] ›
|
||||
|
|
@ -30,28 +33,26 @@
|
|||
<link rel="stylesheet" type="text/css" href="[% Koha.Preference('SlipCSS') | $raw %]" />
|
||||
[% END %]
|
||||
[% FOR slip IN slips %]
|
||||
[% IF slip.style %]<style>[% slip.style.replace('([^\{\}]+?)\s*\{', '#slip_' _ slip.id _ ' $1 {') | $raw %]</style>[% END %]
|
||||
[% IF slip.style %]<style>[% slip.style.replace('([^\{\}]+?)\s*\{', '#slip_' _ slip.id _ ' $1 {') | $raw %]</style>[% END %]
|
||||
[% END %]
|
||||
|
||||
[% INCLUDE 'slip-print.inc' #printThenClose %]
|
||||
</head>
|
||||
<body id="circ_printslip" class="circ">
|
||||
<div id="receipt">
|
||||
|
||||
[% UNLESS slips && slips.size %]
|
||||
[% SET slips = [{content => slip, is_html => !plain, style => style }] %]
|
||||
[% END %]
|
||||
[% FOR slip IN slips %]
|
||||
<div id="slip_[% slip.id | html %]">
|
||||
[% UNLESS slip.is_html %]
|
||||
<pre>
|
||||
[% IF ( slip.content ) %][% slip.content | html %][% ELSE %]No slip template found[% END %]
|
||||
</pre>
|
||||
[% ELSE %]
|
||||
[% IF ( slip.content ) %][% slip.content | $raw %][% ELSE %]No slip template found[% END %]
|
||||
[% END %]
|
||||
</div>
|
||||
[% IF slips.size > 1 && !loop.last%]<div class="pagebreak"></div>[% END %]
|
||||
[% END %]
|
||||
<div id="receipt">
|
||||
[% FOR slip IN slips %]
|
||||
<div id="slip_[% slip.id | html %]">
|
||||
[% UNLESS slip.is_html %]
|
||||
<pre>
|
||||
[% IF ( slip.content ) %][% slip.content | html %][% ELSE %]No slip template found[% END %]
|
||||
</pre>
|
||||
[% ELSE %]
|
||||
[% IF ( slip.content ) %][% slip.content | $raw %][% ELSE %]No slip template found[% END %]
|
||||
[% END %]
|
||||
</div>
|
||||
[% IF slips.size > 1 && !loop.last%]
|
||||
<div class="pagebreak"></div>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% INCLUDE 'intranet-bottom.inc' %]
|
||||
|
|
|
|||
|
|
@ -120,6 +120,7 @@ $template->param(
|
|||
stylesheet => C4::Context->preference("SlipCSS"),
|
||||
error => $error,
|
||||
style => $letter->{style},
|
||||
id => $print,
|
||||
);
|
||||
|
||||
$template->param( IntranetSlipPrinterJS => C4::Context->preference('IntranetSlipPrinterJS' ) );
|
||||
|
|
|
|||
Loading…
Reference in New Issue