Bugzilla – Attachment 118803 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: Remove item details from reallynotforloan block
Bug-21260-Remove-item-details-from-reallynotforloa.patch (text/plain), 4.37 KB, created by
Martin Renvoize
on 2021-03-25 13:51:26 UTC
(
hide
)
Description:
Bug 21260: Remove item details from reallynotforloan block
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2021-03-25 13:51:26 UTC
Size:
4.37 KB
patch
obsolete
>From fffcaff6474f151d6f719261a07e985d4a036aac Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 24 Aug 2020 15:05:23 +0200 >Subject: [PATCH] Bug 21260: Remove item details from reallynotforloan block > >No need to display itemcallnumbers and branch info for items that >are ('really') not available. >We only show a status and a count for the reallynotforloan ('ordered') >categories (not per branch). This simplifies the code too. >We use the preceding-sibling axis to loop over the unique substatuses. > >Test plan: >[1] Pick a biblio with an available item A, an item B with notforloan 1, > an item C with notforloan 2 and two damaged items. > Include it in a OPAC search. You should see: > Available: A. Reference: B, C. Not-available: Damaged(2). >[2] Edit item C (notforloan 2). Change to notforloan -1. > Search again. You should see: > Available: A. Reference: B. Not-available: On order(1), Damaged(2). > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: ava li <rubyli208@gmail.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../en/xslt/MARC21slim2OPACResults.xsl | 27 +++++-------------- > 1 file changed, 7 insertions(+), 20 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index b611865f2a..a2eb62175f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -1381,26 +1381,13 @@ > > <!-- First the remaining not for loan categories --> > <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 and $OPACItemLocation='callnum'"> >- <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> >+ <xsl:for-each select="$unavailable_items[not(./items:substatus=preceding-sibling::*/items:substatus)]"> >+ <span class="ItemSummary unavailable"> >+ <span class='notforloandesc'><xsl:value-of select="items:substatus"/></span> >+ <xsl:text> (</xsl:text> >+ <xsl:value-of select="count(parent::*/items:item/items:substatus[ text() = current()/items:substatus ])"/> >+ <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> > >-- >2.20.1
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