From e5fc078fabd0b5faecdb269676705e4179f00cc0 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 20 Apr 2023 03:58:45 +0000 Subject: [PATCH] Bug 33478: [WIP] Apply formatting to printed notices Does not yet apply to all notices --- circ/hold-transfer-slip.pl | 3 +- .../prog/en/modules/circ/printslip.tt | 46 +++++++++++++++---- 2 files changed, 40 insertions(+), 9 deletions(-) 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/modules/circ/printslip.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt index e75a25b6be8..e235c4fe8e4 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,45 @@ [% INCLUDE 'slip-print.inc' #printThenClose %] - -
-[% IF plain %] -
-[% IF ( slip ) %][% slip | html %][% ELSE %]No slip template found[% END %]
-
-[% ELSE %] -[% IF ( slip ) %][% slip | $raw %][% ELSE %]No slip template found[% END %] +[% 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 %] + +
+ [% IF ( slip ) %] +
+ [% IF plain %] +
+                [% slip.content | html %]
+            
+ [% ELSE %] + [% slip.content | $raw %] + [% END %] +
+ [% ELSE %] + No slip template found + [% END %] +
+ [% INCLUDE 'intranet-bottom.inc' %] -- 2.30.2