Bug 9995 - For reference items no longer listed in XSLT result lists
authorKyle M Hall <kyle@bywatersolutions.com>
Mon, 8 Apr 2013 13:07:43 +0000 (09:07 -0400)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Sun, 21 Apr 2013 13:54:54 +0000 (09:54 -0400)
Re-added the xsl that shouldn't have been removed.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested with different settings for OpacItemLocation
and not for loan set in the item and for the item type.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl

index 4335e50..cdeb672 100644 (file)
                                </xsl:for-each>
                </xsl:otherwise>
                </xsl:choose>
-           </span>
 
+           </span>
                    </xsl:when>
                                   </xsl:choose>
 
+            <xsl:choose>
+                <xsl:when test="count(key('item-by-status', 'reference'))>0">
+                    <span class="available">
+                        <b><xsl:text>Copies available for reference: </xsl:text></b>
+                        <xsl:variable name="reference_items" select="key('item-by-status', 'reference')"/>
+                        <xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
+                                <xsl:value-of select="items:homebranch"/>
+                                <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>
+                                <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
+                        </xsl:for-each>
+                    </span>
+                </xsl:when>
+            </xsl:choose>
+
                    <xsl:choose> <xsl:when test="count(key('item-by-status', 'available'))>0">
                        <xsl:choose><xsl:when test="count(key('item-by-status', 'reference'))>0">
                             <br/>