From b5c4ca7af5fb18465b3bec566ecb9015b35c284b Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Mon, 26 Nov 2018 15:37:02 +0100 Subject: [PATCH] Bug 21883: Show authorized value description for withdrawn in check-in During check-in (circ/returns.pl) the withdrawn information may be displayed in a message : "Item is withdrawn". Like Bug 21877 we should display the withdrawn authorized value description during check-in. This patch adds this display. Add for easier translation. Also adds class 'ci-withdrawn' to ease hidding this new information via CSS. Test plan : 1) On a catalog with items.withdrawn defined with authorized values category WITHDRAWN 2) Define in WITHDRAWN an authorized values 1 with description 'dropped in trash' 3) Define in WITHDRAWN an authorized values 2 with description empty 4) Check-out an item 5) Edit this item with withdrawn=1 6) Check-in this item => You see 'Item is withdrawn (dropped in trash)' 7) Edit this item with withdrawn=2 8) Check-in this item => You see 'Item is withdrawn' Signed-off-by: Pierre-Marc Thibault --- circ/returns.pl | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/circ/returns.pl b/circ/returns.pl index 63cf75b..509053b 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -292,6 +292,7 @@ if ($barcode) { biblionumber => $biblio->biblionumber, additional_materials => $materials, issue => $checkout, + item_withdrawn => $item->withdrawn, ); } # FIXME else we should not call AddReturn but set BadBarcode directly instead diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index dec258b..d0ca67b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -565,7 +565,11 @@
Cannot check in

NOT CHECKED IN

[% END %] -

Item is withdrawn.

+

+ Item is withdrawn + [% item_withdrawn_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item_withdrawn ) %] + [% IF (item_withdrawn_lib) %]([% item_withdrawn_lib | html %])[% END %] +

[% END %] [% IF ( errmsgloo.debarred ) %]

[% errmsgloo.debarname | html %]([% errmsgloo.debarcardnumber | html %]) is now debarred until [% errmsgloo.debarred | $KohaDates %].

-- 2.7.4