From e89b043440f5cb2e3497107b9f43204d1bddeeec Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 5 Feb 2026 12:27:26 -0500 Subject: [PATCH] Bug 41778: Fix broken display of not for loan status on item detail page This patch makes some corrections to the way the item detail page template defines and display an item's not for loan status. To test you must have at least one not-for-loan item attached to a bibliographic record. - If necessary, edit an item to set a "Not for loan" status. - View the bibliographic detail page for that item's record. - Click the "Items" tab from the bibliographic detail page. - Find the section on the page showing the item you edited. - You should see "Barcode XXXX" (or "Item number XXXX") along with the not for loan status you defined. Sponsored-by: Athens County Public Libraries Signed-off-by: Roman Dolny Signed-off-by: Emily Lamancusa Signed-off-by: Martin Renvoize --- .../prog/en/modules/catalogue/moredetail.tt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt index 4397f44e8d..82dcd6697a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -137,6 +137,11 @@ [% FOREACH ITEM_DAT IN ITEM_DATA %]
+ [% SET not_for_loan = 0 %] + [% IF ITEM_DAT.notforloan || ITEM_DAT.effective_itemtype.notforloan %] + [% SET not_for_loan = 1 %] + [% SET not_for_loan_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => ITEM_DAT.notforloan ) %] + [% END %]

[% IF ITEM_DAT.barcode -%] @@ -144,14 +149,9 @@ [% ELSE -%] Item number [% ITEM_DAT.itemnumber | html %] [% END %] - [% IF not_for_loan %][% not_for_loan_description | html %][% END %] + [% IF not_for_loan %]([% not_for_loan_description | html %])[% END %]

- [% SET not_for_loan = 0 %] - [% IF ITEM_DAT.notforloan || ITEM_DAT.effective_itemtype.notforloan %] - [% SET not_for_loan = 1 %] - [% SET not_for_loan_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %] - [% END %] [% IF withdraw_error %]
[% IF withdraw_error == 'intransit_cannot_withdraw' %]