From 94ae7375d931a449e03844e01fb9ba1db67890c9 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 8 Nov 2019 15:49:08 +0000 Subject: [PATCH] Bug 7611: (follow-up) separate positive and negative statuses as in the past This patch preserves someting closer to previous functionality. Negative not for loan are in the 'unavailable' section in red, positive ones are in the 'reference' section in green. Itemtype level will also be in green in reference Item specific status will override an itemtype level. The line break between 'reference' and 'unavailable' existed before and is preserved - negative not for loan and checked out items appear here Signed-off-by: Jonathan Druart --- C4/XSLT.pm | 8 +++----- .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 17 +++++++++++------ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 1cc5ebe479..44b8aea94f 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -343,16 +343,14 @@ sub buildKohaItemsNamespace { $status = "Checked out"; } elsif ( $item->notforloan ) { - $status = "reallynotforloan"; - $substatus = exists $descs{$item->{notforloan}} ? $descs{$item->{notforloan}}->{opac_description} : "Not for loan_$item->{notforloan}"; + $status = $item->notforloan < 0 ? "reallynotforloan" : "reference"; + $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 ) { $status = "reference"; - } - elsif ( $item->notforloan < 0) { - $status = "On order"; + $substatus = "Not for loan"; } else { $status = "available"; diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl index edff548f2d..d29fdceaee 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl @@ -1312,11 +1312,16 @@ Items available for reference: - - + + + + ItemSummary + + - + + Call number: @@ -1324,7 +1329,7 @@ ( - + ) . , @@ -1341,8 +1346,8 @@
- - + + ItemSummary -- 2.11.0