Bugzilla – Attachment 17509 Details for
Bug 9995
For reference items no longer listed in XSLT result lists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
9995 Followup for Availability
9995-Followup-for-Availability.patch (text/plain), 7.19 KB, created by
Marcel de Rooy
on 2013-04-17 15:05:00 UTC
(
hide
)
Description:
9995 Followup for Availability
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2013-04-17 15:05:00 UTC
Size:
7.19 KB
patch
obsolete
>From 03781cbd9ccc4960fb2d1405bff0b41d928aebcd Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 17 Apr 2013 16:27:34 +0200 >Subject: [PATCH] 9995 Followup for Availability >Content-Type: text/plain; charset=utf-8 > >Replacing erroneous code trying to mix information from two levels (item level >and branch level) by simpler numbers per status. > >The callnumber information should follow on the Location line. Fixing this in a >second followup. >--- > .../prog/en/xslt/MARC21slim2OPACResults.xsl | 71 +++++--------------- > 1 files changed, 17 insertions(+), 54 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl >index cdeb672..83a0e15 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl >@@ -1027,10 +1027,10 @@ > </xsl:for-each> > </span> > </xsl:if> >+ > <span class="results_summary availability"> > <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"> >+ <xsl:if test="count(key('item-by-status', 'available'))=0 and count(key('item-by-status', 'reference'))=0"> > <xsl:choose> > <xsl:when test="string-length($AlternateHoldingsField)=3 and marc:datafield[@tag=$AlternateHoldingsField]"> > <xsl:variable name="AlternateHoldingsCount" select="count(marc:datafield[@tag=$AlternateHoldingsField])"/> >@@ -1044,61 +1044,23 @@ > </xsl:when> > <xsl:otherwise>No copies available </xsl:otherwise> > </xsl:choose> >- </xsl:when> >- <xsl:when test="count(key('item-by-status', 'available'))>0"> >+ </xsl:if> >+ <xsl:if test="count(key('item-by-status', 'available'))>0"> > <span class="available"> >- <b><xsl:text>Copies available for loan: </xsl:text></b> >- <xsl:variable name="available_items" >- 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', concat(items:status, ' ', items:homebranch))[1])]"> >- <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> >- </xsl:when> >- <xsl:otherwise> >- <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 and $OPACItemLocation='callnum'"> [<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> >- </xsl:otherwise> >- </xsl:choose> >- >- </span> >- </xsl:when> >- </xsl:choose> >- >- <xsl:choose> >- <xsl:when test="count(key('item-by-status', 'reference'))>0"> >+ <b><xsl:text>Copies available for loan:</xsl:text></b> >+ <xsl:text> (</xsl:text> >+ <xsl:value-of select="count(key('item-by-status', 'available'))"/> >+ <xsl:text>). </xsl:text> >+ </span> >+ </xsl:if> >+ <xsl:if 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> >+ <b><xsl:text>Copies available for reference:</xsl:text></b> >+ <xsl:text> (</xsl:text> >+ <xsl:value-of select="count(key('item-by-status', 'reference'))"/> >+ <xsl:text>). </xsl:text> > </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/> >- </xsl:when></xsl:choose> >- </xsl:when> </xsl:choose> >- >+ </xsl:if> > <xsl:if test="count(key('item-by-status', 'Checked out'))>0"> > <span class="unavailable"> > <xsl:text>Checked out (</xsl:text> >@@ -1143,6 +1105,7 @@ > <xsl:text>). </xsl:text> </span> > </xsl:if> > </span> >+ > <xsl:choose> > <xsl:when test="($OPACItemLocation='location' or $OPACItemLocation='ccode') and (count(key('item-by-status', 'available'))!=0 or count(key('item-by-status', 'reference'))!=0)"> > <span class="results_summary" id="location"> >-- >1.7.7.6
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 9995
:
17288
|
17434
|
17508
|
17509
|
17510
|
17519
|
17523