From bd057743a88f4372b742608cd0e8a73e1bbb559d Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Thu, 4 Mar 2021 14:02:52 +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. Text changed in order to look maximum like in checkout : https://git.koha-community.org/Koha-community/Koha/src/commit/a57278f39b8c5b7a82b21671f266dbf32e2d41a0/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt#L368 Uses 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 has been withdrawn (dropped in trash)' 7) Edit this item with withdrawn=2 8) Check-in this item => You see 'Item has been withdrawn' Signed-off-by: David Nind --- koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 8c76f7b043..9b78951571 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -301,7 +301,11 @@
Cannot check in

NOT CHECKED IN

[% END %] -

Item is withdrawn.

+

+ Item has been 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.11.0