[Koha-patches] [PATCH] Support newlines in the notes field when displaying
Robin Sheat
robin at catalyst.net.nz
Thu Jul 1 06:49:38 CEST 2010
---
catalogue/detail.pl | 3 +++
opac/opac-detail.pl | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/catalogue/detail.pl b/catalogue/detail.pl
index 85819c0..c3c3c74 100755
--- a/catalogue/detail.pl
+++ b/catalogue/detail.pl
@@ -93,6 +93,9 @@ my $marcseriesarray = GetMarcSeries($record,$marcflavour);
my $marcurlsarray = GetMarcUrls ($record,$marcflavour);
my $subtitle = GetRecordValue('subtitle', $record, $fw);
+# Turn newlines into HTML-y newlines
+$_->{marcnote} =~ s{\n}{<br />}g foreach (@$marcnotesarray);
+
# Get Branches, Itemtypes and Locations
my $branches = GetBranches();
my $itemtypes = GetItemTypes();
diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl
index 629ebd2..7a0f2e2 100755
--- a/opac/opac-detail.pl
+++ b/opac/opac-detail.pl
@@ -205,6 +205,10 @@ my $marcseriesarray = GetMarcSeries ($record,$marcflavour);
my $marcurlsarray = GetMarcUrls ($record,$marcflavour);
my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber));
+# Support newlines in the notes content
+$_->{marcnote} =~ s{\n}{<br />}g foreach (@$marcnotesarray);
+
+
$template->param(
MARCNOTES => $marcnotesarray,
MARCSUBJCTS => $marcsubjctsarray,
--
1.7.0.4
More information about the Koha-patches
mailing list