Bugzilla – Attachment 14978 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]
[SIGNED-OFF] Bug 7441: Followup search results showing wrong branch [UNIMARC]
SIGNED-OFF-Bug-7441-Followup-search-results-showin.patch (text/plain), 9.28 KB, created by
Bernardo Gonzalez Kriegel
on 2013-01-31 15:43:32 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 7441: Followup search results showing wrong branch [UNIMARC]
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2013-01-31 15:43:32 UTC
Size:
9.28 KB
patch
obsolete
>From eac06f88c4d6215ec16ea74dde7d630397ea3e94 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] [SIGNED-OFF] Bug 7441: Followup search results showing wrong > branch [UNIMARC] > >Unimarc modifications > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >--- > .../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.9.5
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