Bugzilla – Attachment 36783 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]
Bug 13381 - RDA: 245 field changes in XSLT
0002-Updates-for-13381.patch (text/plain), 10.32 KB, created by
Winona Salesky
on 2015-03-11 01:53:12 UTC
(
hide
)
Description:
Bug 13381 - RDA: 245 field changes in XSLT
Filename:
MIME Type:
Creator:
Winona Salesky
Created:
2015-03-11 01:53:12 UTC
Size:
10.32 KB
patch
obsolete
>From 2a7dd30ecae8d249ec04f7c6a09aa493e278d9be Mon Sep 17 00:00:00 2001 >From: Winona Salesky <wsalesky@gmail.com> >Date: Tue, 10 Mar 2015 21:13:40 -0400 >Subject: [PATCH 2/2] Updates for #13381 > >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 > >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 8 +--- > .../prog/en/xslt/MARC21slim2intranetResults.xsl | 52 +++++++++------------- > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 8 +--- > .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 52 +++++++++------------- > 4 files changed, 46 insertions(+), 74 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index 41137a9..ea8e3cb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -107,15 +107,9 @@ > <xsl:call-template name="subfieldSelect"> > <xsl:with-param name="codes">a</xsl:with-param> > </xsl:call-template> >- <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> > <!-- 13381 add additional subfields--> >- <xsl:for-each select="marc:subfield[contains('chknps', @code)]"> >+ <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 --> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >index 585b81a..7e4e753 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 641a0d8..148debc 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -128,15 +128,9 @@ > <xsl:call-template name="subfieldSelect"> > <xsl:with-param name="codes">a</xsl:with-param> > </xsl:call-template> >- <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> > <!-- 13381 add additional subfields--> >- <xsl:for-each select="marc:subfield[contains('chknps', @code)]"> >+ <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 --> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index 1609ef0..23ccae6 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.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 13381
:
34464
|
34996
|
34997
|
36783
|
37067
|
37068
|
37069
|
37070
|
37228
|
37982