Bugzilla – Attachment 109107 Details for
Bug 21260
Improve the Availability line of OPAC XSLT search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21260: Indentation at higher levels for Availability/Location
Bug-21260-Indentation-at-higher-levels-for-Availab.patch (text/plain), 9.42 KB, created by
Marcel de Rooy
on 2020-08-25 14:57:23 UTC
(
hide
)
Description:
Bug 21260: Indentation at higher levels for Availability/Location
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2020-08-25 14:57:23 UTC
Size:
9.42 KB
patch
obsolete
>From bfb870674f7a8bfd3e97934ecf2e11117c7bd968 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 19 Aug 2020 14:35:22 +0200 >Subject: [PATCH] Bug 21260: Indentation at higher levels for > Availability/Location >Content-Type: text/plain; charset=utf-8 > >Only whitespace changes and few comments. > >Test plan: >Nothing to test. Count the spaces ;) > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 90 ++++++++++++---------- > 1 file changed, 48 insertions(+), 42 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index a0879f65d4..8b6d73c998 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -1217,10 +1217,12 @@ > </xsl:for-each> > </span> > </xsl:if> >- <span class="results_summary availability"> >- <span class="label">Availability: </span> >- <xsl:choose> >- <xsl:when test="count(key('item-by-status', 'available'))=0 and count(key('item-by-status', 'reference'))=0"> >+ >+ <!-- Availability line --> >+ <span class="results_summary availability"> >+ <span class="label">Availability: </span> >+ <xsl:choose> >+ <xsl:when test="count(key('item-by-status', 'available'))=0 and count(key('item-by-status', 'reference'))=0"> > <xsl:choose> > <xsl:when test="string-length($AlternateHoldingsField)=3 and marc:datafield[@tag=$AlternateHoldingsField]"> > <xsl:variable name="AlternateHoldingsCount" select="count(marc:datafield[@tag=$AlternateHoldingsField])"/> >@@ -1234,13 +1236,13 @@ > </xsl:when> > <xsl:otherwise><span class="noitems">No items available </span> </xsl:otherwise> > </xsl:choose> >- </xsl:when> >- <xsl:when test="count(key('item-by-status', 'available'))>0"> >+ </xsl:when> >+ <xsl:when test="count(key('item-by-status', 'available'))>0"> > <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:choose> > <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])]"> > <span class="ItemSummary"> >@@ -1303,12 +1305,11 @@ > </xsl:for-each> > </xsl:otherwise> > </xsl:choose> >- </xsl:otherwise> >- </xsl:choose> >- >- </span> >- </xsl:when> >- </xsl:choose> >+ </xsl:otherwise> >+ </xsl:choose> >+ </span> >+ </xsl:when> >+ </xsl:choose> > > <xsl:choose> > <xsl:when test="count(key('item-by-status', 'reference'))>0"> >@@ -1341,12 +1342,12 @@ > </xsl:when> > </xsl:choose> > >- <xsl:if test="count(key('item-by-status', 'available'))=0"> >+ <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:if> > >- <xsl:choose> >- <xsl:when test="count(key('item-by-status', 'reallynotforloan'))>0"> >+ <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')"/> >@@ -1373,62 +1374,65 @@ > </span> > </xsl:for-each> > </span> >- </xsl:when> >- </xsl:choose> >+ </xsl:when> >+ </xsl:choose> > >- <xsl:if test="count(key('item-by-status', 'Checked out'))>0"> >+ <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"> >+ </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"> >+ </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"> >+ </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', 'On order'))>0"> >+ </xsl:if> >+ <xsl:if test="count(key('item-by-status', 'On order'))>0"> > <span class="unavailable"> > <xsl:text>On order (</xsl:text> > <xsl:value-of select="count(key('item-by-status', 'On order'))"/> > <xsl:text>). </xsl:text> </span> >- </xsl:if> >- <xsl:if test="count(key('item-by-status', 'Pending hold'))>0"> >+ </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"> >+ </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"> >+ </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: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)"> >- <span class="results_summary location"> >+ </xsl:if> >+ </span> >+ <!-- End of Availability line --> >+ >+ <!-- Location line --> >+ <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)"> >+ <span class="results_summary location"> > > <xsl:choose> > <xsl:when test="$OPACItemLocation='location'"> >@@ -1477,9 +1481,11 @@ > </span> > </xsl:when> > </xsl:choose> >- </span> >- </xsl:when> >- </xsl:choose> >+ </span> >+ </xsl:when> >+ </xsl:choose> >+ <!-- End of Location line --> >+ > </xsl:template> > > <xsl:template name="nameABCQ"> >-- >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 21260
:
105375
|
105376
|
109107
|
109108
|
109109
|
109110
|
109111
|
109112
|
109182
|
115265
|
115266
|
115267
|
115268
|
115269
|
115270
|
115271
|
118800
|
118801
|
118802
|
118803
|
118804
|
118805
|
118806
|
119569