Bugzilla – Attachment 107462 Details for
Bug 24630
UNIMARC XSLT Update for bug 7611
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24630: UNIMARC XSLT changes for bug 7611
Bug-24630-UNIMARC-XSLT-changes-for-bug-7611.patch (text/plain), 11.75 KB, created by
Nick Clemens (kidclamp)
on 2020-07-28 12:04:00 UTC
(
hide
)
Description:
Bug 24630: UNIMARC XSLT changes for bug 7611
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-07-28 12:04:00 UTC
Size:
11.75 KB
patch
obsolete
>From 1f2b2478e7623a0b87c5537adc23b7010981ed9a Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 11 Feb 2020 14:06:07 +0000 >Subject: [PATCH] Bug 24630: UNIMARC XSLT changes for bug 7611 > >Follow test plan from 7611 on a UNIMARC system. > >These changes have not been tested by me >--- > .../bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl | 156 ++++++++++++++------- > 1 file changed, 108 insertions(+), 48 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl >index e1bf1974a1..a4f02360dc 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslim2OPACResults.xsl >@@ -14,6 +14,7 @@ > <xsl:key name="item-by-status" match="items:item" use="items:status"/> > <xsl:key name="item-by-status-and-branch-home" 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-substatus-and-branch" match="items:item" use="concat(items:substatus, ' ', items:homebranch)"/> > > <xsl:template match="/"> > <xsl:apply-templates/> >@@ -191,8 +192,8 @@ > No items available > </xsl:when> > <xsl:when test="count(key('item-by-status', 'available'))>0"> >- <span class="available"> >- <strong><xsl:text>Items available for loan: </xsl:text></strong> >+ <span class="available reallyavailable"> >+ <span class="AvailabilityLabel"><strong><xsl:text>Items available for loan: </xsl:text></strong></span> > <xsl:variable name="available_items" select="key('item-by-status', 'available')"/> > <xsl:choose> > <xsl:when test="$singleBranchMode=1"> >@@ -208,38 +209,50 @@ > <xsl:choose> > <xsl:when test="$OPACResultsLibrary='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> >+ <span class="ItemSummary"> >+ <span class="ItemBranch"><xsl:value-of select="items:homebranch"/> </span> >+ <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> >+ <span class="CallNumberAndLabel"> >+ <span class="LabelCallNumber">Call number: </span> >+ <span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></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:when> > <xsl:otherwise> > <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> >+ <span class="ItemSummary"> >+ <span class="ItemBranch"><xsl:value-of select="items:holdingbranch"/> </span> >+ <xsl:if test="items:itemcallnumber != '' and items:itemcallnumber"> >+ <span class="CallNumberAndLabel"> >+ <span class="LabelCallNumber">Call number: </span> >+ <span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></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> >+ </xsl:choose> >+ </span> > </xsl:for-each> > </xsl:otherwise> > </xsl:choose> >@@ -250,30 +263,77 @@ > </xsl:choose> > <xsl:choose> > <xsl:when test="count(key('item-by-status', 'reference'))>0"> >- <span class="available"> >- <strong><xsl:text>Items available for reference: </xsl:text></strong> >+ <span class="available reference"> >+ <span class="AvailabilityLabel"><strong><xsl:text>Items available for reference: </xsl:text></strong></span> > <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-home', concat(items:status, ' ', items:homebranch))[1])]"> >- <xsl:if test="$singleBranchMode=0"> >- <xsl:value-of select="items:homebranch"/> >- </xsl:if> >- <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 select="$reference_items[generate-id() = generate-id(key('item-by-substatus-and-branch', concat(items:substatus, ' ', items:homebranch))[1])]"> >+ <span> >+ <xsl:attribute name="class"> >+ ItemSummary >+ <xsl:value-of select="translate(items:substatus,' ','_')"/> >+ </xsl:attribute> >+ <xsl:if test="$singleBranchMode=0"> >+ <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:if test="items:itemcallnumber != '' and items:itemcallnumber"> >+ <span class="CallNumberAndLabel"> >+ <span class="LabelCallNumber">Call number: </span> >+ <span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></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> > </span> > </xsl:when> > </xsl:choose> >+ <xsl:if test="count(key('item-by-status', 'available'))=0"> >+ <span class="available"><xsl:value-of select="items:homebranch"/><xsl:text>: </xsl:text></span> >+ </xsl:if> >+ >+ <xsl:choose> >+ <xsl:when test="count(key('item-by-status', 'reallynotforloan'))>0"> >+ <span class="unavailable"> >+ <br /> >+ <xsl:variable name="unavailable_items" select="key('item-by-status', 'reallynotforloan')"/> >+ <xsl:for-each select="$unavailable_items[generate-id() = generate-id(key('item-by-substatus-and-branch', concat(items:substatus, ' ', items:homebranch))[1])]"> >+ <span> >+ <xsl:attribute name="class"> >+ ItemSummary >+ <xsl:value-of select="translate(items:substatus,' ','_')"/> >+ </xsl:attribute> >+ <xsl:if test="$singleBranchMode=0"> >+ <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:if test="items:itemcallnumber != '' and items:itemcallnumber"> >+ <span class="CallNumberAndLabel"> >+ <span class="LabelCallNumber">Call number: </span> >+ <span class="CallNumber"><xsl:value-of select="items:itemcallnumber"/></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> >+ </span> >+ </xsl:when> >+ </xsl:choose> >+ > <xsl:if test="count(key('item-by-status', 'Checked out'))>0"> > <span class="unavailable"> > <xsl:text>Checked out (</xsl:text> >-- >2.11.0
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 24630
:
98709
|
107462
|
116578
|
116579
|
116580
|
128935