Bug 16130 - Show the item non-public note on the detail view
To test: 1) Ensure your non-public note field is mapped to the items.itemnotes_nonpublic database column 2) Edit an item, add a test nonpublic note 3) Verify the nonpublic note is shown in the items table on the Detail view. sponsored-by: New Zealand Ministry of Education Library sponsored-by: New Zealand Central Agencies Library Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Removed a stray Data::Dumper Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
parent
04d25147b2
commit
6cb68b471d
|
|
@ -42,7 +42,6 @@ use Koha::DateUtils;
|
|||
use C4::HTML5Media;
|
||||
use C4::CourseReserves qw(GetItemCourseReservesInfo);
|
||||
use C4::Acquisition qw(GetOrdersByBiblionumber);
|
||||
|
||||
use Koha::Virtualshelves;
|
||||
|
||||
my $query = CGI->new();
|
||||
|
|
@ -220,7 +219,7 @@ foreach my $item (@items) {
|
|||
$item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) );
|
||||
my $copynumber = $item->{'copynumber'};
|
||||
$item->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumber) && defined($copynumbers) && exists( $copynumbers->{$copynumber} ) );
|
||||
foreach (qw(ccode enumchron copynumber stocknumber itemnotes uri)) {
|
||||
foreach (qw(ccode enumchron copynumber stocknumber itemnotes itemnotes_nonpublic uri)) {
|
||||
$itemfields{$_} = 1 if ( $item->{$_} );
|
||||
}
|
||||
|
||||
|
|
@ -254,7 +253,15 @@ foreach my $item (@items) {
|
|||
$item->{nocancel} = 1;
|
||||
}
|
||||
|
||||
# item has a host number if its biblio number does not match the current bib
|
||||
foreach my $f (qw( itemnotes )) {
|
||||
if ($item->{$f}) {
|
||||
$item->{$f} =~ s|\n|<br />|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};
|
||||
$item->{hosttitle} = GetBiblioData($item->{biblionumber})->{title};
|
||||
|
|
@ -319,7 +326,8 @@ $template->param(
|
|||
itemdata_copynumber => $itemfields{copynumber},
|
||||
itemdata_stocknumber => $itemfields{stocknumber},
|
||||
volinfo => $itemfields{enumchron},
|
||||
itemdata_itemnotes => $itemfields{itemnotes},
|
||||
itemdata_itemnotes => $itemfields{itemnotes},
|
||||
itemdata_nonpublicnotes => $itemfields{itemnotes_nonpublic},
|
||||
z3950_search_params => C4::Search::z3950_search_args($dat),
|
||||
hostrecords => $hostrecords,
|
||||
analytics_flag => $analytics_flag,
|
||||
|
|
|
|||
|
|
@ -593,6 +593,7 @@ function verify_images() {
|
|||
[% IF ( itemdata_stocknumber ) %]<th>Inventory number</th>[% END %]
|
||||
[% IF materials %]<th>Materials specified</th>[% END %]
|
||||
[% IF ( itemdata_itemnotes ) %]<th>Public notes</th>[% END %]
|
||||
[% IF ( itemdata_nonpublicnotes ) %]<th>Non-public notes</th>[% END %]
|
||||
[% IF ( SpineLabelShowPrintOnBibDetails ) %]<th>Spine label</th>[% END %]
|
||||
[% IF ( hostrecords ) %]<th>Host records</th>[% END %]
|
||||
[% IF ( analyze ) %]<th>Used in</th><th></th>[% END %]
|
||||
|
|
@ -764,6 +765,9 @@ function verify_images() {
|
|||
[% IF ( itemdata_itemnotes ) %]
|
||||
<td><div class="itemnotes">[% item.itemnotes %]</div></td>
|
||||
[% END %]
|
||||
[% IF itemdata_nonpublicnotes %]
|
||||
<td class="nonpublicnote">[% item.itemnotes_nonpublic %]</td>
|
||||
[% END %]
|
||||
[% IF ( SpineLabelShowPrintOnBibDetails ) %]
|
||||
<td><a href="/cgi-bin/koha/labels/spinelabel-print.pl?barcode=[% item.barcode %]" >Print label</a></td>
|
||||
[% END %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue