Bugzilla – Attachment 179634 Details for
Bug 39428
Field 787, Relationship information (R)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug: 39428
Bug-39428.patch (text/plain), 8.34 KB, created by
Mark Hofstetter
on 2025-03-23 20:52:19 UTC
(
hide
)
Description:
Bug: 39428
Filename:
MIME Type:
Creator:
Mark Hofstetter
Created:
2025-03-23 20:52:19 UTC
Size:
8.34 KB
patch
obsolete
>From 629a2b7dee29624cbe9f35f3ea4a740245267e1c Mon Sep 17 00:00:00 2001 >From: Mark Hofstetter <mark@hofstetter.at> >Date: Sun, 23 Mar 2025 21:42:38 +0100 >Subject: [PATCH] Bug: 39428 > >When displaying MARC21 Field 787, subfield i + ind2 == 8 > >subfield i should be use as "label" as in field 777 > >To test: >1) enable 787 i + t in the framework you are planing to test >2) edit a record and create a subfield 787i to XXX an t to "Title787", > set ind2 to 8 >3) View record in OPAC you'll see the line "Other related works: XXX: Title787" >4) apply patch >5) View record in OPAC and the line should read now: "XXX: Title787" >7) thx and please sign off >--- > .../en/xslt/MARC21slim2OPACDetail.xsl | 111 ++++++++++-------- > 1 file changed, 63 insertions(+), 48 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index de21d62386..1c4f920d56 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -88,7 +88,7 @@ > </xsl:choose> > </xsl:when> > <xsl:when test="$leader6='t'">Text</xsl:when> >- <xsl:when test="$leader6='o'">Kit</xsl:when> >+ <xsl:when test="$leader6='o'">Kit</xsl:when> > <xsl:when test="$leader6='p'">Mixed materials</xsl:when> > <xsl:when test="$leader6='m'">Computer file</xsl:when> > <xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when> >@@ -1093,56 +1093,71 @@ > > <!-- 787 Other Relationship Entry --> > <xsl:if test="marc:datafield[@tag=787]"> >- <span class="results_summary other_relationship_entry"><span class="label">Other related works: </span> >- <xsl:for-each select="marc:datafield[@tag=787]"> >- <span class="other_relationship_entry"> >- <xsl:if test="marc:subfield[@code='i']"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">i</xsl:with-param> >- </xsl:call-template> >- <xsl:text> </xsl:text> >- </xsl:if> >- <xsl:choose> >- <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >- <a> >- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">a_t</xsl:with-param> >- </xsl:call-template> >- </a> >- </xsl:when> >- <xsl:otherwise> >- <xsl:variable name="relation_query"> >- <xsl:text>ti,phr:(</xsl:text> >- <xsl:call-template name="quote_search_term"> >- <xsl:with-param name="term"><xsl:value-of select="marc:subfield[@code='t']"/></xsl:with-param> >- </xsl:call-template> >- <xsl:text>)</xsl:text> >- <xsl:if test="marc:subfield[@code='a']"> >- <xsl:text> AND au:(</xsl:text> >- <xsl:call-template name="quote_search_term"> >- <xsl:with-param name="term"> >- <xsl:value-of select="marc:subfield[@code='a']"/> >- </xsl:with-param> >+ <xsl:for-each select="marc:datafield[@tag=787]"> >+ <xsl:if test="@ind1 != 1"> >+ <span class="results_summary other_relationship_entry"> >+ <span class="other_relationship_entry"> >+ <xsl:choose> >+ <xsl:when test="@ind2=8 and marc:subfield[@code='i']"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">i</xsl:with-param> > </xsl:call-template> >- <xsl:text>)</xsl:text> >+ <xsl:text>: </xsl:text> >+ </xsl:when> >+ <xsl:otherwise> >+ <span class="label">Other related works: </span> >+ </xsl:otherwise> >+ </xsl:choose> >+ >+ <xsl:if test="@ind2 != 8 and marc:subfield[@code='i']"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">i</xsl:with-param> >+ </xsl:call-template> >+ <xsl:text>: </xsl:text> > </xsl:if> >- </xsl:variable> >- <a> >- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="str:encode-uri($relation_query, true())" /></xsl:attribute> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">a_t</xsl:with-param> >- </xsl:call-template> >- </a> >- </xsl:otherwise> >- </xsl:choose> >- <xsl:choose> >- <xsl:when test="position()=last()"></xsl:when> >- <xsl:otherwise><span class="separator"><xsl:text>; </xsl:text></span></xsl:otherwise> >- </xsl:choose> >- </span> >+ >+ <xsl:choose> >+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">a_t</xsl:with-param> >+ </xsl:call-template> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:variable name="relation_query"> >+ <xsl:text>ti,phr:(</xsl:text> >+ <xsl:call-template name="quote_search_term"> >+ <xsl:with-param name="term"><xsl:value-of select="marc:subfield[@code='t']"/></xsl:with-param> >+ </xsl:call-template> >+ <xsl:text>)</xsl:text> >+ <xsl:if test="marc:subfield[@code='a']"> >+ <xsl:text> AND au:(</xsl:text> >+ <xsl:call-template name="quote_search_term"> >+ <xsl:with-param name="term"> >+ <xsl:value-of select="marc:subfield[@code='a']"/> >+ </xsl:with-param> >+ </xsl:call-template> >+ <xsl:text>)</xsl:text> >+ </xsl:if> >+ </xsl:variable> >+ <a> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="str:encode-uri($relation_query, true())" /></xsl:attribute> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">a_t</xsl:with-param> >+ </xsl:call-template> >+ </a> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:choose> >+ <xsl:when test="position()=last()"></xsl:when> >+ <xsl:otherwise><span class="separator"><xsl:text>; </xsl:text></span></xsl:otherwise> >+ </xsl:choose> >+ </span> >+ </span> >+ </xsl:if> > </xsl:for-each> >- </span> > </xsl:if> > > <!-- 530 --> >-- >2.47.2
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 39428
: 179634