Bugzilla – Attachment 118805 Details for
Bug 21260
Improve the Availability line of OPAC XSLT search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21260: Move the count before the callnumbers
Bug-21260-Move-the-count-before-the-callnumbers.patch (text/plain), 10.46 KB, created by
Martin Renvoize (ashimema)
on 2021-03-25 13:51:33 UTC
(
hide
)
Description:
Bug 21260: Move the count before the callnumbers
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-03-25 13:51:33 UTC
Size:
10.46 KB
patch
obsolete
>From ed5a78aafc4100a7efc6be38f3d366eb522a2116 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 25 Aug 2020 14:44:38 +0000 >Subject: [PATCH] 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> >--- > .../en/xslt/MARC21slim2OPACResults.xsl | 42 +++++++++---------- > 1 file changed, 20 insertions(+), 22 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index a2eb62175f..bab0d4ebba 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/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"/> >@@ -1276,23 +1276,21 @@ > select="key('item-by-status', 'available')"/> > <xsl:choose> > <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])]"> >+ <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="LabelCallNumber">Call number: </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> > </xsl:choose> > </span> >- </xsl:for-each> >+ </xsl:for-each> > </xsl:when> > <xsl:otherwise> > <xsl:choose> >@@ -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="LabelCallNumber">Call number: </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="LabelCallNumber">Call number: </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> >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21260
:
105375
|
105376
|
109107
|
109108
|
109109
|
109110
|
109111
|
109112
|
109182
|
115265
|
115266
|
115267
|
115268
|
115269
|
115270
|
115271
|
118800
|
118801
|
118802
|
118803
|
118804
| 118805 |
118806
|
119569