Bugzilla – Attachment 90760 Details for
Bug 22884
Remove ending . from XSLT detail templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22884: Remove field ending . from XSLT templates
Bug-22884-Remove-field-ending--from-XSLT-templates.patch (text/plain), 13.58 KB, created by
Hayley Pelham
on 2019-06-18 20:44:08 UTC
(
hide
)
Description:
Bug 22884: Remove field ending . from XSLT templates
Filename:
MIME Type:
Creator:
Hayley Pelham
Created:
2019-06-18 20:44:08 UTC
Size:
13.58 KB
patch
obsolete
>From 7b2400e3d4d7db333636f5c0215a5649f35c542d Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Sat, 11 May 2019 22:58:45 +0000 >Subject: [PATCH] Bug 22884: Remove field ending . from XSLT templates > >Currently Koha very inconsistently adds a . at the end when >outputting MARC fields on the detail views. > >This patch removes the few cases where we add in . >Keeping the end user in mind, I believe it's not needed and >the added consistency will be nice. ISBD should be added on >cataloguing or by templates, but we should not mix when possible. > >To test: >Catalog the following fields, if repeatable, add more than one: >- 020 >- 022 >- 111 >- 242 >- 245 >- 246 >- 250 >- 300 >- 440 >- 490 >- 700/710/711 with $i >- 700/710/711 ind.2 = 2 >Verify both on staff and OPAC detail pages that there is no >additional . at the end of the line. > >Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> >--- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 18 ++++++------ > .../intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl | 9 +----- > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 34 +++++++--------------- > 3 files changed, 20 insertions(+), 41 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index da88114133..f294eb1de6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -201,7 +201,7 @@ > </xsl:call-template> > </a> > <xsl:call-template name="part"/> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text>. </xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text> ; </xsl:text></xsl:otherwise></xsl:choose> > </xsl:for-each> > > <!-- 490 Series not traced, Ind1 = 0 --> >@@ -216,7 +216,7 @@ > </xsl:call-template> > </a> > <xsl:call-template name="part"/> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> > </xsl:for-each> > <!-- 490 Series traced, Ind1 = 1 --> > <xsl:if test="marc:datafield[@tag=490][@ind1=1]"> >@@ -411,7 +411,7 @@ > </xsl:call-template> > </xsl:with-param> > </xsl:call-template> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> > </xsl:for-each> > </span> > </xsl:if> >@@ -436,7 +436,7 @@ > </xsl:call-template> > </xsl:with-param> > </xsl:call-template> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> > </xsl:for-each> > </span> > </xsl:if> >@@ -546,7 +546,7 @@ > <xsl:value-of select="concat(' [',marc:subfield[@code='i'],']')"/> > </xsl:if> > <!-- #13386 added separator | --> >- <xsl:choose><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:choose><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> > </xsl:if> >@@ -561,7 +561,7 @@ > </xsl:call-template> > </xsl:with-param> > </xsl:call-template> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> > </xsl:for-each> > </span> > </xsl:if> >@@ -628,7 +628,7 @@ > </span> > </xsl:if> > <xsl:choose> >- <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise> >+ <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> >@@ -670,7 +670,7 @@ > </span> > </xsl:if> > <xsl:choose> >- <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise> >+ <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> >@@ -1569,7 +1569,7 @@ > </xsl:if> > </a> > <xsl:choose> >- <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise> >+ <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/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >index bb5a254044..f20afa0e8a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >@@ -338,14 +338,7 @@ > <xsl:for-each select="marc:datafield[@tag=$tag]/marc:subfield[@code=$code]"> > <span><xsl:attribute name="property"><xsl:value-of select="$class"/></xsl:attribute> > <xsl:value-of select="."/> >- <xsl:choose> >- <xsl:when test="position()=last()"> >- <xsl:text>.</xsl:text> >- </xsl:when> >- <xsl:otherwise> >- <xsl:text>; </xsl:text> >- </xsl:otherwise> >- </xsl:choose> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> > </span> > </xsl:for-each> > </span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 0fac4586a8..6be9bb4f24 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -241,7 +241,7 @@ > </xsl:call-template> > </a> > <xsl:call-template name="part"/> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> > </xsl:for-each> > <!-- 490 Series traced, Ind1 = 1 --> > <xsl:if test="marc:datafield[@tag=490][@ind1=1]"> >@@ -443,7 +443,7 @@ > </xsl:with-param> > </xsl:call-template> > </span> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> > </xsl:for-each> > </span> > </xsl:if> >@@ -470,7 +470,7 @@ > </xsl:with-param> > </xsl:call-template> > </span> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> > </xsl:for-each> > </span> > </xsl:if> >@@ -523,14 +523,7 @@ > <xsl:for-each select="marc:datafield[@tag=020]/marc:subfield[@code='a']"> > <span property="isbn"> > <xsl:value-of select="."/> >- <xsl:choose> >- <xsl:when test="position()=last()"> >- <xsl:text>.</xsl:text> >- </xsl:when> >- <xsl:otherwise> >- <xsl:text>; </xsl:text> >- </xsl:otherwise> >- </xsl:choose> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> > </span> > </xsl:for-each> > </span> >@@ -542,14 +535,7 @@ > <xsl:for-each select="marc:datafield[@tag=022]/marc:subfield[@code='a']"> > <span property="issn"> > <xsl:value-of select="."/> >- <xsl:choose> >- <xsl:when test="position()=last()"> >- <xsl:text>.</xsl:text> >- </xsl:when> >- <xsl:otherwise> >- <xsl:text>; </xsl:text> >- </xsl:otherwise> >- </xsl:choose> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> > </span> > </xsl:for-each> > </span> >@@ -619,7 +605,7 @@ > </xsl:if> > </span> > <!-- #13386 added separator | --> >- <xsl:choose><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:choose><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> > </xsl:if> >@@ -637,7 +623,7 @@ > </xsl:with-param> > </xsl:call-template> > </span> >- <xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> >+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose> > </xsl:for-each> > </span> > </xsl:if> >@@ -709,7 +695,7 @@ > </span> > </xsl:if> > <xsl:choose> >- <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise> >+ <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> >@@ -751,7 +737,7 @@ > </span> > </xsl:if> > <xsl:choose> >- <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise> >+ <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> >@@ -1723,7 +1709,7 @@ > </a> > </xsl:if> > <xsl:choose> >- <xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><span class="separator"><xsl:text> | </xsl:text></span></xsl:otherwise> >+ <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> >-- >2.11.0
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 22884
:
89624
|
90702
|
90760
|
90761
|
90927
|
90928
|
92143
|
92203
|
92204
|
92205
|
92206
|
93559
|
93560
|
93561