From e0ae0010cfbd3b246e0d74a4052034dfc8a60b59 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 --- .../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 f9313d0dd20..f9ed41dee84 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' %] -- 2.39.5