Browse Source

Bug 21260: Move the count before the callnumbers

The current display is a bit confusing [Call number: A](2) seems
to indicate that we have two call numbers A. But what it means here,
is: we have two items and we list only one, being A.

So, we'd better do something like:
    Items available for loan: Centerville (2) [Call number: A, ..]
Which says we have two items at Centerville, listing only one (A),
but indicating with the two dots that there are more.

Test plan:
Pick a biblio with multiple available items at a branch.
Include it in a search and check results display.
Test the same but with only one branch in Koha.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: ava li <rubyli208@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21.05.x
Marcel de Rooy 4 years ago
committed by Jonathan Druart
parent
commit
24f56d872e
  1. 32
      koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl

32
koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl

@ -36,7 +36,7 @@
<xsl:variable name="AlternateHoldingsSubfields" select="substring(marc:sysprefs/marc:syspref[@name='AlternateHoldingsField'], 4)"/>
<xsl:variable name="AlternateHoldingsSeparator" select="marc:sysprefs/marc:syspref[@name='AlternateHoldingsSeparator']"/>
<xsl:variable name="OPACItemLocation" select="marc:sysprefs/marc:syspref[@name='OPACItemLocation']"/>
<xsl:variable name="singleBranchMode" select="marc:sysprefs/marc:syspref[@name='singleBranchMode']"/>
<xsl:variable name="singleBranchMode" select="1"/>
<xsl:variable name="OPACTrackClicks" select="marc:sysprefs/marc:syspref[@name='TrackClicks']"/>
<xsl:variable name="BiblioDefaultView" select="marc:sysprefs/marc:syspref[@name='BiblioDefaultView']"/>
<xsl:variable name="leader" select="marc:leader"/>
@ -1278,15 +1278,13 @@
<xsl:when test="$singleBranchMode=1">
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]">
<span class="ItemSummary">
<xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/><xsl:text> </xsl:text>
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'">
<span class="CallNumberAndLabel">
<span class="LabelCallNumber">Call number: </span>
<span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span>
<span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/><xsl:if test="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))>1"><xsl:text>, ..</xsl:text></xsl:if></span>
</span>
</xsl:if>
<xsl:text> (</xsl:text>
<xsl:value-of select="count(key('item-by-status-and-branch-home', 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>
@ -1300,15 +1298,15 @@
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]">
<span class="ItemSummary">
<span class="ItemBranch"><xsl:value-of select="items:homebranch"/> </span>
<xsl:text> (</xsl:text>
<xsl:value-of select="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))"/>
<xsl:text>) </xsl:text>
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'">
<span class="CallNumberAndLabel">
<span class="LabelCallNumber">Call number: </span>
<span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span>
<span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/><xsl:if test="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))>1"><xsl:text>, ..</xsl:text></xsl:if></span>
</span>
</xsl:if>
<xsl:text> (</xsl:text>
<xsl:value-of select="count(key('item-by-status-and-branch-home', 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>
@ -1320,15 +1318,15 @@
<xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch))[1])]">
<span class="ItemSummary">
<span class="ItemBranch"><xsl:value-of select="items:holdingbranch"/> </span>
<xsl:text> (</xsl:text>
<xsl:value-of select="count(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch)))"/>
<xsl:text>) </xsl:text>
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'">
<span class="CallNumberAndLabel">
<span class="LabelCallNumber">Call number: </span>
<span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span>
<span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/><xsl:if test="count(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch)))>1"><xsl:text>, ..</xsl:text></xsl:if></span>
</span>
</xsl:if>
<xsl:text> (</xsl:text>
<xsl:value-of select="count(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch)))"/>
<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>
@ -1358,15 +1356,15 @@
<span class="ItemBranch"><xsl:value-of select="items:homebranch"/><xsl:text> </xsl:text></span>
</xsl:if>
<span class='notforloandesc'><xsl:value-of select="items:substatus"/></span>
<xsl:text> (</xsl:text>
<xsl:value-of select="count(key('item-by-substatus-and-branch', concat(items:substatus, ' ', items:homebranch)))"/>
<xsl:text>) </xsl:text>
<xsl:if test="items:itemcallnumber != '' and items:itemcallnumber and $OPACItemLocation='callnum'">
<span class="CallNumberAndLabel">
<span class="LabelCallNumber">Call number: </span>
<span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></span>
<span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/><xsl:if test="count(key('item-by-substatus-and-branch', concat(items:substatus, ' ', items:homebranch)))>1"><xsl:text>, ..</xsl:text></xsl:if></span>
</span>
</xsl:if>
<xsl:text> (</xsl:text>
<xsl:value-of select="count(key('item-by-substatus-and-branch', concat(items:substatus, ' ', 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>
</span>
</xsl:for-each>

Loading…
Cancel
Save