From: Joshua Ferraro <[email protected]>
1. rather than testing for notforloan == -1, test for any negative values to
set the On order status
2. in cases where itemcallnumber is blank or null, don't display the
itemcallnumber brackets []
---
C4/XSLT.pm | 2 +-
.../prog/en/xslt/MARC21slim2OPACResults.xsl | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/C4/XSLT.pm b/C4/XSLT.pm
index ca7ea96..51b3a47 100644
--- a/C4/XSLT.pm
+++ b/C4/XSLT.pm
@@ -139,7 +139,7 @@ sub buildKohaItemsNamespace {
if ( $itemtypes->{ $item->{itype} }->{notforloan} == 1 ||
$item->{notforloan} || $item->{onloan} || $item->{wthdrawn} ||
$item->{itemlost} || $item->{damaged} ||
($transfertwhen ne '') || $item->{itemnotforloan} ) {
- if ( $item->{notforloan} == -1) {
+ if ( $item->{notforloan} < 0) {
$status = "On order";
}
if ( $item->{itemnotforloan} > 0 || $item->{notforloan} > 0 ||
$itemtypes->{ $item->{itype} }->{notforloan} == 1 ) {
diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
index f4afc81..71ae153 100644
--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
@@ -842,7 +842,7 @@
select="key('item-by-status', 'available')"/>
<xsl:for-each select="$available_items[generate-id() =
generate-id(key('item-by-status-and-branch', concat(items:status, ' ',
items:homebranch))[1])]">
<xsl:value-of select="items:homebranch"/>
- [<xsl:value-of
select="items:itemcallnumber"/>]
+ <xsl:if
test="items:itemcallnumber != '' and items:itemcallnumber">[<xsl:value-of
select="items:itemcallnumber"/>]</xsl:if>
<xsl:text> (</xsl:text>
<xsl:value-of
select="count(key('item-by-status-and-branch', concat(items:status, ' ',
items:homebranch)))"/>
<xsl:text>)</xsl:text>
--
1.5.5.GIT
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches