Bugzilla – Attachment 49418 Details for
Bug 16130
Show the item non-public note on the detail view
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16130 - Show the item non-public note on the detail view
Bug-16130---Show-the-item-non-public-note-on-the-d.patch (text/plain), 4.17 KB, created by
Liz Rea
on 2016-03-22 23:52:34 UTC
(
hide
)
Description:
Bug 16130 - Show the item non-public note on the detail view
Filename:
MIME Type:
Creator:
Liz Rea
Created:
2016-03-22 23:52:34 UTC
Size:
4.17 KB
patch
obsolete
>From 4b4c416ac545711cbe3059711b4a122c297e8984 Mon Sep 17 00:00:00 2001 >From: Liz Rea <liz@catalyst.net.nz> >Date: Wed, 23 Mar 2016 12:22:02 +1300 >Subject: [PATCH] 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. >--- > catalogue/detail.pl | 17 +++++++++++++---- > .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 4 ++++ > 2 files changed, 17 insertions(+), 4 deletions(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 96e7752..bc491a9 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -42,7 +42,7 @@ use Koha::DateUtils; > use C4::HTML5Media; > use C4::CourseReserves qw(GetItemCourseReservesInfo); > use C4::Acquisition qw(GetOrdersByBiblionumber); >- >+use Data::Dumper; > use Koha::Virtualshelves; > > my $query = CGI->new(); >@@ -220,7 +220,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 +254,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 +327,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, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 5cf6697..0f5140a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -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 %] >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16130
:
49418
|
49421
|
49428
|
49474