Bugzilla – Attachment 172465 Details for
Bug 38089
Fix incorrect regular expression from bug 33478 and move styles to head
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38089: (QA follow-up) Ensure style works on members/printslip.pl
Bug-38089-QA-follow-up-Ensure-style-works-on-membe.patch (text/plain), 3.45 KB, created by
Martin Renvoize (ashimema)
on 2024-10-07 14:11:01 UTC
(
hide
)
Description:
Bug 38089: (QA follow-up) Ensure style works on members/printslip.pl
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-10-07 14:11:01 UTC
Size:
3.45 KB
patch
obsolete
>From a0de2a791b4d19d02861493f918cc347e6ede837 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 4 Oct 2024 16:43:44 +0000 >Subject: [PATCH] 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> >--- > .../prog/en/modules/circ/printslip.tt | 37 ++++++++++--------- > members/printslip.pl | 1 + > 2 files changed, 20 insertions(+), 18 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt >index 938c52f41e2..fd36a77f886 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt >@@ -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' %] >diff --git a/members/printslip.pl b/members/printslip.pl >index 67df3fd808b..9cf130c22fd 100755 >--- a/members/printslip.pl >+++ b/members/printslip.pl >@@ -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' ) ); >-- >2.46.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38089
:
172380
|
172421
|
172422
|
172464
| 172465 |
172473