Bugzilla – Attachment 110029 Details for
Bug 19616
Add MARC21 505$g - Formatted Contents Note / Miscellaneous information
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19616: (follow-up) Breaking items according to punctuation
Bug-19616-follow-up-Breaking-items-according-to-pu.patch (text/plain), 8.09 KB, created by
Katrin Fischer
on 2020-09-13 23:38:06 UTC
(
hide
)
Description:
Bug 19616: (follow-up) Breaking items according to punctuation
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-09-13 23:38:06 UTC
Size:
8.09 KB
patch
obsolete
>From c38f929082babe84649b625b8cc88e40716bbe25 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Sun, 13 Sep 2020 17:16:22 +0000 >Subject: [PATCH] Bug 19616: (follow-up) Breaking items according to > punctuation >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Previously the code assumed that $t indicates a new line in the >listing. But this is not true. The standard tells us that -- or >.-- will indicate a new item. > >"In records formulated according to AACR 2, a space-hyphen-hyphen-space >( -- ) is recorded between each item in the contents note unless a >delimiter/subfield code follows in which case there is no ending space. >In pre-AACR 2 records, items are separated by a period-hyphen-hyphen (.--)." > >The previous logic did no longer work with $g added. From the LOC >examples: > >This would work: >505 2 0 $tBaptisms, 1816-1872 --$tChurch members, 1816-1831 --$tHistory of the Second Presbyterian Church of West Durham /$rby L. H. Fellows. >505 0 0 $tQuatrain II$g(16:35) --$tWater ways$g(1:57) --$tWaves$g(10:49). > >This wouldn't: >505 1 0 $gNr. 1.$tRegion Neusiedlersee --$gNr. 2.$tRegion Rosalia/Lithagebirge --$gNr. 3.$tRegion Mettelburgenland --$gNr. 4.$tRegion südliches Burgenland --$gNr. 5.$tRegion Südburgland > >With the patches applied, all examples should display nicely now. >--- > .../intranet-tmpl/prog/css/src/staff-global.scss | 27 +++++++++++----------- > .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 2 ++ > .../intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl | 8 ++++++- > koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss | 10 ++++---- > .../bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 2 ++ > .../bootstrap/en/xslt/MARC21slimUtils.xsl | 8 ++++++- > 6 files changed, 37 insertions(+), 20 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index 9a7470546e..35edd2ca67 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -2882,30 +2882,31 @@ li { > .contents { > width: 75%; > >- .r { >- display: inline; >+ .newline::after { >+ content: "\A â "; >+ white-space: pre; > } > > .t { >- display: inline; > font-weight: bold; >+ display: inline; >+ } > >- &:first-child { >- &::before { >- content: "â "; >- } >- } >- >- &::before { >- content: "\Aâ "; >- white-space: pre; >- } >+ .r { >+ display: inline; > } > } > >+ > .contentblock { >+ font-size: 95%; >+ line-height: 135%; > margin-left: 2em; > position: relative; >+ >+ :first-child::before { >+ content: "â "; >+ } > } > > #hierarchies { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index be898a7b98..efb7008dfa 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -1035,11 +1035,13 @@ > <xsl:choose> > <xsl:when test="@ind2=0"> > <xsl:call-template name="subfieldSelectSpan"> >+ <xsl:with-param name="newline">1</xsl:with-param> > <xsl:with-param name="codes">trug</xsl:with-param> > </xsl:call-template> > </xsl:when> > <xsl:otherwise> > <xsl:call-template name="subfieldSelectSpan"> >+ <xsl:with-param name="newline">1</xsl:with-param> > <xsl:with-param name="codes">atrug</xsl:with-param> > </xsl:call-template> > </xsl:otherwise> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >index 7fb14ad515..d43e6edb78 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl >@@ -60,10 +60,16 @@ > <xsl:param name="subdivDelimiter"/> > <xsl:param name="prefix"/> > <xsl:param name="suffix"/> >+ <xsl:param name="newline"/> > <xsl:for-each select="marc:subfield"> > <xsl:if test="contains($codes, @code)"> > <span> >- <xsl:attribute name="class"><xsl:value-of select="@code"/></xsl:attribute> >+ <xsl:attribute name="class"> >+ <xsl:value-of select="@code"/> >+ <xsl:if test="$newline = 1 and contains(text(), '--')"> >+ <xsl:text> newline</xsl:text> >+ </xsl:if> >+ </xsl:attribute> > <xsl:if test="contains($subdivCodes, @code)"> > <xsl:value-of select="$subdivDelimiter"/> > </xsl:if> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >index c9964bd049..b7c1376d7d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >@@ -2237,11 +2237,7 @@ nav { > .contents { > width: 75%; > >- .t:first-child::before { >- content: "â "; >- } >- >- .t::before { >+ .newline::after { > content: "\A â "; > white-space: pre; > } >@@ -2262,6 +2258,10 @@ nav { > line-height: 135%; > margin-left: 2em; > position: relative; >+ >+ :first-child::before { >+ content: "â "; >+ } > } > > .m880 { >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index fa63abf147..4092260dd4 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1118,11 +1118,13 @@ > <xsl:choose> > <xsl:when test="@ind2=0"> > <xsl:call-template name="subfieldSelectSpan"> >+ <xsl:with-param name="newline">1</xsl:with-param> > <xsl:with-param name="codes">trug</xsl:with-param> > </xsl:call-template> > </xsl:when> > <xsl:otherwise> > <xsl:call-template name="subfieldSelectSpan"> >+ <xsl:with-param name="newline">1</xsl:with-param> > <xsl:with-param name="codes">atrug</xsl:with-param> > </xsl:call-template> > </xsl:otherwise> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >index bc8b4f75f9..a8be280c4b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl >@@ -60,10 +60,16 @@ > <xsl:param name="subdivDelimiter"/> > <xsl:param name="prefix"/> > <xsl:param name="suffix"/> >+ <xsl:param name="newline"/> > <xsl:for-each select="marc:subfield"> > <xsl:if test="contains($codes, @code)"> > <span> >- <xsl:attribute name="class"><xsl:value-of select="@code"/></xsl:attribute> >+ <xsl:attribute name="class"> >+ <xsl:value-of select="@code"/> >+ <xsl:if test="$newline = 1 and contains(text(), '--')"> >+ <xsl:text> newline</xsl:text> >+ </xsl:if> >+ </xsl:attribute> > <xsl:if test="contains($subdivCodes, @code)"> > <xsl:value-of select="$subdivDelimiter"/> > </xsl:if> >-- >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 19616
:
82798
|
110027
|
110028
|
110029
|
110215
|
110216
|
110217
|
111353
|
111354
|
111355