Bugzilla – Attachment 119111 Details for
Bug 26302
OPAC XSLT Results: List variable number of itemcallnumbers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26302: Use resultsMaxItemsUnavailable in stylesheet
Bug-26302-Use-resultsMaxItemsUnavailable-in-styles.patch (text/plain), 8.64 KB, created by
Marcel de Rooy
on 2021-04-02 09:43:34 UTC
(
hide
)
Description:
Bug 26302: Use resultsMaxItemsUnavailable in stylesheet
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-04-02 09:43:34 UTC
Size:
8.64 KB
patch
obsolete
>From 2b387cd77ebfca10281aa1a75960f137bb038986 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 2 Apr 2021 09:09:25 +0000 >Subject: [PATCH] Bug 26302: Use resultsMaxItemsUnavailable in stylesheet >Content-Type: text/plain; charset=utf-8 > >We start here with Checked out until On hold. >Not sure if we should do exactly the same for the remaining >not for loan categories. >--- > .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 115 ++++++++++++--------- > 1 file changed, 67 insertions(+), 48 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index 7a0065fef1..9ebce5b81c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -40,6 +40,7 @@ > <xsl:variable name="OPACTrackClicks" select="marc:sysprefs/marc:syspref[@name='TrackClicks']"/> > <xsl:variable name="BiblioDefaultView" select="marc:sysprefs/marc:syspref[@name='BiblioDefaultView']"/> > <xsl:variable name="resultsMaxItems" select="marc:sysprefs/marc:syspref[@name='resultsMaxItems']"/> >+ <xsl:variable name="resultsMaxItemsUnavailable" select="marc:sysprefs/marc:syspref[@name='resultsMaxItemsUnavailable']"/> > <xsl:variable name="leader" select="marc:leader"/> > <xsl:variable name="leader6" select="substring($leader,7,1)"/> > <xsl:variable name="leader7" select="substring($leader,8,1)"/> >@@ -1415,55 +1416,50 @@ > </xsl:for-each> > > <!-- Followed by other statuses --> >- <xsl:if test="count(key('item-by-status', 'Checked out'))>0"> >- <span class="unavailable"> >- <xsl:text>Checked out (</xsl:text> >- <xsl:value-of select="count(key('item-by-status', 'Checked out'))"/> >- <xsl:text>). </xsl:text> >- </span> >- </xsl:if> >- <xsl:if test="count(key('item-by-status', 'Withdrawn'))>0"> >- <span class="unavailable"> >- <xsl:text>Withdrawn (</xsl:text> >- <xsl:value-of select="count(key('item-by-status', 'Withdrawn'))"/> >- <xsl:text>). </xsl:text> >- </span> >- </xsl:if> >- <xsl:if test="$hidelostitems='0' and count(key('item-by-status', 'Lost'))>0"> >- <span class="unavailable"> >- <xsl:text>Lost (</xsl:text> >- <xsl:value-of select="count(key('item-by-status', 'Lost'))"/> >- <xsl:text>). </xsl:text> >- </span> >- </xsl:if> >- <xsl:if test="count(key('item-by-status', 'Damaged'))>0"> >- <span class="unavailable"> >- <xsl:text>Damaged (</xsl:text> >- <xsl:value-of select="count(key('item-by-status', 'Damaged'))"/> >- <xsl:text>). </xsl:text> >- </span> >- </xsl:if> >- <xsl:if test="count(key('item-by-status', 'Pending hold'))>0"> >- <span class="unavailable"> >- <xsl:text>Pending hold (</xsl:text> >- <xsl:value-of select="count(key('item-by-status', 'Pending hold'))"/> >- <xsl:text>). </xsl:text> >- </span> >- </xsl:if> >- <xsl:if test="count(key('item-by-status', 'In transit'))>0"> >- <span class="unavailable"> >- <xsl:text>In transit (</xsl:text> >- <xsl:value-of select="count(key('item-by-status', 'In transit'))"/> >- <xsl:text>). </xsl:text> >- </span> >- </xsl:if> >- <xsl:if test="count(key('item-by-status', 'Waiting'))>0"> >- <span class="unavailable"> >- <xsl:text>On hold (</xsl:text> >- <xsl:value-of select="count(key('item-by-status', 'Waiting'))"/> >- <xsl:text>). </xsl:text> >- </span> >+ <xsl:call-template name="listCallNumbers"> >+ <xsl:with-param name="status_text">Checked out</xsl:with-param> >+ <xsl:with-param name="items" select="key('item-by-status', 'Checked out')"/> >+ <xsl:with-param name="max" select="$resultsMaxItemsUnavailable"/> >+ </xsl:call-template> >+ >+ <xsl:call-template name="listCallNumbers"> >+ <xsl:with-param name="status_text">Withdrawn</xsl:with-param> >+ <xsl:with-param name="items" select="key('item-by-status', 'Withdrawn')"/> >+ <xsl:with-param name="max" select="$resultsMaxItemsUnavailable"/> >+ </xsl:call-template> >+ >+ <xsl:if test="$hidelostitems='0'"> >+ <xsl:call-template name="listCallNumbers"> >+ <xsl:with-param name="status_text">Lost</xsl:with-param> >+ <xsl:with-param name="items" select="key('item-by-status', 'Lost')"/> >+ <xsl:with-param name="max" select="$resultsMaxItemsUnavailable"/> >+ </xsl:call-template> > </xsl:if> >+ >+ <xsl:call-template name="listCallNumbers"> >+ <xsl:with-param name="status_text">Damaged</xsl:with-param> >+ <xsl:with-param name="items" select="key('item-by-status', 'Damaged')"/> >+ <xsl:with-param name="max" select="$resultsMaxItemsUnavailable"/> >+ </xsl:call-template> >+ >+ <xsl:call-template name="listCallNumbers"> >+ <xsl:with-param name="status_text">Pending hold</xsl:with-param> >+ <xsl:with-param name="items" select="key('item-by-status', 'Pending hold')"/> >+ <xsl:with-param name="max" select="$resultsMaxItemsUnavailable"/> >+ </xsl:call-template> >+ >+ <xsl:call-template name="listCallNumbers"> >+ <xsl:with-param name="status_text">In transit</xsl:with-param> >+ <xsl:with-param name="items" select="key('item-by-status', 'In transit')"/> >+ <xsl:with-param name="max" select="$resultsMaxItemsUnavailable"/> >+ </xsl:call-template> >+ >+ <xsl:call-template name="listCallNumbers"> >+ <xsl:with-param name="status_text">On hold</xsl:with-param> >+ <xsl:with-param name="items" select="key('item-by-status', 'Waiting')"/> >+ <xsl:with-param name="max" select="$resultsMaxItemsUnavailable"/> >+ </xsl:call-template> >+ > </span> > </xsl:when> > </xsl:choose> >@@ -1623,4 +1619,27 @@ > </xsl:if> > </xsl:template> > >+ <xsl:template name="listCallNumbers"> >+ <xsl:param name="items"/> >+ <xsl:param name="max"/> >+ <xsl:param name="status_text"/> >+ <xsl:if test="count($items)>0"> >+ <span class="unavailable"> >+ <xsl:value-of select="$status_text"/> >+ <xsl:text> (</xsl:text> >+ <xsl:value-of select="count($items)"/> >+ <xsl:text>)</xsl:text> >+ <xsl:if test="$max>0"> >+ <xsl:text> [ </xsl:text> >+ <xsl:for-each select="$items[position() <= $max]"> >+ <xsl:value-of select="items:itemcallnumber"/><xsl:if test="position()!=last()"><xsl:text>, </xsl:text></xsl:if> >+ </xsl:for-each> >+ <xsl:if test="count($items)>$max"><xsl:text>, ..</xsl:text></xsl:if> >+ <xsl:text> ]</xsl:text> >+ </xsl:if> >+ <xsl:text>. </xsl:text> >+ </span> >+ </xsl:if> >+ </xsl:template> >+ > </xsl:stylesheet> >-- >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 26302
:
109184
|
119108
|
119109
|
119110
|
119111
|
122386
|
122387
|
122388
|
122389
|
122391
|
122462
|
122463
|
122464
|
122465
|
122466
|
122487
|
123499
|
123500
|
123501
|
123502
|
123526
|
123527
|
123528
|
123529
|
123531
|
123532
|
123533
|
123534
|
123640
|
123641
|
123643
|
123644
|
123645
|
123646
|
123647
|
123648
|
123649
|
124243
|
124244
|
124245