Bugzilla – Attachment 57834 Details for
Bug 17624
Add Staff Collection status for items in C4::XSLT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17624: [Follow-up] Consistency between Availability and Location
Bug-17624-Follow-up-Consistency-between-Availabili.patch (text/plain), 4.56 KB, created by
Marcel de Rooy
on 2016-11-30 14:42:16 UTC
(
hide
)
Description:
Bug 17624: [Follow-up] Consistency between Availability and Location
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-11-30 14:42:16 UTC
Size:
4.56 KB
patch
obsolete
>From 0a215349e282551e2ee90550240b1196c254dc82 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 15 Nov 2016 16:41:45 +0100 >Subject: [PATCH] Bug 17624: [Follow-up] Consistency between Availability and > Location >Content-Type: text/plain; charset=utf-8 > >If OpacItemLocation is set to location, the opac results xslt shows >something like: > Availability: Copies available for loan: Library(1). > Copies available for reference: Library(1). > Location(s): Location_1 callnumber_1 > >Note that the reference item is not listed under Location, since the logic >for that section is different. Simply stated: Available is created by two >separate if statements, but Location is one if-else statement. > >This patch changes the Location logic to two if statements. In this >process some single choose/when's are replaced by simple if's. Actually, >the change is quite minimal. > >NOTE: A conditional <br> tag is removed from the XSLT between the reference >section and the status counts. > >Test plan: >[1] Set OpacItemLocation to Location. >[2] Use a biblio with two items. Put data in callnumber and location. > Mark one item as not for loan. >[3] Verify that you now see both items in the Location line of the > search results. >--- > .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 20 +++++++------------- > 1 file changed, 7 insertions(+), 13 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index 61828e0..489d063 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -1243,12 +1243,6 @@ > </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 test="count(key('item-by-status', 'Staff Collection'))>0"> > <span class="unavailable"> > <xsl:text>Staff Collection (</xsl:text> >@@ -1301,11 +1295,10 @@ > </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)"> >+ <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 location"> > <span class="label">Location(s): </span> >- <xsl:choose> >- <xsl:when test="count(key('item-by-status', 'available'))>0"> >+ <xsl:if test="count(key('item-by-status', 'available'))>0"> > <span class="available"> > <xsl:variable name="available_items" select="key('item-by-status', 'available')"/> > <xsl:for-each select="$available_items[generate-id() = generate-id(key('item-by-status-and-branch-home', concat(items:status, ' ', items:homebranch))[1])]"> >@@ -1317,8 +1310,9 @@ > <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> > </span> >- </xsl:when> >- <xsl:when test="count(key('item-by-status', 'reference'))>0"> >+ </xsl:if> >+ >+ <xsl:if test="count(key('item-by-status', 'reference'))>0"> > <span class="available"> > <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])]"> >@@ -1330,8 +1324,8 @@ > <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> > </span> >- </xsl:when> >- </xsl:choose> >+ </xsl:if> >+ > </span> > </xsl:when> > </xsl:choose> >-- >2.1.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 17624
:
57540
|
57541
|
57833
| 57834