From ccf81785652f1ffbdd727dc5aa2a2df3be0abd80 Mon Sep 17 00:00:00 2001 From: Katrin Fischer 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. Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- .../prog/css/src/staff-global.scss | 27 ++++++++++--------- .../en/xslt/MARC21slim2intranetDetail.xsl | 2 ++ .../prog/en/xslt/MARC21slimUtils.xsl | 8 +++++- .../opac-tmpl/bootstrap/css/src/opac.scss | 10 +++---- .../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 6ad62428ed3..8885b063653 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -2881,30 +2881,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 deecd43b238..c33ad9a6b70 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -1049,11 +1049,13 @@ + 1 trug + 1 atrug diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl index 7fb14ad515c..d43e6edb784 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 @@ + - + + + + newline + + diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss index 96b7de81499..615c9a05d87 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss @@ -2215,11 +2215,7 @@ nav { .contents { width: 75%; - .t:first-child::before { - content: "→ "; - } - - .t::before { + .newline::after { content: "\A → "; white-space: pre; } @@ -2240,6 +2236,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 3adcc641845..063d669fac9 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl @@ -1132,11 +1132,13 @@ + 1 trug + 1 atrug diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl index bc8b4f75f99..a8be280c4b1 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 @@ + - + + + + newline + + -- 2.28.0