From c047ea372ad447cf26b658de124e79a9ea1f8e5c 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 --- 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 2f116a717f..df9bc47d1c 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -338,16 +338,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 d35d0374fb..e7802641df 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl @@ -1310,11 +1310,16 @@ Items available for reference: - - + + + + ItemSummary + + - + + Call number: @@ -1322,7 +1327,7 @@ ( - + ) . , @@ -1339,8 +1344,8 @@
- - + + ItemSummary -- 2.11.0