View | Details | Raw Unified | Return to bug 6886
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl (-1 / +14 lines)
Lines 27-32 Link Here
27
   select="marc:datafield[@tag=010]/marc:subfield[@code='a']"/>
27
   select="marc:datafield[@tag=010]/marc:subfield[@code='a']"/>
28
28
29
  <xsl:variable name="hidelostitems" select="marc:sysprefs/marc:syspref[@name='hidelostitems']"/>
29
  <xsl:variable name="hidelostitems" select="marc:sysprefs/marc:syspref[@name='hidelostitems']"/>
30
  <xsl:variable name="singleBranchMode" select="marc:sysprefs/marc:syspref[@name='singleBranchMode']"/>
30
31
31
  <xsl:if test="marc:datafield[@tag=200]">
32
  <xsl:if test="marc:datafield[@tag=200]">
32
    <xsl:for-each select="marc:datafield[@tag=200]">
33
    <xsl:for-each select="marc:datafield[@tag=200]">
Lines 131-136 Link Here
131
        <span class="available">
132
        <span class="available">
132
          <b><xsl:text>Copies available for loan: </xsl:text></b>
133
          <b><xsl:text>Copies available for loan: </xsl:text></b>
133
          <xsl:variable name="available_items" select="key('item-by-status', 'available')"/>
134
          <xsl:variable name="available_items" select="key('item-by-status', 'available')"/>
135
	  <xsl:choose>
136
	  <xsl:when test="$singleBranchMode=1">
137
	  <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
138
	    <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> [<xsl:value-of select="items:itemcallnumber"/>]</xsl:if>
139
	      <xsl:text> (</xsl:text>
140
	      <xsl:value-of select="count(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch)))"/>
141
	      <xsl:text>)</xsl:text>
142
	      <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>, </xsl:text></xsl:otherwise></xsl:choose>
143
	  </xsl:for-each>
144
	  </xsl:when>
145
	  <xsl:otherwise>
134
          <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
146
          <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch', concat(items:status, ' ', items:homebranch))[1])]">
135
            <xsl:value-of select="items:homebranch"/>
147
            <xsl:value-of select="items:homebranch"/>
136
  			    <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber">[<xsl:value-of select="items:itemcallnumber"/>]
148
  			    <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber">[<xsl:value-of select="items:itemcallnumber"/>]
Lines 147-152 Link Here
147
              </xsl:otherwise>
159
              </xsl:otherwise>
148
            </xsl:choose>
160
            </xsl:choose>
149
          </xsl:for-each>
161
          </xsl:for-each>
162
	  </xsl:otherwise>
163
	  </xsl:choose>
150
        </span>
164
        </span>
151
      </xsl:when>
165
      </xsl:when>
152
    </xsl:choose>
166
    </xsl:choose>
153
- 

Return to bug 6886