Bugzilla – Attachment 37067 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]
Updates for #13381 This patch updates the display of the title and statement of responsibility in the XSLT display in the staff and OPAC.
Updates-for-13381-This-patch-updates-the-display-o.patch (text/plain), 10.19 KB, created by
Winona Salesky
on 2015-03-20 18:01:53 UTC
(
hide
)
Description:
Updates for #13381 This patch updates the display of the title and statement of responsibility in the XSLT display in the staff and OPAC.
Filename:
MIME Type:
Creator:
Winona Salesky
Created:
2015-03-20 18:01:53 UTC
Size:
10.19 KB
patch
obsolete
>From a0c21984c98b19e23cabe3172e05ca20606c2a0b Mon Sep 17 00:00:00 2001 >From: Winona Salesky <wsalesky@gmail.com> >Date: Tue, 10 Mar 2015 21:13:40 -0400 >Subject: [PATCH] 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 47bfa58..f0e4e2d 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..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 59db047..7235738 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..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.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