Bugzilla – Attachment 185256 Details for
Bug 40621
Show MARC21 767 translation entry
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40621: Show MARC21 767 translation entry in OPAC and staff detail XSLT
Bug-40621-Show-MARC21-767-translation-entry-in-OPA.patch (text/plain), 6.19 KB, created by
Aleisha Amohia
on 2025-08-08 03:45:35 UTC
(
hide
)
Description:
Bug 40621: Show MARC21 767 translation entry in OPAC and staff detail XSLT
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2025-08-08 03:45:35 UTC
Size:
6.19 KB
patch
obsolete
>From df03005410980d344f67ffd1ca7cb93c52ef65e1 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleisha@catalyst.net.nz> >Date: Fri, 8 Aug 2025 00:46:34 +0000 >Subject: [PATCH] Bug 40621: Show MARC21 767 translation entry in OPAC and > staff detail XSLT > >Test plan: > >1. Go to Koha Administration -> MARC bibliographic frameworks. Using the Default framework, view MARC subfields for the 767 tag and ensure that $a, $d, $t, and $w are visible in the staff interface, OPAC, and editor. >2. Go to system preferences and search for UseControlNumber. Ensure it is disabled. >3. In another tab, search for a record using the Default framework or create a new one. Go to edit the record. >4. Add a 767 with $t, $a, and $d. Put (orgcode)cnum value into $w. Put orgcode in 003 and cnum in 001. >5. View the staff interface detail page. Confirm you see "Translated as:" with your 767 values as a clickable link that is title-based only. >6. Enable UseControlNumber. >7. Repeat Step 5. Confirm you see "Translated as:" with your 767 values as a clickable link that is uses the orgcode and cnum. >8. Edit the record and set $w to the cnum only. >9. Repeat Step 5. Confirm you see "Translated as:" with your 767 values as a clickable link that uses the cnum only. >10. Click to open the record in the OPAC view and confirm the 767 shows as expected. > >Sponsored-by: Secretariat of the Pacific Community >--- > .../en/xslt/MARC21slim2intranetDetail.xsl | 34 +++++++++++++++++++ > .../en/xslt/MARC21slim2OPACDetail.xsl | 34 +++++++++++++++++++ > 2 files changed, 68 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..1cc90397049 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -1206,6 +1206,40 @@ > </xsl:for-each> > <!-- End of 765 - Original language entry --> > >+ <!-- 767 - Original language entry --> >+ <xsl:for-each select="marc:datafield[@tag=767]"> >+ <span class="results_summary translation_language_entry"> >+ <span class="label">Translated as: </span> >+ <span class="translation_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="f767"> >+ <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="$f767"/> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="$f767"/> >+ </xsl:otherwise> >+ </xsl:choose> >+ </span> >+ </span> >+ </xsl:for-each> >+ <!-- End of 767 - Translation 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 ea7c985eccc..7ae9e267657 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1414,6 +1414,40 @@ > </xsl:for-each> > <!-- End of 765 - Original language entry --> > >+ <!-- 767 - Translation language entry --> >+ <xsl:for-each select="marc:datafield[@tag=767]"> >+ <span class="results_summary translation_language_entry"> >+ <span class="label">Translated as: </span> >+ <span class="translation_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="f767"> >+ <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="$f767"/> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:value-of select="$f767"/> >+ </xsl:otherwise> >+ </xsl:choose> >+ </span> >+ </span> >+ </xsl:for-each> >+ <!-- End of 767 - Translation language entry --> >+ > <!-- 770 - Supplement/Special issue entry --> > <xsl:if test="marc:datafield[@tag=770]"> > <span class="results_summary supplement"> >-- >2.39.5
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 40621
: 185256