Bugzilla – Attachment 150268 Details for
Bug 33478
Customise the format of notices when they are printed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33478: Apply formatting to HOLD_SLIP
Bug-33478-Apply-formatting-to-HOLDSLIP.patch (text/plain), 3.53 KB, created by
Aleisha Amohia
on 2023-04-27 05:10:52 UTC
(
hide
)
Description:
Bug 33478: Apply formatting to HOLD_SLIP
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2023-04-27 05:10:52 UTC
Size:
3.53 KB
patch
obsolete
>From 9d03d8214b48f81d5f9fa98a97a82d91dc537c21 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Fri, 21 Apr 2023 03:24:36 +0000 >Subject: [PATCH] Bug 33478: Apply formatting to HOLD_SLIP > >To test: > >1. Place a hold on a record >2. Check in an item attached to the record >3. When the pop-up for the hold is triggered, confirm hold and print slip >4. Confirm your format settings for HOLD_SLIP are applied >--- > circ/hold-transfer-slip.pl | 3 +- > .../includes/notice_format_translations.inc | 16 ++++++++++ > .../prog/en/modules/circ/printslip.tt | 31 ++++++++++++++----- > 3 files changed, 41 insertions(+), 9 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/notice_format_translations.inc > >diff --git a/circ/hold-transfer-slip.pl b/circ/hold-transfer-slip.pl >index 61aef56c4cd..539b2bf4dc0 100755 >--- a/circ/hold-transfer-slip.pl >+++ b/circ/hold-transfer-slip.pl >@@ -46,9 +46,10 @@ if ( my $letter = ReserveSlip ({ > branchcode => $session->param('branch') || $userenv->{branch}, > reserve_id => $reserve_id, > }) ) { >- $slip = $letter->{content}; >+ $slip = $letter; > $is_html = $letter->{is_html}; > } >+ > $template->param( slip => $slip ) if ($slip); > $template->param( caller => 'hold-transfer' ); > $template->param( plain => !$is_html ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/notice_format_translations.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/notice_format_translations.inc >new file mode 100644 >index 00000000000..972a911e7be >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/notice_format_translations.inc >@@ -0,0 +1,16 @@ >+[% BLOCK translate_justification_types %] >+ [% SWITCH type %] >+ [% CASE 'L' %]left >+ [% CASE 'C' %]center >+ [% CASE 'R' %]right >+ [% END %] >+[% END %] >+ >+[% BLOCK translate_unit_types %] >+ [% SWITCH type %] >+ [% CASE 'POINT' %]pt >+ [% CASE 'INCH' %]in >+ [% CASE 'MM' %]mm >+ [% CASE 'CM' %]cm >+ [% END %] >+[% END %] >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 e75a25b6be8..939fd7dc1e3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt >@@ -23,15 +23,30 @@ > > [% INCLUDE 'slip-print.inc' #printThenClose %] > </head> >+ >+[% PROCESS 'notice_format_translations.inc' %] >+ > <body id="circ_printslip" class="circ"> > <div id="receipt"> >- >-[% IF plain %] >-<pre> >-[% IF ( slip ) %][% slip | html %][% ELSE %]No slip template found[% END %] >-</pre> >-[% ELSE %] >-[% IF ( slip ) %][% slip | $raw %][% ELSE %]No slip template found[% END %] >-[% END %] >+ [% IF ( slip ) %] >+ <div class="slip" style=" >+ text-align:[% PROCESS translate_justification_types type=slip.text_justify | trim %]; >+ font-size:[% slip.font_size %]px; >+ width:[% slip.notice_width %][% PROCESS translate_unit_types type=slip.units | trim %]; >+ margin-top:[% slip.top_margin %][% PROCESS translate_unit_types type=slip.units | trim %]; >+ margin-left:[% slip.left_margin %][% PROCESS translate_unit_types type=slip.units | trim %]; >+ "> >+ [% IF slip.is_html %] >+ [% slip.content | $raw %] >+ [% ELSE %] >+ <pre> >+ [% slip.content | html %] >+ </pre> >+ [% END %] >+ </div> >+ [% ELSE %] >+ No slip template found >+ [% END %] >+</div> > > [% INCLUDE 'intranet-bottom.inc' %] >-- >2.30.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 33478
:
149743
|
149785
|
149786
|
149787
|
149914
|
149915
|
149916
|
149917
|
149918
|
149999
|
150000
|
150001
|
150002
|
150003
|
150004
|
150005
|
150006
|
150007
|
150008
|
150009
|
150010
|
150011
|
150012
|
150265
|
150266
|
150267
|
150268
|
150269
|
150270
|
150271
|
150272
|
150273
|
150274
|
150275
|
150276
|
150277
|
150324
|
150325
|
150326
|
150327
|
150328
|
150329
|
150330
|
150331
|
150332
|
150333
|
150334
|
150335
|
150336
|
150337
|
150338
|
150339
|
150340
|
150341
|
150342
|
150343
|
150344
|
150345
|
151548
|
151580
|
151581
|
151582
|
151583
|
151584
|
151585
|
151586
|
151587
|
151588
|
151589
|
151590
|
151591
|
151592
|
151593
|
156469
|
157368
|
157369
|
157370
|
157371
|
157372
|
157373
|
157374
|
157375
|
157376
|
157377
|
157378
|
157379
|
157380
|
157381
|
157382
|
157387
|
158835
|
158836
|
158837
|
158838
|
158839
|
158840
|
158841
|
158842
|
158843
|
158844
|
158845
|
158846
|
158847
|
158848
|
158849
|
158856
|
162556
|
162557
|
162558
|
162559
|
162560
|
162561
|
162562
|
162563
|
162564
|
162565
|
162566
|
162567
|
162568
|
162569
|
163903
|
163904
|
163905
|
163906
|
163907
|
163908
|
163909
|
163910
|
163911
|
163912
|
163913
|
163914
|
163915
|
163916
|
163924
|
163925
|
163926
|
163927
|
163928
|
163929
|
163930
|
163931
|
163932
|
163933
|
163934
|
163935
|
163936
|
163937
|
163938
|
164719
|
164720
|
164721
|
164722
|
164723
|
164724
|
164725
|
164726
|
164727
|
164728
|
164729
|
164730
|
164731
|
164732
|
164733
|
164741
|
164742
|
164743
|
164744
|
164745
|
164746
|
164747
|
164748
|
164749
|
164750
|
164751
|
164752
|
164753
|
164754
|
164755