From 06fe8da89278bc6b7bdbdcf5454c2b5e4880baa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= Date: Sun, 28 Aug 2022 15:26:28 +0000 Subject: [PATCH] Bug 31315: (QA follow-up) Show itemtype description instead of database code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This restores the previous definition for itype that displayed the description instead of itemtype. Signed-off-by: Joonas Kylmälä --- catalogue/moredetail.pl | 3 ++- .../intranet-tmpl/prog/en/modules/catalogue/moredetail.tt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index a4ed85e03a..90f2de0b07 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -151,7 +151,8 @@ foreach my $item (@items){ my $item_info = $item->unblessed; $item_info->{object} = $item; - $item_info->{itemtype} = $itemtypes->{$item->effective_itemtype}; + $item_info->{itype} = $itemtypes->{ $item->itype }->{'translated_description'} if exists $itemtypes->{ $item->itype }; + $item_info->{effective_itemtype} = $itemtypes->{$item->effective_itemtype}; $item_info->{'ccode'} = $ccodes->{ $item->ccode } if $ccodes && $item->ccode && exists $ccodes->{ $item->ccode }; if ( defined $item->copynumber ) { $item_info->{'displaycopy'} = 1; 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 5c8dacb0a4..7b8cf7c8ba 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -89,7 +89,7 @@ [% FOREACH ITEM_DAT IN ITEM_DATA %] [% SET not_for_loan = 0 %] - [% IF ITEM_DAT.notforloan || ITEM_DAT.itemtype.notforloan %] + [% 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 %] -- 2.30.2