Bugzilla – Attachment 149908 Details for
Bug 29185
Show MARC21 tag 765 - Original Language Entry
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29185: Display MARC tag 765 in OPAC and intranet XSLT
Bug-29185-Display-MARC-tag-765-in-OPAC-and-intrane.patch (text/plain), 6.83 KB, created by
David Nind
on 2023-04-19 17:39:41 UTC
(
hide
)
Description:
Bug 29185: Display MARC tag 765 in OPAC and intranet XSLT
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-04-19 17:39:41 UTC
Size:
6.83 KB
patch
obsolete
>From c1669c62898f75d1a0403c136b4a1a25cb6c00f2 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 13 Apr 2023 06:59:35 +0000 >Subject: [PATCH] Bug 29185: Display MARC tag 765 in OPAC and intranet XSLT > >Test plan: > >** For OPAC >[1] Pick a biblio record A as original entry, fill $001/$003. >[2] Pick another biblio record B as translation, add 765 with $t, > $a and $d. Put (orgcode)cnum from A into $w. >[3] Disable UseControlNumber. >[4] Goto OPAC detail page of B. Check link; should be title based. >[5] Enable UseControlNumber. >[6] Goto OPAC detail page of B. Check link; should incl orgcode and cnum. >[7] Edit B. Replace $w with cnum of A only. >[8] Goto OPAC detail page of B. Check link; should incl cnum only. > >** For staff client >[9] Goto staff detail page of B. Check link again. >[10] Edit B. Set 765 ind2 to 8, fill $i. >[11] Goto staff detail page of B. You should see different label. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: David Nind <david@davidnind.com> >--- > .../en/xslt/MARC21slim2intranetDetail.xsl | 45 +++++++++++++++++++ > .../en/xslt/MARC21slim2OPACDetail.xsl | 45 +++++++++++++++++++ > 2 files changed, 90 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index 736ee197a9..c7ac227327 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -1129,6 +1129,51 @@ > </span> > </xsl:if> > >+ <!-- 765 - Original language entry --> >+ <xsl:for-each select="marc:datafield[@tag=765]"> >+ <span class="results_summary original_language_entry"> >+ <xsl:choose> >+ <xsl:when test="@ind2!=8 or not(marc:subfield[@code='i'])"> >+ <!-- fallback to this label too if 765$i is empty --> >+ <span class="label">Translation of: </span> >+ </xsl:when> >+ <xsl:otherwise> >+ <span class="label"> >+ <xsl:value-of select="marc:subfield[@code='i']"/> >+ <xsl:text>: </xsl:text> >+ </span> >+ </xsl:otherwise> >+ </xsl:choose> >+ <span class="original_language_entry_data"> >+ <xsl:variable name="href"> >+ <!-- call template to get href of search URL --> >+ <xsl:call-template name="GetCnumSearchURL"> >+ <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/> >+ <xsl:with-param name="opac_url" select="0"/> >+ </xsl:call-template> >+ </xsl:variable> >+ <xsl:variable name="f765"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">tad</xsl:with-param> >+ <xsl:with-param name="delimeter">, </xsl:with-param> >+ </xsl:call-template> >+ </xsl:variable> >+ <xsl:choose> >+ <xsl:when test="$href"> >+ <a> >+ <xsl:attribute name="href"><xsl:value-of select="$href"/></xsl:attribute> >+ <xsl:value-of select="$f765"/> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="$f765"/> >+ </xsl:otherwise> >+ </xsl:choose> >+ </span> >+ </span> >+ </xsl:for-each> >+ <!-- End of 765 - Original language entry --> >+ > <!-- 770 - Supplement/Special issue entry --> > <xsl:if test="marc:datafield[@tag=770]"> > <span class="results_summary supplement"><span class="label">Supplement: </span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index bfd0f2565e..6493efda20 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1368,6 +1368,51 @@ > </span> > </xsl:if> > >+ <!-- 765 - Original language entry --> >+ <xsl:for-each select="marc:datafield[@tag=765]"> >+ <span class="results_summary original_language_entry"> >+ <xsl:choose> >+ <xsl:when test="@ind2!=8 or not(marc:subfield[@code='i'])"> >+ <!-- fallback to this label too if 765$i is empty --> >+ <span class="label">Translation of: </span> >+ </xsl:when> >+ <xsl:otherwise> >+ <span class="label"> >+ <xsl:value-of select="marc:subfield[@code='i']"/> >+ <xsl:text>: </xsl:text> >+ </span> >+ </xsl:otherwise> >+ </xsl:choose> >+ <span class="original_language_entry_data"> >+ <xsl:variable name="href"> >+ <!-- call template to get href of search URL --> >+ <xsl:call-template name="GetCnumSearchURL"> >+ <xsl:with-param name="UseControlNumber" select="$UseControlNumber"/> >+ <xsl:with-param name="opac_url" select="1"/> >+ </xsl:call-template> >+ </xsl:variable> >+ <xsl:variable name="f765"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">tad</xsl:with-param> >+ <xsl:with-param name="delimeter">, </xsl:with-param> >+ </xsl:call-template> >+ </xsl:variable> >+ <xsl:choose> >+ <xsl:when test="$href"> >+ <a> >+ <xsl:attribute name="href"><xsl:value-of select="$href"/></xsl:attribute> >+ <xsl:value-of select="$f765"/> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="$f765"/> >+ </xsl:otherwise> >+ </xsl:choose> >+ </span> >+ </span> >+ </xsl:for-each> >+ <!-- End of 765 - Original language entry --> >+ > <!-- 770 - Supplement/Special issue entry --> > <xsl:if test="marc:datafield[@tag=770]"> > <span class="results_summary supplement"> >-- >2.30.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 29185
:
149588
|
149589
|
149590
|
149906
|
149907
|
149908
|
150357
|
150358
|
150359
|
150365
|
151009