From b3f0a4bdc8410466024fb4ffcb0630f2f52222ef 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 --- C4/XSLT.pm | 3 +-- koha-tmpl/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 a4fcfcf5cf..2f116a717f 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -339,8 +339,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.11.0