Bugzilla – Attachment 37228 Details for
Bug 13381
RDA: 245 field changes in XSLT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 13381 - RDA: 245 field changes in XSLT
SIGNED-OFF-Bug-13381---RDA-245-field-changes-in-XS.patch (text/plain), 13.74 KB, created by
Nick Clemens (kidclamp)
on 2015-03-25 18:19:53 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 13381 - RDA: 245 field changes in XSLT
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2015-03-25 18:19:53 UTC
Size:
13.74 KB
patch
obsolete
>From 7c61b296a4a1d6b95bbb233b193cd2ed2c46f311 Mon Sep 17 00:00:00 2001 >From: Winona Salesky <wsalesky@gmail.com> >Date: Mon, 9 Mar 2015 11:20:58 -0400 >Subject: [PATCH] [SIGNED OFF] Bug 13381 - RDA: 245 field changes in XSLT > >This patch updates the display of the title and statement of responsibility in the >XSLT display in the staff and OPAC. > >Display includes subfields a,b,c,h,k,n,p,s >Subfield c is wrapped in a span class=title_resp_stmt for easy suppression via css. >Subfield h is wrapped in a span class=title_medium for easy suppression via css. > >To test: > >* Search the opac >* Click the title >* Make sure the fields display properly >* Repeat for a few more titles >* Repeat in the Staff Client > >Signed-off-by: Nick Clemens <nick@quecheelibrary.org> >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 41 ++++++++------- > .../prog/en/xslt/MARC21slim2intranetResults.xsl | 52 +++++++++----------- > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 48 +++++++++--------- > .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 52 +++++++++----------- > 4 files changed, 92 insertions(+), 101 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..f0e4e2d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -100,30 +100,33 @@ > </h1> > </xsl:if> > >+ <!--Bug 13381 --> > <xsl:if test="marc:datafield[@tag=245]"> >- <h1> >- <xsl:for-each select="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:text> </xsl:text> >- <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">fgknps</xsl:with-param> >- </xsl:call-template> >- </xsl:for-each> >- </h1> >+ <!-- 13381 add additional subfields--> >+ <xsl:for-each select="marc:subfield[contains('bchknps', @code)]"> >+ <xsl:choose> >+ <xsl:when test="@code='h'"> >+ <!-- 13381 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'"> >+ <!-- 13381 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> > > <!-- Author Statement: Alternate Graphic Representation (MARC 880) --> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >index 585b81a..3fa4ef5 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> >+ <!-- 13381 add additional subfields--> >+ <xsl:for-each select="marc:subfield[contains('bchknps', @code)]"> >+ <xsl:choose> >+ <xsl:when test="@code='h'"> >+ <!-- 13381 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'"> >+ <!-- 13381 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> > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 11624c4..7235738 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -121,31 +121,35 @@ > </h1> > </xsl:if> > >- <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> >+ <!--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">h</xsl:with-param> >+ <xsl:with-param name="codes">a</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:for-each> >- </h1> >- </xsl:if> >+ <!-- 13381 add additional subfields--> >+ <xsl:for-each select="marc:subfield[contains('bchknps', @code)]"> >+ <xsl:choose> >+ <xsl:when test="@code='h'"> >+ <!-- 13381 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'"> >+ <!-- 13381 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> >+ > > <!-- Author Statement: Alternate Graphic Representation (MARC 880) --> > <xsl:if test="$display880"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index 1609ef0..5f67195 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> >+ <!-- 13381 add additional subfields--> >+ <xsl:for-each select="marc:subfield[contains('bchknps', @code)]"> >+ <xsl:choose> >+ <xsl:when test="@code='h'"> >+ <!-- 13381 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'"> >+ <!-- 13381 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> >-- >1.7.10.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 13381
:
34464
|
34996
|
34997
|
36783
|
37067
|
37068
|
37069
|
37070
|
37228
|
37982