Bugzilla – Attachment 37424 Details for
Bug 13383
RDA: 100/110/111 changes to XSLT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13383 - RDA: 100/110/111 changes to XSLT
Bug-13383---RDA-100110111-changes-to-XSLT.patch (text/plain), 32.96 KB, created by
Winona Salesky
on 2015-04-01 18:29:30 UTC
(
hide
)
Description:
Bug 13383 - RDA: 100/110/111 changes to XSLT
Filename:
MIME Type:
Creator:
Winona Salesky
Created:
2015-04-01 18:29:30 UTC
Size:
32.96 KB
patch
obsolete
>From af5b1e720179c16789b324b4b87c65fb0c84e15c Mon Sep 17 00:00:00 2001 >From: Winona Salesky <wsalesky@gmail.com> >Date: Wed, 1 Apr 2015 13:57:53 -0400 >Subject: [PATCH] Bug 13383 - RDA: 100/110/111 changes to XSLT > >Test plan: >1) Apply this patch >2) Ensure you are using the default XSLT setting for the staff and opac search results and record details >3) Find or create a record with MARC tags 100,110,111 >4) Perform an opac search that would show the record in the search results. >5) Click title to review record. >6) Note the fields updates 100,110,111 to show subfields a,b,c,d,q and t.Multiple fields are separated by span class=separator |. >7) Repeat steps 4 - 6 for the staff interface >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 103 +++++++++----- > .../prog/en/xslt/MARC21slim2intranetResults.xsl | 139 +++++++++++++----- > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 89 +++++++----- > .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 158 +++++++++++++-------- > 4 files changed, 315 insertions(+), 174 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index 349dbea..6a4ef62 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -103,25 +103,27 @@ > <xsl:if test="marc:datafield[@tag=245]"> > <h1> > <xsl:for-each select="marc:datafield[@tag=245]"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">a</xsl:with-param> >- </xsl:call-template> >- <xsl:if test="marc:subfield[@code='h']"> >- <xsl:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">h</xsl:with-param> >- </xsl:call-template> >- </xsl:if> >- <xsl:if test="marc:subfield[@code='b']"> >- <xsl:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">b</xsl:with-param> >- </xsl:call-template> >- </xsl:if> >- <xsl:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">fgknps</xsl:with-param> >- </xsl:call-template> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">a</xsl:with-param> >+ </xsl:call-template> >+ <xsl:text> </xsl:text> >+ <!--Bug 13381 add additional subfields--> >+ <xsl:for-each select="marc:subfield[contains('bchknps', @code)]"> >+ <xsl:choose> >+ <xsl:when test="@code='h'"> >+ <!-- Span class around subfield h so it can be suppressed via css --> >+ <span class="title_medium"><xsl:apply-templates/> </span> >+ </xsl:when> >+ <xsl:when test="@code='c'"> >+ <!-- Span class around subfield c so it can be suppressed via css --> >+ <span class="title_resp_stmt"><xsl:apply-templates/> </span> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:apply-templates/> >+ <xsl:text> </xsl:text> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:for-each> > </xsl:for-each> > </h1> > </xsl:if> >@@ -964,7 +966,8 @@ > <xsl:for-each select="$authorfield"> > <xsl:choose> > <xsl:when test="position()>1"/> >- <xsl:when test="@tag<700">Author(s): </xsl:when> >+ <!-- #13383 --> >+ <xsl:when test="@tag<700">By: </xsl:when> > <xsl:otherwise>Additional author(s): </xsl:otherwise> > </xsl:choose> > <a> >@@ -973,28 +976,50 @@ > <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute> > </xsl:when> > <xsl:otherwise> >- <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> >+ <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> > </xsl:otherwise> > </xsl:choose> >- <xsl:choose> >- <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCQ"/></xsl:when> >- <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when> >- <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when> >- </xsl:choose> >- <!-- add relator code too between brackets--> >- <xsl:if test="marc:subfield[@code='4' or @code='e']"> >- <span class="relatorcode"> >- <xsl:text> [</xsl:text> >- <xsl:choose> >- <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when> >- <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise> >- </xsl:choose> >- <xsl:text>]</xsl:text> >- </span> >- </xsl:if> >- </a> >+ <!-- #13383 --> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes"> >+ <xsl:choose> >+ <!-- #13383 include subfield e for field 111 --> >+ <xsl:when test="@tag=111">abcdeqt</xsl:when> >+ <xsl:otherwise>abcdqt</xsl:otherwise> >+ </xsl:choose> >+ </xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ <xsl:with-param name="punctuation"> >+ <xsl:text>:,;/ </xsl:text> >+ </xsl:with-param> >+ </xsl:call-template> >+ >+ <!-- #13383 include relator code j for field 111 --> >+ <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])"> >+ <span class="relatorcode"> >+ <xsl:text> [</xsl:text> >+ <xsl:choose> >+ <xsl:when test="@tag=111"> >+ <xsl:choose> >+ <!-- Prefer j over 4 --> >+ <xsl:when test="marc:subfield[@code='j'][. != '']"><xsl:value-of select="marc:subfield[@code='j']"/></xsl:when> >+ <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise> >+ </xsl:choose> >+ </xsl:when> >+ <!-- Prefer e over 4 --> >+ <xsl:when test="marc:subfield[@code='e']"><xsl:value-of select="marc:subfield[@code='e']"/></xsl:when> >+ <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise> >+ </xsl:choose> >+ <xsl:text>]</xsl:text> >+ </span> >+ </xsl:if> >+ </a> > <xsl:choose> >- <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise> >+ <!-- #13383 added separator with span --> >+ <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> > </h5> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >index 585b81a..7688f08 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >@@ -302,37 +302,29 @@ > <xsl:attribute name="class">title</xsl:attribute> > > <xsl:if test="marc:datafield[@tag=245]"> >- <xsl:for-each select="marc:datafield[@tag=245]"> >- <xsl:variable name="title"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">a</xsl:with-param> >- </xsl:call-template> >- <xsl:if test="marc:subfield[@code='h']"> >- <xsl:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">h</xsl:with-param> >- </xsl:call-template> >- </xsl:if> >- <xsl:if test="marc:subfield[@code='b']"> >- <xsl:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">b</xsl:with-param> >- </xsl:call-template> >- </xsl:if> >- <xsl:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">fgknps</xsl:with-param> >- </xsl:call-template> >- </xsl:variable> >- <xsl:variable name="titleChop"> >- <xsl:call-template name="chopPunctuation"> >- <xsl:with-param name="chopString"> >- <xsl:value-of select="$title"/> >- </xsl:with-param> >+ <xsl:for-each select="marc:datafield[@tag=245]"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">a</xsl:with-param> > </xsl:call-template> >- </xsl:variable> >- <xsl:value-of select="$titleChop"/> >- </xsl:for-each> >+ <xsl:text> </xsl:text> >+ <!--Bug 13381 add additional subfields--> >+ <xsl:for-each select="marc:subfield[contains('bchknps', @code)]"> >+ <xsl:choose> >+ <xsl:when test="@code='h'"> >+ <!-- Span class around subfield h so it can be suppressed via css --> >+ <span class="title_medium"><xsl:apply-templates/> </span> >+ </xsl:when> >+ <xsl:when test="@code='c'"> >+ <!-- Span class around subfield c so it can be suppressed via css --> >+ <span class="title_resp_stmt"><xsl:apply-templates/> </span> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:apply-templates/> >+ <xsl:text> </xsl:text> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:for-each> >+ </xsl:for-each> > </xsl:if> > </a> > >@@ -357,9 +349,32 @@ > <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> > </xsl:otherwise> > </xsl:choose> >- <xsl:call-template name="nameABCQ"/></a> >- <xsl:choose> >- <xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcdqt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ <xsl:with-param name="punctuation"> >+ <xsl:text>:,;/ </xsl:text> >+ </xsl:with-param> >+ </xsl:call-template> >+ </a> >+ <xsl:if test="marc:subfield[@code='4' or @code='e']"> >+ <span class="relatorcode"> >+ <xsl:text> [</xsl:text> >+ <xsl:choose> >+ <!-- Prefer e over 4 --> >+ <xsl:when test="marc:subfield[@code='e']"><xsl:value-of select="marc:subfield[@code='e']"/></xsl:when> >+ <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise> >+ </xsl:choose> >+ <xsl:text>]</xsl:text> >+ </span> >+ </xsl:if> >+ <xsl:choose> >+ <!-- #13383 added separator with span --> >+ <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> > > <xsl:for-each select="marc:datafield[(@tag=110 or @tag=710) and @ind1!='z']"> >@@ -372,8 +387,31 @@ > <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> > </xsl:otherwise> > </xsl:choose> >- <xsl:call-template name="nameABCDN"/></a> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcdqt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ <xsl:with-param name="punctuation"> >+ <xsl:text>:,;/ </xsl:text> >+ </xsl:with-param> >+ </xsl:call-template></a> >+ <xsl:if test="marc:subfield[@code='4' or @code='e']"> >+ <span class="relatorcode"> >+ <xsl:text> [</xsl:text> >+ <xsl:choose> >+ <!-- Prefer e over 4 --> >+ <xsl:when test="marc:subfield[@code='e']"><xsl:value-of select="marc:subfield[@code='e']"/></xsl:when> >+ <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise> >+ </xsl:choose> >+ <xsl:text>]</xsl:text> >+ </span> >+ </xsl:if> >+ <xsl:choose> >+ <!-- #13383 added separator with span --> >+ <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> > > <xsl:for-each select="marc:datafield[(@tag=111 or @tag=711) and @ind1!='z']"> >@@ -381,7 +419,8 @@ > <xsl:when test="marc:subfield[@code='n']"> > <xsl:text> </xsl:text> > <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">n</xsl:with-param> </xsl:call-template> >+ <xsl:with-param name="codes">n</xsl:with-param> >+ </xsl:call-template> > <xsl:text> </xsl:text> > </xsl:when> > </xsl:choose> >@@ -394,9 +433,31 @@ > <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute> > </xsl:otherwise> > </xsl:choose> >- <xsl:call-template name="nameACDEQ"/></a> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >- >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcdeqt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ <xsl:with-param name="punctuation"> >+ <xsl:text>:,;/ </xsl:text> >+ </xsl:with-param> >+ </xsl:call-template></a> >+ <xsl:if test="marc:subfield[@code='4' or @code='j'][. != '']"> >+ <span class="relatorcode"> >+ <xsl:text> [</xsl:text> >+ <xsl:choose> >+ <!-- Prefer j over 4 --> >+ <xsl:when test="marc:subfield[@code='j'][. != '']"><xsl:value-of select="marc:subfield[@code='j']"/></xsl:when> >+ <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise> >+ </xsl:choose> >+ <xsl:text>]</xsl:text> >+ </span> >+ </xsl:if> >+ <xsl:choose> >+ <!-- #13383 added separator with span --> >+ <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> > </p> > </xsl:when> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 11624c4..8104b25 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -120,29 +120,31 @@ > </xsl:call-template> > </h1> > </xsl:if> >- >+ <!--Bug 13381 --> > <xsl:if test="marc:datafield[@tag=245]"> > <h1 class="title" property="name"> > <xsl:for-each select="marc:datafield[@tag=245]"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">a</xsl:with-param> >- </xsl:call-template> >- <xsl:if test="marc:subfield[@code='h']"> >- <xsl:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">h</xsl:with-param> >- </xsl:call-template> >- </xsl:if> >- <xsl:if test="marc:subfield[@code='b']"> >- <xsl:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">b</xsl:with-param> >- </xsl:call-template> >- </xsl:if> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">a</xsl:with-param> >+ </xsl:call-template> > <xsl:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">fgknps</xsl:with-param> >- </xsl:call-template> >+ <!--Bug 13381 add additional subfields--> >+ <xsl:for-each select="marc:subfield[contains('bchknps', @code)]"> >+ <xsl:choose> >+ <xsl:when test="@code='h'"> >+ <!-- Span class around subfield h so it can be suppressed via css --> >+ <span class="title_medium"><xsl:apply-templates/> </span> >+ </xsl:when> >+ <xsl:when test="@code='c'"> >+ <!-- Span class around subfield c so it can be suppressed via css --> >+ <span class="title_resp_stmt"><xsl:apply-templates/> </span> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:apply-templates/> >+ <xsl:text> </xsl:text> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:for-each> > </xsl:for-each> > </h1> > </xsl:if> >@@ -1043,7 +1045,8 @@ > <xsl:param name="materialTypeLabel" /> > <xsl:param name="theme" /> > <xsl:for-each select="$authorfield"> >- <xsl:choose><xsl:when test="position()!=1"><xsl:text>; </xsl:text></xsl:when></xsl:choose> >+ <!-- #13383 added separator with span --> >+ <xsl:choose><xsl:when test="position()!=1"><span class="separator"><xsl:text> | </xsl:text></span></xsl:when></xsl:choose> > <xsl:choose> > <xsl:when test="not(@tag=111 or @tag=711)" /> > <xsl:when test="marc:subfield[@code='n']"> >@@ -1083,21 +1086,41 @@ > <xsl:otherwise><xsl:attribute name="typeof">Organization</xsl:attribute></xsl:otherwise> > </xsl:choose> > <span property="name"> >- <xsl:choose> >- <xsl:when test="@tag=100 or @tag=700"><xsl:call-template name="nameABCQ"/></xsl:when> >- <xsl:when test="@tag=110 or @tag=710"><xsl:call-template name="nameABCDN"/></xsl:when> >- <xsl:when test="@tag=111 or @tag=711"><xsl:call-template name="nameACDEQ"/></xsl:when> >- </xsl:choose> >+ <!-- #13383 --> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes"> >+ <xsl:choose> >+ <!-- #13383 include subfield e for field 111 --> >+ <xsl:when test="@tag=111">abcdeqt</xsl:when> >+ <xsl:otherwise>abcdqt</xsl:otherwise> >+ </xsl:choose> >+ </xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ <xsl:with-param name="punctuation"> >+ <xsl:text>:,;/ </xsl:text> >+ </xsl:with-param> >+ </xsl:call-template> > </span></span></span> >- <!-- add relator code too between brackets--> >- <xsl:if test="marc:subfield[@code='4' or @code='e']"> >+ <!-- #13383 include relator code j for field 111 --> >+ <xsl:if test="marc:subfield[@code='4' or @code='e'][not(parent::*[@tag=111])] or (self::*[@tag=111] and marc:subfield[@code='4' or @code='j'][. != ''])"> > <span class="relatorcode"> >- <xsl:text> [</xsl:text> >- <xsl:choose> >- <xsl:when test="marc:subfield[@code=4]"><xsl:value-of select="marc:subfield[@code=4]"/></xsl:when> >- <xsl:otherwise><xsl:value-of select="marc:subfield[@code='e']"/></xsl:otherwise> >- </xsl:choose> >- <xsl:text>]</xsl:text> >+ <xsl:text> [</xsl:text> >+ <xsl:choose> >+ <xsl:when test="@tag=111"> >+ <xsl:choose> >+ <!-- Prefer j over 4 --> >+ <xsl:when test="marc:subfield[@code='j'][. != '']"><xsl:value-of select="marc:subfield[@code='j']"/></xsl:when> >+ <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise> >+ </xsl:choose> >+ </xsl:when> >+ <!-- Prefer e over 4 --> >+ <xsl:when test="marc:subfield[@code='e']"><xsl:value-of select="marc:subfield[@code='e']"/></xsl:when> >+ <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise> >+ </xsl:choose> >+ <xsl:text>]</xsl:text> > </span> > </xsl:if> > </a> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index 1609ef0..104900e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -415,37 +415,29 @@ > <xsl:attribute name="class">title</xsl:attribute> > > <xsl:if test="marc:datafield[@tag=245]"> >- <xsl:for-each select="marc:datafield[@tag=245]"> >- <xsl:variable name="title"> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">a</xsl:with-param> >- </xsl:call-template> >- <xsl:if test="marc:subfield[@code='h']"> >- <xsl:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">h</xsl:with-param> >- </xsl:call-template> >- </xsl:if> >- <xsl:if test="marc:subfield[@code='b']"> >- <xsl:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">b</xsl:with-param> >- </xsl:call-template> >- </xsl:if> >- <xsl:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">fgknps</xsl:with-param> >- </xsl:call-template> >- </xsl:variable> >- <xsl:variable name="titleChop"> >- <xsl:call-template name="chopPunctuation"> >- <xsl:with-param name="chopString"> >- <xsl:value-of select="$title"/> >- </xsl:with-param> >+ <xsl:for-each select="marc:datafield[@tag=245]"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">a</xsl:with-param> > </xsl:call-template> >- </xsl:variable> >- <xsl:value-of select="$titleChop"/> >- </xsl:for-each> >+ <xsl:text> </xsl:text> >+ <!--Bug 13381 add additional subfields--> >+ <xsl:for-each select="marc:subfield[contains('bchknps', @code)]"> >+ <xsl:choose> >+ <xsl:when test="@code='h'"> >+ <!-- Span class around subfield h so it can be suppressed via css --> >+ <span class="title_medium"><xsl:apply-templates/> </span> >+ </xsl:when> >+ <xsl:when test="@code='c'"> >+ <!-- Span class around subfield c so it can be suppressed via css --> >+ <span class="title_resp_stmt"><xsl:apply-templates/> </span> >+ </xsl:when> >+ <xsl:otherwise> >+ <xsl:apply-templates/> >+ <xsl:text> </xsl:text> >+ </xsl:otherwise> >+ </xsl:choose> >+ </xsl:for-each> >+ </xsl:for-each> > </xsl:if> > </a> > <p> >@@ -463,54 +455,94 @@ > > by <span class="author"> > <xsl:for-each select="marc:datafield[(@tag=100 or @tag=700) and @ind1!='z']"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcdqt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ <xsl:with-param name="punctuation"> >+ <xsl:text>:,;/ </xsl:text> >+ </xsl:with-param> >+ </xsl:call-template> >+ <xsl:if test="marc:subfield[@code='4' or @code='e']"> >+ <span class="relatorcode"> >+ <xsl:text> [</xsl:text> >+ <xsl:choose> >+ <!-- Prefer e over 4 --> >+ <xsl:when test="marc:subfield[@code='e']"><xsl:value-of select="marc:subfield[@code='e']"/></xsl:when> >+ <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise> >+ </xsl:choose> >+ <xsl:text>]</xsl:text> >+ </span> >+ </xsl:if> > <xsl:choose> >- <xsl:when test="position()=last()"> >- <xsl:call-template name="nameABCQ"/>. >- </xsl:when> >- <xsl:otherwise> >- <xsl:call-template name="nameABCQ"/>; >- </xsl:otherwise> >+ <!-- #13383 added separator with span --> >+ <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> > > <xsl:for-each select="marc:datafield[(@tag=110 or @tag=710) and @ind1!='z']"> > <xsl:choose> > <xsl:when test="position()=1"> >- <xsl:text> -- </xsl:text> >+ <xsl:text> -- </xsl:text> > </xsl:when> > </xsl:choose> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcdqt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ <xsl:with-param name="punctuation"> >+ <xsl:text>:,;/ </xsl:text> >+ </xsl:with-param> >+ </xsl:call-template> >+ <xsl:if test="marc:subfield[@code='4' or @code='e']"> >+ <span class="relatorcode"> >+ <xsl:text> [</xsl:text> >+ <xsl:choose> >+ <!-- Prefer e over 4 --> >+ <xsl:when test="marc:subfield[@code='e']"><xsl:value-of select="marc:subfield[@code='e']"/></xsl:when> >+ <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise> >+ </xsl:choose> >+ <xsl:text>]</xsl:text> >+ </span> >+ </xsl:if> > <xsl:choose> >- <xsl:when test="position()=last()"> >- <xsl:call-template name="nameABCDN"/> >- </xsl:when> >- <xsl:otherwise> >- <xsl:call-template name="nameABCDN"/>; >- </xsl:otherwise> >+ <!-- #13383 added separator with span --> >+ <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> > > <xsl:for-each select="marc:datafield[(@tag=111 or @tag=711) and @ind1!='z']"> >+ <xsl:if test="position()=1"> >+ <xsl:text> -- </xsl:text> >+ </xsl:if> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcdeqt</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ <xsl:with-param name="punctuation"> >+ <xsl:text>:,;/ </xsl:text> >+ </xsl:with-param> >+ </xsl:call-template> >+ <xsl:if test="marc:subfield[@code='4' or @code='j'][. != '']"> >+ <span class="relatorcode"> >+ <xsl:text> [</xsl:text> >+ <xsl:choose> >+ <!-- Prefer j over 4 --> >+ <xsl:when test="marc:subfield[@code='j'][. != '']"><xsl:value-of select="marc:subfield[@code='j']"/></xsl:when> >+ <xsl:otherwise><xsl:value-of select="marc:subfield[@code='4']"/></xsl:otherwise> >+ </xsl:choose> >+ <xsl:text>]</xsl:text> >+ </span> >+ </xsl:if> > <xsl:choose> >- <xsl:when test="position()=1"> >- <xsl:text> -- </xsl:text> >- </xsl:when> >- </xsl:choose> >- <xsl:choose> >- <xsl:when test="marc:subfield[@code='n']"> >- <xsl:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">n</xsl:with-param> >- </xsl:call-template> >- <xsl:text> </xsl:text> >- </xsl:when> >- </xsl:choose> >- <xsl:choose> >- <xsl:when test="position()=last()"> >- <xsl:call-template name="nameACDEQ"/>. >- </xsl:when> >- <xsl:otherwise> >- <xsl:call-template name="nameACDEQ"/>; >- </xsl:otherwise> >+ <!-- #13383 added separator with span --> >+ <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> >-- >1.9.5 (Apple Git-50.3)
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 13383
:
36946
|
37214
|
37247
|
37281
|
37424
|
39878
|
39926
|
40940