From 7e96ee9d645b32216b0786338119aba1facfed03 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 5 Nov 2019 16:32:45 +0000 Subject: [PATCH] Bug 7611: (follow-up) Fix display of undefined statuses and add a class Signed-off-by: Jonathan Druart Signed-off-by: Joy Nelson --- C4/XSLT.pm | 3 +-- .../opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index e0bfde7776..1cc5ebe479 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -344,8 +344,7 @@ sub buildKohaItemsNamespace { } elsif ( $item->notforloan ) { $status = "reallynotforloan"; - $substatus = $descs{$item->{notforloan}} || ''; - $substatus = $substatus->{opac_description} if $substatus; + $substatus = exists $descs{$item->{notforloan}} ? $descs{$item->{notforloan}}->{opac_description} : "Not for loan_$item->{notforloan}"; } elsif ( exists $itemtypes->{ $item->effective_itemtype } && $itemtypes->{ $item->effective_itemtype }->{notforloan} == 1 ) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl index c403a4675c..edff548f2d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl @@ -1343,7 +1343,11 @@
- + + + ItemSummary + + -- 2.39.5