From 35ee0897f4425a8a82aa24d2d2ccfc367f573ced 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). 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. --- C4/Biblio.pm | 1 + koha-tmpl/opac-tmpl/prog/en/css/opac.css | 34 ++++++++++++++++++++ .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 32 ++++++++++-------- .../opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl | 20 +++++++++++ 4 files changed, 73 insertions(+), 14 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index f8ba099..77f43c6 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1652,6 +1652,7 @@ sub GetMarcNotes { my $tag = ""; my $marcnote; foreach my $field ( $record->field($scope) ) { + next if ($marcflavour ne 'UNIMARC' && C4::Context->preference('OPACXSLTDetailsDisplay') && $field->tag() eq '505'); my $value = $field->as_string(); if ( $note ne "" ) { $marcnote = { marcnote => $note, }; diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index d4e7071..3d5dfc6 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -2769,3 +2769,37 @@ ul.ui-tabs-nav li { } */ + +.results_summary { + clear: both; +} + +.contents { + width: 75%; +} + +.contentblock { + clear: none; +} + +.contents .label { + float: left; +} + +.contents .r:after { + content: "\A"; + white-space: pre; +} + +.contents .t { + font-weight: bold; + display: inline; + background-image: url('/opac-tmpl/prog/images/caret.gif'); + background-repeat: no-repeat; + background-position: left -1ex; + padding-left: 20px; +} + +.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..367de72 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 + 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