Bugzilla – Attachment 40212 Details for
Bug 14054
246 XSLT Improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14054 - 246 XSLT Improvements
Bug-14054---246-XSLT-Improvements.patch (text/plain), 7.56 KB, created by
Indranil Das Gupta
on 2015-06-17 05:57:16 UTC
(
hide
)
Description:
Bug 14054 - 246 XSLT Improvements
Filename:
MIME Type:
Creator:
Indranil Das Gupta
Created:
2015-06-17 05:57:16 UTC
Size:
7.56 KB
patch
obsolete
>From e7cf1f3ebd5c7df4fca1ae53367a503f29589fc3 Mon Sep 17 00:00:00 2001 >From: Winona Salesky <wsalesky@gmail.com> >Date: Tue, 9 Jun 2015 10:18:05 -0400 >Subject: [PATCH] Bug 14054 - 246 XSLT Improvements > >Adds other title type based on ind2 value. ind2 overridden by $i value. > >Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 42 +++++++++++++------ > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 48 ++++++++++++++-------- > 2 files changed, 61 insertions(+), 29 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index d077e35..378dafa 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -476,20 +476,36 @@ > </xsl:if> > > <xsl:if test="marc:datafield[@tag=246]"> >- <span class="results_summary other_title"><span class="label">Other title: </span> >- <xsl:for-each select="marc:datafield[@tag=246]"> >- <xsl:call-template name="chopPunctuation"> >- <xsl:with-param name="chopString"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">iabhfgnp</xsl:with-param> >+ <span class="results_summary other_title"><span class="label">Other title: </span> >+ <xsl:for-each select="marc:datafield[@tag=246]"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abhfgnp</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> > </xsl:call-template> >- </xsl:with-param> >- </xsl:call-template> >- <!-- #13386 added separator | --> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise></xsl:choose> >- </xsl:for-each> >- </span> >- </xsl:if> >+ <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])"> >+ <xsl:choose> >+ <xsl:when test="@ind2=0"> [Portion of title]</xsl:when> >+ <xsl:when test="@ind2=1"> [Parallel title]</xsl:when> >+ <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when> >+ <xsl:when test="@ind2=3"> [Other title]</xsl:when> >+ <xsl:when test="@ind2=4"> [Cover title]</xsl:when> >+ <xsl:when test="@ind2=5"> [Added title page title]</xsl:when> >+ <xsl:when test="@ind2=6"> [Caption title]</xsl:when> >+ <xsl:when test="@ind2=7"> [Running title]</xsl:when> >+ <xsl:when test="@ind2=8"> [Spine title]</xsl:when> >+ </xsl:choose> >+ </xsl:if> >+ <xsl:if test="marc:subfield[@code='i']"> >+ <xsl:value-of select="concat(' [',marc:subfield[@code='i'],']')"/> >+ </xsl:if> >+ <!-- #13386 added separator | --> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise></xsl:choose> >+ </xsl:for-each> >+ </span> >+ </xsl:if> > > <xsl:if test="marc:datafield[@tag=242]"> > <span class="results_summary translated_title"><span class="label">Title translated: </span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 8b7d559..e4a19d2 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -508,23 +508,39 @@ > </xsl:call-template> > </xsl:if> > >- <xsl:if test="marc:datafield[@tag=246]"> >- <span class="results_summary other_title"><span class="label">Other title: </span> >- <xsl:for-each select="marc:datafield[@tag=246]"> >- <span property="alternateName"> >- <xsl:call-template name="chopPunctuation"> >- <xsl:with-param name="chopString"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">iabhfgnp</xsl:with-param> >- </xsl:call-template> >- </xsl:with-param> >- </xsl:call-template> >+ <xsl:if test="marc:datafield[@tag=246]"> >+ <span class="results_summary other_title"><span class="label">Other title: </span> >+ <xsl:for-each select="marc:datafield[@tag=246]"> >+ <span property="alternateName"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abhfgnp</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ <xsl:if test="@ind1=1 and not(marc:subfield[@code='i'])"> >+ <xsl:choose> >+ <xsl:when test="@ind2=0"> [Portion of title]</xsl:when> >+ <xsl:when test="@ind2=1"> [Parallel title]</xsl:when> >+ <xsl:when test="@ind2=2"> [Distinctive title]</xsl:when> >+ <xsl:when test="@ind2=3"> [Other title]</xsl:when> >+ <xsl:when test="@ind2=4"> [Cover title]</xsl:when> >+ <xsl:when test="@ind2=5"> [Added title page title]</xsl:when> >+ <xsl:when test="@ind2=6"> [Caption title]</xsl:when> >+ <xsl:when test="@ind2=7"> [Running title]</xsl:when> >+ <xsl:when test="@ind2=8"> [Spine title]</xsl:when> >+ </xsl:choose> >+ </xsl:if> >+ <xsl:if test="marc:subfield[@code='i']"> >+ <xsl:value-of select="concat(' [',marc:subfield[@code='i'],']')"/> >+ </xsl:if> >+ </span> >+ <!-- #13386 added separator | --> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise></xsl:choose> >+ </xsl:for-each> > </span> >- <!-- #13386 added separator | --> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise></xsl:choose> >- </xsl:for-each> >- </span> >- </xsl:if> >+ </xsl:if> > > > <xsl:if test="marc:datafield[@tag=242]"> >-- >1.9.1
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 14054
:
39831
|
40020
|
40212
|
42802