Bugzilla – Attachment 161622 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: (follow-up) remove tag_onesubject template
Bug-29539-follow-up-remove-tagonesubject-template.patch (text/plain), 7.33 KB, created by
Fridolin Somers
on 2024-01-30 07:50:56 UTC
(
hide
)
Description:
Bug 29539: (follow-up) remove tag_onesubject template
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2024-01-30 07:50:56 UTC
Size:
7.33 KB
patch
obsolete
>From 9ee8c00febaf46dbb20be1cc997e192ac549fca4 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Tue, 30 Jan 2024 08:47:36 +0100 >Subject: [PATCH] Bug 29539: (follow-up) remove tag_onesubject template > >Also: >Restores the <span class="value"> >Replaces "not(position()=last())" with the more used "position() != last()" >Removes unecessary change in <xsl:param name="spanclass" /> >--- > .../bootstrap/en/xslt/UNIMARCslimUtils.xsl | 135 ++++-------------- > 1 file changed, 27 insertions(+), 108 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl >index 1d567eab32..af643df958 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/UNIMARCslimUtils.xsl >@@ -374,123 +374,42 @@ > </xsl:for-each> > </xsl:template> > >- <xsl:template name="tag_onesubject"> >- <xsl:choose> >- <xsl:when test="marc:subfield[@code=9]"> >- <xsl:for-each select="marc:subfield"> >- <xsl:if test="@code='9'"> >- <xsl:variable name="start" select="position()"/> >- <xsl:variable name="ends"> >- <xsl:for-each select="../marc:subfield[position() > $start]"> >- <xsl:if test="@code=9"> >- <xsl:variable name="end" select="position() + $start"/> >- <xsl:value-of select="$end"/> >- <xsl:text>,</xsl:text> >- </xsl:if> >- </xsl:for-each> >- </xsl:variable> >- <xsl:variable name="end"> >- <xsl:choose> >- <xsl:when test="string-length($ends) > 0"> >- <xsl:value-of select="substring-before($ends,',')"/> >- </xsl:when> >- <xsl:otherwise> >- <xsl:text>1000</xsl:text> >- </xsl:otherwise> >- </xsl:choose> >- </xsl:variable> >- <xsl:variable name="display"> >- <xsl:for-each select="../marc:subfield[position() > $start and position() < $end and @code!=2 and @code!=3]"> >- <xsl:value-of select="."/> >- <xsl:if test="not(position()=last())"> >- <xsl:text>, </xsl:text> >- </xsl:if> >- </xsl:for-each> >- </xsl:variable> >- <a> >- <xsl:attribute name="href"> >- <xsl:text>/cgi-bin/koha/opac-search.pl?q=an:</xsl:text> >- <xsl:value-of select="str:encode-uri(., true())"/> >- </xsl:attribute> >- <xsl:choose> >- <xsl:when test="string-length($display) > 0"> >- <xsl:call-template name="chopPunctuation"> >- <xsl:with-param name="chopString"> >- <xsl:value-of select="$display"/> >- </xsl:with-param> >- </xsl:call-template> >- </xsl:when> >- <xsl:otherwise> >- <xsl:value-of select="."/> >- </xsl:otherwise> >- </xsl:choose> >- </a> >- <xsl:variable name="ncommas" >- select="string-length($ends) - string-length(translate($ends, ',', ''))" /> >- <xsl:if test="$ncommas > 1"> >- <xsl:text> -- </xsl:text> >- </xsl:if> >- </xsl:if> >- </xsl:for-each> >- </xsl:when> >- <xsl:when test="marc:subfield[@code='a']"> >- <a> >- <xsl:attribute name="href"> >- <xsl:text>/cgi-bin/koha/opac-search.pl?q=su:</xsl:text> >- <xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/> >- </xsl:attribute> >- <xsl:call-template name="chopPunctuation"> >- <xsl:with-param name="chopString"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">abcdfijkmnptvxyz</xsl:with-param> >- <xsl:with-param name="subdivCodes">ijknpxyz</xsl:with-param> >- <xsl:with-param name="subdivDelimiter">-- </xsl:with-param> >- </xsl:call-template> >- </xsl:with-param> >- </xsl:call-template> >- </a> >- </xsl:when> >- <xsl:otherwise/> >- </xsl:choose> >- <xsl:if test="not(position()=last())"> >- <xsl:text> | </xsl:text> >- </xsl:if> >- </xsl:template> >- > <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> >- <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> >- </a> >- <xsl:if test="not (position()=last())"> >- <xsl:text> | </xsl:text> >- </xsl:if> >- </xsl:for-each> >+ <span class="value"> >+ <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> >+ </a> >+ <xsl:if test="position() != last()"> >+ <xsl:text> | </xsl:text> >+ </xsl:if> >+ </xsl:for-each> >+ </span> > </span> > </xsl:if> > </xsl:template> >-- >2.43.0
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