Bugzilla – Attachment 78742 Details for
Bug 20910
773$g not displayed if $0 is present
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20910: Tidy 773 handling XSLT code
Bug-20910-Tidy-773-handling-XSLT-code.patch (text/plain), 12.08 KB, created by
Jesse Maseto
on 2018-09-14 21:42:33 UTC
(
hide
)
Description:
Bug 20910: Tidy 773 handling XSLT code
Filename:
MIME Type:
Creator:
Jesse Maseto
Created:
2018-09-14 21:42:33 UTC
Size:
12.08 KB
patch
obsolete
>From e8f2475609e4c51a1590602f49850f3b9556379d Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 11 Jun 2018 12:05:27 -0300 >Subject: [PATCH] Bug 20910: Tidy 773 handling XSLT code > >There's happiness too. You know. > >Sponsored-by: Escuela de Orientacion Lacaniana > >Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 95 +++++++++++----------- > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 94 +++++++++++---------- > 2 files changed, 98 insertions(+), 91 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index c5f8a6c..e101c01 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -933,54 +933,57 @@ > > <!-- 773 --> > <xsl:if test="marc:datafield[@tag=773]"> >- <xsl:for-each select="marc:datafield[@tag=773]"> >- <xsl:if test="@ind1 !=1"> >- <span class="results_summary in"><span class="label"> >- <xsl:choose> >- <xsl:when test="@ind2=' '"> >- In: >- </xsl:when> >- <xsl:when test="@ind2=8"> >- <xsl:if test="marc:subfield[@code='i']"> >- <xsl:value-of select="marc:subfield[@code='i']"/> >- </xsl:if> >- </xsl:when> >- </xsl:choose> >- </span> >- <xsl:variable name="f773"> >- <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">a_t</xsl:with-param> >- </xsl:call-template></xsl:with-param></xsl:call-template> >- </xsl:variable> >- <xsl:choose> >- <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >- <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/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:value-of select="translate($f773, '()', '')"/> >- </a> >- </xsl:when> >- <xsl:when test="marc:subfield[@code='0']"> >- <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute> >- <xsl:value-of select="$f773"/> >- </a> >- </xsl:when> >- <xsl:otherwise> >- <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute> >- <xsl:value-of select="$f773"/> >- </a> >- </xsl:otherwise> >- </xsl:choose> >- <xsl:if test="marc:subfield[@code='g']"> >- <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/> >- </xsl:if> >- >- </span> >+ <xsl:for-each select="marc:datafield[@tag=773]"> >+ <xsl:if test="@ind1 !=1"> >+ <span class="results_summary in"><span class="label"> >+ <xsl:choose> >+ <xsl:when test="@ind2=' '"> >+ In: >+ </xsl:when> >+ <xsl:when test="@ind2=8"> >+ <xsl:if test="marc:subfield[@code='i']"> >+ <xsl:value-of select="marc:subfield[@code='i']"/> >+ </xsl:if> >+ </xsl:when> >+ </xsl:choose> >+ </span> >+ <xsl:variable name="f773"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">a_t</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </xsl:variable> >+ <xsl:choose> >+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']"> >+ <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/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:value-of select="translate($f773, '()', '')"/> >+ </a> >+ </xsl:when> >+ <xsl:when test="marc:subfield[@code='0']"> >+ <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute> >+ <xsl:value-of select="$f773"/> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> >+ <a><xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute> >+ <xsl:value-of select="$f773"/> >+ </a> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:if test="marc:subfield[@code='g']"> >+ <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/> >+ </xsl:if> >+ </span> > >- <xsl:if test="marc:subfield[@code='n']"> >- <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span> >- </xsl:if> >+ <xsl:if test="marc:subfield[@code='n']"> >+ <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span> >+ </xsl:if> > >- </xsl:if> >- </xsl:for-each> >+ </xsl:if> >+ </xsl:for-each> > </xsl:if> > > <xsl:if test="marc:datafield[@tag=502]"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 380a19e..e3b5692 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1038,53 +1038,57 @@ > > <!-- 773 --> > <xsl:if test="marc:datafield[@tag=773]"> >- <xsl:for-each select="marc:datafield[@tag=773]"> >- <xsl:if test="@ind1 !=1"> >- <span class="results_summary in"><span class="label"> >- <xsl:choose> >- <xsl:when test="@ind2=' '"> >- In: >- </xsl:when> >- <xsl:when test="@ind2=8"> >- <xsl:if test="marc:subfield[@code='i']"> >- <xsl:value-of select="marc:subfield[@code='i']"/> >- </xsl:if> >- </xsl:when> >- </xsl:choose> >- </span> >- <xsl:variable name="f773"> >- <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">a_t</xsl:with-param> >- </xsl:call-template></xsl:with-param></xsl:call-template> >- </xsl:variable> >- <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:value-of select="translate($f773, '()', '')"/> >- </a> >- </xsl:when> >- <xsl:when test="marc:subfield[@code='0']"> >- <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute> >- <xsl:value-of select="$f773"/> >- </a> >- </xsl:when> >- <xsl:otherwise> >- <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute> >- <xsl:value-of select="$f773"/> >- </a> >- </xsl:otherwise> >- </xsl:choose> >- <xsl:if test="marc:subfield[@code='g']"> >- <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/> >- </xsl:if> >- </span> >+ <xsl:for-each select="marc:datafield[@tag=773]"> >+ <xsl:if test="@ind1 !=1"> >+ <span class="results_summary in"><span class="label"> >+ <xsl:choose> >+ <xsl:when test="@ind2=' '"> >+ In: >+ </xsl:when> >+ <xsl:when test="@ind2=8"> >+ <xsl:if test="marc:subfield[@code='i']"> >+ <xsl:value-of select="marc:subfield[@code='i']"/> >+ </xsl:if> >+ </xsl:when> >+ </xsl:choose> >+ </span> >+ <xsl:variable name="f773"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">a_t</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </xsl:variable> >+ <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:value-of select="translate($f773, '()', '')"/> >+ </a> >+ </xsl:when> >+ <xsl:when test="marc:subfield[@code='0']"> >+ <a><xsl:attribute name="href">/cgi-bin/koha/opac-detail.pl?biblionumber=<xsl:value-of select="marc:subfield[@code='0']"/></xsl:attribute> >+ <xsl:value-of select="$f773"/> >+ </a> >+ </xsl:when> >+ <xsl:otherwise> >+ <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=ti,phr:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute> >+ <xsl:value-of select="$f773"/> >+ </a> >+ </xsl:otherwise> >+ </xsl:choose> >+ <xsl:if test="marc:subfield[@code='g']"> >+ <xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/> >+ </xsl:if> >+ </span> > >- <xsl:if test="marc:subfield[@code='n']"> >- <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span> >- </xsl:if> >+ <xsl:if test="marc:subfield[@code='n']"> >+ <span class="results_summary"><xsl:value-of select="marc:subfield[@code='n']"/></span> >+ </xsl:if> > >- </xsl:if> >- </xsl:for-each> >+ </xsl:if> >+ </xsl:for-each> > </xsl:if> > > <xsl:for-each select="marc:datafield[@tag=511]"> >-- >2.1.4
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 20910
:
75960
|
75961
|
78741
|
78742
|
80123
|
80124