Bugzilla – Attachment 186556 Details for
Bug 40832
Display MARC 382 (Medium of Performance) on result list and detail page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40832: Add MARC21 field 382 Medium of Performance to detail pages
Bug-40832-Add-MARC21-field-382-Medium-of-Performan.patch (text/plain), 8.55 KB, created by
Lari Taskula
on 2025-09-18 13:08:12 UTC
(
hide
)
Description:
Bug 40832: Add MARC21 field 382 Medium of Performance to detail pages
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2025-09-18 13:08:12 UTC
Size:
8.55 KB
patch
obsolete
>From 7a714d3580624642083b4a2285014b92e246a135 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >Date: Thu, 18 Sep 2025 12:52:40 +0300 >Subject: [PATCH] Bug 40832: Add MARC21 field 382 Medium of Performance to > detail pages > >To test: > >1. On staff client, navigate to Cataloging >2. Click New from Z39.50/SRU >3. Using Library of Congress, search ISBN 9780758668790 >4. Import record and save (no adding items required) >5. Repeat steps 1-2 >6. Using Library of Congress, search LC call number 2017564102 >7. Import record and save (no adding items required) >8. Open imported records in staff client >9. Observe the following details: > >for ISBN: 9780758668790 >"Medium of performance: children's chorus (1), piano (1) or organ (1), tambourine (1) [optional]" > >for LC call number 2017564102 >"Medium of performance: oboe (1) or violin (1), string orchestra" > >10. Navigate to the same records in OPAC >11. Observe exactly the same details >--- > .../en/xslt/MARC21slim2intranetDetail.xsl | 54 +++++++++++++++++++ > .../en/xslt/MARC21slim2OPACDetail.xsl | 54 +++++++++++++++++++ > 2 files changed, 108 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index 9167240766c..fe44dbb5c0b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -424,6 +424,60 @@ > </span> > </xsl:if> > >+ <!-- 382 - Medium of Performance --> >+ <xsl:if test="marc:datafield[@tag=382]"> >+ <span class="results_summary medium_of_performance"> >+ <span class="label">Medium of performance: </span> >+ <xsl:for-each select="marc:datafield[@tag=382]"> >+ <xsl:for-each select="marc:subfield"> >+ <xsl:if test="@code='a' or @code='b'"> >+ <xsl:if test="preceding-sibling::marc:subfield[@code='a'] or preceding-sibling::marc:subfield[@code='b']"> >+ <xsl:if test="preceding-sibling::marc:subfield[@code='a' or @code='b'][1]/following-sibling::marc:subfield[@code='d']/following-sibling::marc:subfield[@code='a' or @code='b'][1] = ."> >+ <xsl:text>)</xsl:text> >+ </xsl:if> >+ <xsl:text>, </xsl:text> >+ </xsl:if> >+ >+ <xsl:value-of select="text()"/> >+ </xsl:if> >+ <xsl:if test="@code='p'"> >+ <xsl:text> or </xsl:text> >+ <xsl:value-of select="text()"/> >+ </xsl:if> >+ <xsl:if test="@code='d'"> >+ <xsl:choose> >+ <xsl:when test="preceding-sibling::marc:subfield[@code='a' or @code='b'][1]/following-sibling::marc:subfield[@code='d'][1] = ."> >+ <xsl:text> (doubling </xsl:text> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:choose> >+ <xsl:when test="not(following-sibling::marc:subfield[@code='d']) or (following-sibling::marc:subfield[@code='a' or @code='b'][1]/following-sibling::marc:subfield[@code='d'][1]/preceding-sibling::marc:subfield[@code='d'][1] = .)"> >+ <xsl:text> and </xsl:text> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:text>, </xsl:text> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:value-of select="text()"/> >+ </xsl:if> >+ <xsl:if test="@code='n' or @code='e'"> >+ <xsl:text> (</xsl:text> >+ <xsl:value-of select="text()"/> >+ <xsl:text>)</xsl:text> >+ </xsl:if> >+ <xsl:if test="@code='v'"> >+ <xsl:text> [</xsl:text> >+ <xsl:value-of select="text()"/> >+ <xsl:text>]</xsl:text> >+ </xsl:if> >+ </xsl:for-each> >+ <xsl:if test="position()!=last()"><xsl:text>; </xsl:text></xsl:if> >+ </xsl:for-each> >+ </span> >+ </xsl:if> >+ > <!-- 385 - Audience --> > <xsl:if test="marc:datafield[@tag=385]"> > <span class="results_summary audience"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index ea7c985eccc..b86f2caeacd 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -489,6 +489,60 @@ > </span> > </xsl:if> > >+ <!-- 382 - Medium of Performance --> >+ <xsl:if test="marc:datafield[@tag=382]"> >+ <span class="results_summary medium_of_performance"> >+ <span class="label">Medium of performance: </span> >+ <xsl:for-each select="marc:datafield[@tag=382]"> >+ <xsl:for-each select="marc:subfield"> >+ <xsl:if test="@code='a' or @code='b'"> >+ <xsl:if test="preceding-sibling::marc:subfield[@code='a'] or preceding-sibling::marc:subfield[@code='b']"> >+ <xsl:if test="preceding-sibling::marc:subfield[@code='a' or @code='b'][1]/following-sibling::marc:subfield[@code='d']/following-sibling::marc:subfield[@code='a' or @code='b'][1] = ."> >+ <xsl:text>)</xsl:text> >+ </xsl:if> >+ <xsl:text>, </xsl:text> >+ </xsl:if> >+ >+ <xsl:value-of select="text()"/> >+ </xsl:if> >+ <xsl:if test="@code='p'"> >+ <xsl:text> or </xsl:text> >+ <xsl:value-of select="text()"/> >+ </xsl:if> >+ <xsl:if test="@code='d'"> >+ <xsl:choose> >+ <xsl:when test="preceding-sibling::marc:subfield[@code='a' or @code='b'][1]/following-sibling::marc:subfield[@code='d'][1] = ."> >+ <xsl:text> (doubling </xsl:text> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:choose> >+ <xsl:when test="not(following-sibling::marc:subfield[@code='d']) or (following-sibling::marc:subfield[@code='a' or @code='b'][1]/following-sibling::marc:subfield[@code='d'][1]/preceding-sibling::marc:subfield[@code='d'][1] = .)"> >+ <xsl:text> and </xsl:text> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:text>, </xsl:text> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:value-of select="text()"/> >+ </xsl:if> >+ <xsl:if test="@code='n' or @code='e'"> >+ <xsl:text> (</xsl:text> >+ <xsl:value-of select="text()"/> >+ <xsl:text>)</xsl:text> >+ </xsl:if> >+ <xsl:if test="@code='v'"> >+ <xsl:text> [</xsl:text> >+ <xsl:value-of select="text()"/> >+ <xsl:text>]</xsl:text> >+ </xsl:if> >+ </xsl:for-each> >+ <xsl:if test="position()!=last()"><xsl:text>; </xsl:text></xsl:if> >+ </xsl:for-each> >+ </span> >+ </xsl:if> >+ > <!-- 385 - Audience --> > <xsl:if test="marc:datafield[@tag=385]"> > <span class="results_summary audience"> >-- >2.34.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 40832
:
186552
|
186553
| 186556 |
186557