From edf5c4a36e8a452a1539a70a5996028b4c63b88d Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Sat, 28 Jul 2012 22:58:31 -0400 Subject: [PATCH] Bug 6617: Improve MARC21 enhanced contents display Content-Type: text/plain; charset="UTF-8" The display of "Enhanced" 505 (contents) fields in the MARC21 XSLT is very poor, resulting in large, unreadable blocks of text, and -- for some series -- so much unnecessary duplication in the Notes tab that important information is entirely obscured. This patch reformats "enhanced" contents fields (MARC21 505 fields with $t and $r) so as to be more readable by breaking up entries on separate lines and making titles bold (to make them stand out more). This patch does not address duplication of information in the Notes tab, per discussion on the #koha IRC channel. To test: 1) View record with enhanced 505 field before applying patch. Observe it is very unfriendly. 2) Apply patch. 3) View same record, note that display is much improved. --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 25 ++++++++++++++ .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 34 +++++++++++--------- .../opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl | 20 +++++++++++ 3 files changed, 64 insertions(+), 15 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 1e259fb..97bc296 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -2620,3 +2620,28 @@ ul.ui-tabs-nav li { box-shadow: 1px 1px 3px 0 #666; } +.contents { + width: 75%; +} + +.contentblock { + display: inline-block; +} + +.contents .t:first-child { + white-space: normal; +} + +.contents .t:before { + content: "\A→ "; + white-space: pre; +} + +.contents .t { + font-weight: bold; + display: inline; +} + +.contents .r { + display: inline; +} diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl index b6db8b4..f612989 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl @@ -570,33 +570,37 @@ - - - - Incomplete contents: - - - Partial contents: - - - Contents: - - + + + + + Incomplete contents: + + + Partial contents: + + + Contents: + + + + - + tru - - au + + atru + diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl index c39ca39..806f8a8 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl @@ -40,6 +40,26 @@ + + + + + + + + + + + + + + + + + + + + -- 1.7.2.5