@@ -, +, @@
---
catalogue/detail.pl | 11 ++++++++++-
catalogue/moredetail.pl | 1 +
circ/returns.pl | 1 +
installer/data/mysql/kohastructure.sql | 2 ++
installer/data/mysql/updatedatabase.pl | 8 ++++++++
.../prog/en/modules/catalogue/detail.tt | 2 ++
.../prog/en/modules/catalogue/moredetail.tt | 1 +
.../prog/en/modules/circ/circulation.tt | 8 ++++----
.../intranet-tmpl/prog/en/modules/circ/returns.tt | 1 +
9 files changed, 30 insertions(+), 5 deletions(-)
--- a/catalogue/detail.pl
+++ a/catalogue/detail.pl
@@ -245,6 +245,13 @@ foreach my $item (@items) {
$item->{waitingdate} = format_date($wait_hashref->{waitingdate});
}
+ foreach my $f (qw( itemnotes nonpublicnote )) {
+ if ($item->{$f}) {
+ $item->{$f} =~ s|\n|
|g;
+ $itemfields{$f} = 1;
+ }
+ }
+
# item has a host number if its biblio number does not match the current bib
if ($item->{biblionumber} ne $biblionumber){
$item->{hostbiblionumber} = $item->{biblionumber};
@@ -260,6 +267,7 @@ foreach my $item (@items) {
if ($item->{'materials'} ne ''){
$materials_flag = 1;
}
+
push @itemloop, $item;
}
@@ -278,7 +286,8 @@ $template->param(
itemdata_uri => $itemfields{uri},
itemdata_copynumber => $itemfields{copynumber},
volinfo => $itemfields{enumchron},
- itemdata_itemnotes => $itemfields{itemnotes},
+ itemdata_itemnotes => $itemfields{itemnotes},
+ itemdata_nonpublicnote => $itemfields{nonpublicnote},
z3950_search_params => C4::Search::z3950_search_args($dat),
holdcount => $holdcount,
hostrecords => $hostrecords,
--- a/catalogue/moredetail.pl
+++ a/catalogue/moredetail.pl
@@ -183,6 +183,7 @@ foreach my $item (@items){
}
}
+ $item->{nonpublicnote} =~ s|\n|
|g if $item->{nonpublicnote};
}
$template->param(count => $data->{'count'},
subscriptionsnumber => $subscriptionsnumber,
--- a/circ/returns.pl
+++ a/circ/returns.pl
@@ -588,6 +588,7 @@ foreach ( sort { $a <=> $b } keys %returneditems ) {
$ri{itemcallnumber} = $biblio->{'itemcallnumber'};
$ri{itemtype} = $biblio->{'itemtype'};
$ri{itemnote} = $biblio->{'itemnotes'};
+ $ri{nonpublicnote} = $biblio->{'nonpublicnote'};
$ri{ccode} = $biblio->{'ccode'};
$ri{itemnumber} = $biblio->{'itemnumber'};
$ri{barcode} = $bar_code;
--- a/installer/data/mysql/kohastructure.sql
+++ a/installer/data/mysql/kohastructure.sql
@@ -765,6 +765,7 @@ CREATE TABLE `deleteditems` (
`reserves` smallint(6) default NULL, -- number of times this item has been placed on hold/reserved
`restricted` tinyint(1) default NULL, -- authorized value defining use restrictions for this item (MARC21 952$5)
`itemnotes` mediumtext, -- public notes on this item (MARC21 952$x)
+ `nonpublicnote` mediumtext default NULL,
`holdingbranch` varchar(10) default NULL, -- foreign key from the branches table for the library that is currently in possession item (MARC21 952$b)
`paidfor` mediumtext,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this item was last altered
@@ -1032,6 +1033,7 @@ CREATE TABLE `items` ( -- holdings/item information
`reserves` smallint(6) default NULL, -- number of times this item has been placed on hold/reserved
`restricted` tinyint(1) default NULL, -- authorized value defining use restrictions for this item (MARC21 952$5)
`itemnotes` mediumtext, -- public notes on this item (MARC21 952$x)
+ `nonpublicnote` mediumtext default NULL,
`holdingbranch` varchar(10) default NULL, -- foreign key from the branches table for the library that is currently in possession item (MARC21 952$b)
`paidfor` mediumtext,
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this item was last altered
--- a/installer/data/mysql/updatedatabase.pl
+++ a/installer/data/mysql/updatedatabase.pl
@@ -5336,6 +5336,14 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
SetVersion($DBversion);
}
+$DBversion = '3.09.00.XXX';
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("ALTER TABLE items ADD COLUMN nonpublicnote MEDIUMTEXT AFTER itemnotes");
+ $dbh->do("ALTER TABLE deleteditems ADD COLUMN nonpublicnote MEDIUMTEXT AFTER itemnotes");
+ $dbh->do("UPDATE marc_subfield_structure SET kohafield='items.nonpublicnote' WHERE (kohafield IS NULL OR kohafield = '') AND tagfield='952' AND tagsubfield='x'");
+ print "Upgrade to $DBversion done (Make nonpublicnote easier to use. If you have mapped your items to a MARC field other than 952 (system default), please check your Koha to MARC mapping for items.nonpublicnote)\n";
+}
+
=head1 FUNCTIONS
=head2 TableExists($table)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
@@ -281,6 +281,7 @@ function verify_images() {
[% IF ( itemdata_copynumber ) %]