Bugzilla – Attachment 19090 Details for
Bug 7441
Search results showing wrong branch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7441: Followup search results showing wrong branch [UNIMARC]
Bug-7441-Followup-search-results-showing-wrong-bra.patch (text/plain), 9.32 KB, created by
Chris Cormack
on 2013-06-18 08:03:10 UTC
(
hide
)
Description:
Bug 7441: Followup search results showing wrong branch [UNIMARC]
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2013-06-18 08:03:10 UTC
Size:
9.32 KB
patch
obsolete
>From 523587346aabefd81671459aefad087127fbe575 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 21 Dec 2012 15:37:43 +0100 >Subject: [PATCH] Bug 7441: Followup search results showing wrong branch > [UNIMARC] > >Unimarc modifications > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Signed-off-by: Chris Rohde <crohde@roseville.ca.us> >--- > .../prog/en/xslt/UNIMARCslim2OPACResults.xsl | 98 ++++++++++++-------- > 1 file changed, 57 insertions(+), 41 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl >index a086d31..77315e1 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl >@@ -11,7 +11,9 @@ > <xsl:import href="UNIMARCslimUtils.xsl"/> > <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/> > <xsl:key name="item-by-status" match="items:item" use="items:status"/> >-<xsl:key name="item-by-status-and-branch" match="items:item" use="concat(items:status, ' ', items:homebranch)"/> >+<xsl:key name="item-by-status-and-branch-holding" match="items:item" use="concat(items:status, ' ', items:holdingbranch)"/> >+<xsl:key name="item-by-status-and-branch-home" match="items:item" use="concat(items:status, ' ', items:homebranch)"/> >+ > > <xsl:template match="/"> > <xsl:apply-templates/> >@@ -26,6 +28,7 @@ > <xsl:variable name="isbn" > select="marc:datafield[@tag=010]/marc:subfield[@code='a']"/> > >+ <xsl:variable name="OPACResultsBranchXSLT" select="marc:sysprefs/marc:syspref[@name='OPACResultsBranchXSLT']"/> > <xsl:variable name="hidelostitems" select="marc:sysprefs/marc:syspref[@name='hidelostitems']"/> > <xsl:variable name="singleBranchMode" select="marc:sysprefs/marc:syspref[@name='singleBranchMode']"/> > >@@ -133,33 +136,39 @@ > <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">[<xsl:value-of select="items:itemcallnumber"/>] >- </xsl:if> >+ <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: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: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> >+ <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:when> >+ <xsl:otherwise> >+ <xsl:choose> >+ <xsl:when test="$OPACResultsBranchXSLT='homebranch'"> >+ <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', 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-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> >+ </xsl:for-each> >+ </xsl:when> >+ <xsl:when test="$OPACResultsBranchXSLT='holdingbranch'"> >+ <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch))[1])]"> >+ <xsl:value-of select="items:holdingbranch"/> >+ <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-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></xsl:choose> >+ </xsl:for-each> >+ </xsl:when> >+ </xsl:choose> >+ </xsl:otherwise> > </xsl:choose> > </span> > </xsl:when> >@@ -168,23 +177,30 @@ > <xsl:when 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:variable name="reference_items" select="key('item-by-status', 'reference')"/> >+ >+ <xsl:choose> >+ <xsl:when test="$OPACResultsBranchXSLT='homebranch'"> >+ <xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch-home', 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-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> >+ </xsl:for-each> > </xsl:when> >- <xsl:otherwise> >- <xsl:text>, </xsl:text> >- </xsl:otherwise> >- </xsl:choose> >- </xsl:for-each> >+ <xsl:when test="$OPACResultsBranchXSLT='holdingbranch'"> >+ <xsl:for-each select="$reference_items[generate-id() = generate-id(key('item-by-status-and-branch-holding', concat(items:status, ' ', items:holdingbranch))[1])]"> >+ <xsl:value-of select="items:holdingbranch"/> >+ <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-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></xsl:choose> >+ </xsl:for-each> >+ </xsl:when> >+ </xsl:choose> > </span> > </xsl:when> > </xsl:choose> >-- >1.7.10.4
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 7441
:
8656
|
8657
|
9700
|
9701
|
12550
|
12551
|
12552
|
12553
|
13856
|
13888
|
14229
|
14361
|
14362
|
14977
|
14978
|
14979
|
17901
|
17902
|
17903
|
17968
|
18151
|
18152
|
18153
|
18154
|
18857
|
18858
|
18859
|
18942
|
19089
|
19090
|
19091
|
19470
|
19471
|
19472
|
19473
|
19474
|
19475
|
51963
|
52746
|
52747
|
52810
|
52811
|
54058
|
54101
|
54102
|
54250