fixes bug 4385
authorIan Walls <ian.walls@bywatersolutions.com>
Tue, 10 Aug 2010 06:47:59 +0000 (08:47 +0200)
committerGalen Charlton <gmcharlt@gmail.com>
Wed, 6 Oct 2010 12:49:44 +0000 (08:49 -0400)
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl

index 88f9cca..aaa702a 100644 (file)
             </xsl:for-each>
        </span>
     </xsl:if>
-
-    <span class="results_summary">
-                          <span class="label">Availability: </span>
-                               <xsl:choose>
-                        <xsl:when test="marc:datafield[@tag=856]">
+    <xsl:if test="marc:datafield[@tag=856]">
+         <span class="results_summary">
+                          <span class="label">Online Access: </span>
                             <xsl:for-each select="marc:datafield[@tag=856]">
                             <xsl:if test="$OPACURLOpenInNewWindow='0'">
                                    <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
                                     </a>
                               </xsl:if>
                                     <xsl:choose>
-                                    <xsl:when test="position()=last()"><xsl:text>  </xsl:text></xsl:when>
+                                    <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
                                     <xsl:otherwise> | </xsl:otherwise>
                                     </xsl:choose>
                             </xsl:for-each>
-                        </xsl:when>
-
-
+                            </span>
+                        </xsl:if>
+                        <span class="results_summary">
+                        <span class="label">Availability: </span>
+                        <xsl:choose>
                                   <xsl:when test="count(key('item-by-status', 'available'))=0 and count(key('item-by-status', 'reference'))=0">No copies available
                                   </xsl:when>
                    <xsl:when test="count(key('item-by-status', 'available'))>0">
                            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:if test="items:itemcallnumber != '' and items:itemcallnumber">[<xsl:value-of select="items:itemcallnumber"/>]</xsl:if>
+                                                  <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>
                            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: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>