Bugzilla – Attachment 51045 Details for
Bug 16343
7XX XSLT subfields displaying out of order
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16343: 7XX XSLT subfields displaying out of order
Bug-16343-7XX-XSLT-subfields-displaying-out-of-ord.patch (text/plain), 7.50 KB, created by
Danielle Elder
on 2016-04-29 22:06:16 UTC
(
hide
)
Description:
Bug 16343: 7XX XSLT subfields displaying out of order
Filename:
MIME Type:
Creator:
Danielle Elder
Created:
2016-04-29 22:06:16 UTC
Size:
7.50 KB
patch
obsolete
>From 28d7fcf03c47d3d6da7bfdb953eddbcb57cf3993 Mon Sep 17 00:00:00 2001 >From: Hector Castro <hector.hecaxmmx@gmail.com> >Date: Thu, 28 Apr 2016 13:34:13 -0600 >Subject: [PATCH] Bug 16343: 7XX XSLT subfields displaying out of order > >Patch apply for OPAC: This patch respect previous css classes >.authordates and .relatorcode but also include .titleportion > >.authordates {display: none;} >.titleportion {display: none;} >.relatorcode {display: none;} > >To test: >- Stage the record attached >- Reindex zebra >- Leave empty the OPACUserCSS syspref >- Go to the new record in OPAC detail page >- Look the wrong display of dates >- Apply patch and refresh the page >- Test in OPACUserCSS the css stated before >- Play deleting or adding the clasess > >Signed-off-by: Dani Elder <danielle@bywatersolutions.com> >--- > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 76 +++++++++++++++----- > 1 file changed, 57 insertions(+), 19 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index d3473e0..b17530b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1295,7 +1295,7 @@ > <xsl:with-param name="codes"> > <xsl:choose> > <!-- #13383 include subfield e for field 111 --> >- <xsl:when test="@tag=111">abceqt</xsl:when> >+ <xsl:when test="@tag=111">abcdeqt</xsl:when> > <xsl:otherwise>abcjqt</xsl:otherwise> > </xsl:choose> > </xsl:with-param> >@@ -1309,36 +1309,74 @@ > <!-- #13382 excludes 700$i and ind2=2, displayed as Related Works --> > <!--#13382 Added all relevant subfields 4, e, and d are handled separately --> > <xsl:when test="@tag=700 or @tag=710 or @tag=711"> >- <xsl:variable name="str"> >+ <!-- Includes major changes for 7XX fields --> >+ <xsl:if test="@tag=710 or @tag=711"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes"> >+ <xsl:choose> >+ <xsl:when test="@tag=711">acdent</xsl:when> >+ <xsl:otherwise>abcdnt</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> >+ </xsl:if> >+ <!-- Display only name portion in 700 field --> >+ <xsl:if test="@tag=700"> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">abcq</xsl:with-param> >+ </xsl:call-template> >+ </xsl:with-param> >+ </xsl:call-template> >+ </xsl:if> >+ <!-- Display class "authordates" in 700 field --> >+ <xsl:if test="@tag=700 and marc:subfield[@code='d']"> >+ <span class="authordates"> >+ <xsl:text>, </xsl:text> >+ <xsl:call-template name="chopPunctuation"> >+ <xsl:with-param name="chopString"> > <xsl:call-template name="subfieldSelect"> >- <xsl:with-param name="codes">abcfghiklmnoprstux</xsl:with-param> >+ <xsl:with-param name="codes">d</xsl:with-param> > </xsl:call-template> >- </xsl:variable> >+ </xsl:with-param> >+ </xsl:call-template> >+ </span> >+ </xsl:if> >+ <!-- Display class "titleportion" in 700 field --> >+ <xsl:if test="@tag=700"> >+ <span class="titleportion"> >+ <xsl:text>. </xsl:text> > <xsl:call-template name="chopPunctuation"> > <xsl:with-param name="chopString"> >- <xsl:value-of select="$str"/> >- </xsl:with-param> >- <xsl:with-param name="punctuation"> >- <xsl:text>:,;/. </xsl:text> >+ <xsl:call-template name="subfieldSelect"> >+ <xsl:with-param name="codes">fghjklmnoprstux</xsl:with-param> >+ </xsl:call-template> > </xsl:with-param> > </xsl:call-template> >+ </span> >+ </xsl:if> >+ > </xsl:when> > </xsl:choose> > </span></span></span> >- <xsl:if test="marc:subfield[@code='d']"> >- <span class="authordates"> >- <xsl:text> </xsl:text> >- <xsl:value-of select="marc:subfield[@code='d']"/> >- </span> >- </xsl:if> >- <!-- #13383 include relator code j for field 111 --> >+ >+ <!-- #13383 include relator code j for field 111 also include 711$e 'Subordinate unit' --> > <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:when test="@tag=111 or @tag=711"> > <xsl:choose> >- <!-- Prefer j over 4 --> >+ <!-- Prefer j over 4 for 111 and 711 --> > <xsl:when test="marc:subfield[@code='j']"> > <xsl:for-each select="marc:subfield[@code='j']"> > <xsl:value-of select="."/> >@@ -1353,8 +1391,8 @@ > </xsl:otherwise> > </xsl:choose> > </xsl:when> >- <!-- Prefer e over 4 --> >- <xsl:when test="marc:subfield[@code='e']"> >+ <!-- Prefer e over 4 on 100 and 110--> >+ <xsl:when test="marc:subfield[@code='e'][not(@tag=111) or not(@tag=711)]"> > <xsl:for-each select="marc:subfield[@code='e']"> > <xsl:value-of select="."/> > <xsl:if test="position() != last()">, </xsl:if> >-- >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 16343
:
50667
|
50950
|
50952
|
51045
|
51118
|
51119
|
51190
|
51225
|
51226
|
51613