Bugzilla – Attachment 161768 Details for
Bug 29539
UNIMARC: authority number in $9 displays for thesaurus controlled fields instead of content of $a
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29539: UNIMARC: authority number in $9 displays for thesaurus controlled fields instead of content of $a
Bug-29539-UNIMARC-authority-number-in-9-displays-f.patch (text/plain), 3.24 KB, created by
David Nind
on 2024-02-05 20:29:03 UTC
(
hide
)
Description:
Bug 29539: UNIMARC: authority number in $9 displays for thesaurus controlled fields instead of content of $a
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-02-05 20:29:03 UTC
Size:
3.24 KB
patch
obsolete
>From 258d584dcf0aa3f2faab71fa6c607ffb86d227c8 Mon Sep 17 00:00:00 2001 >From: George Veranis <gveranis@dataly.gr> >Date: Thu, 14 Sep 2023 08:24:07 +0200 >Subject: [PATCH] Bug 29539: UNIMARC: authority number in $9 displays for > thesaurus controlled fields instead of content of $a > >When you try to dislpay a bibliographic record on unimarc that has subjects >linked with authorities then only the $9 is displayed as link instead of the >content of $a and it's subdivisions, if any. > >To test: >1) You will need to have a bibliographic record with at least one subject >autority connected in unimarc framework. >2) View that record on OPAC on detail display. The subject will display as >a number ( $9 ) and you cannot see the text/term of the subject ( $a ) >3) Apply patch >4) Repeat step 2 >5) The subject display in a normal way based on content $a - or more subfields > >Sponsored-by: National Library of Greece >Signed-off-by: David Nind <david@davidnind.com> >--- > .../bootstrap/en/xslt/UNIMARCslimUtils.xsl | 30 +++++++++++++++---- > 1 file changed, 24 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl >index dc02e6fc8e..1d567eab32 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl >@@ -460,19 +460,37 @@ > <xsl:template name="tag_subject"> > <xsl:param name="tag" /> > <xsl:param name="label" /> >- <xsl:param name="spanclass" /> >+ <xsl:param name="spanclass"/> > <xsl:if test="marc:datafield[@tag=$tag]"> > <span class="results_summary subjects {$spanclass}"> > <span class="label"> > <xsl:value-of select="$label"/> > <xsl:text>: </xsl:text> > </span> >- <span class="value"> >- <xsl:for-each select="marc:datafield[@tag=$tag]"> >- <xsl:call-template name="tag_onesubject"> >+ <xsl:for-each select="marc:datafield[@tag=$tag]"> >+ <a> >+ <xsl:choose> >+ <xsl:when test="marc:subfield[@code=9]"> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="str:encode-uri(marc:subfield[@code=9], true())"/></xsl:attribute> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su:<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/></xsl:attribute> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcdjptvxyz</xsl:with-param> >+ <xsl:with-param name="subdivCodes">jpxyz</xsl:with-param> >+ <xsl:with-param name="subdivDelimiter">-- </xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> > </xsl:call-template> >- </xsl:for-each> >- </span> >+ </a> >+ <xsl:if test="not (position()=last())"> >+ <xsl:text> | </xsl:text> >+ </xsl:if> >+ </xsl:for-each> > </span> > </xsl:if> > </xsl:template> >-- >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 29539
:
155604
|
161262
|
161622
|
161768
|
161769
|
163191