From a514c83fa05b07f6a1173783307c949ec47e05a0 Mon Sep 17 00:00:00 2001
From: Owen Leonard <oleonard@myacpl.org>
Date: Tue, 18 Jan 2022 17:57:22 +0000
Subject: [PATCH] Bug 29899: Show public note to patrons when placing a hold
This patch adds public note to the table of information shown about
items when placing a hold on a specific item in the OPAC.
To test, apply the patch and check Administration -> Circulation and
fine rules. You should have at least one patron category/item type
configured to allow OPAC item level holds.
- Modify an item to add information to the "Public note" field.
- Locate that record in the OPAC and place a hold on it.
- On the "Placing hold" page, click "Show more options" and "A specific
item."
- In the table of items you should see a "Notes" column showing the
information you added to the item.
---
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 4 ++++
opac/opac-reserve.pl | 1 +
2 files changed, 5 insertions(+)
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
index edc33ccf73..6b65b4c721 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
@@ -362,6 +362,7 @@
[% IF ( itemdata_enumchron ) %]
<th>Vol info</th>
[% END %]
+ <th>Notes</th>
<th>Information</th>
</tr>
@@ -404,6 +405,9 @@
[% IF ( itemdata_enumchron ) %]
<td class="vol_info">[% itemLoo.enumchron | html %]</td>
[% END %]
+ <td class="itemnotes">
+ [% itemLoo.itemnotes | html %]
+ </td>
<td class="information">
[% IF ( itemLoo.dateDue ) %]
<span class="checkedout">Due [% itemLoo.dateDue | html %]</span>
diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl
index 3b6ae8e2a3..8459f5825e 100755
--- a/opac/opac-reserve.pl
+++ b/opac/opac-reserve.pl
@@ -488,6 +488,7 @@ foreach my $biblioNum (@biblionumbers) {
$itemLoopIter->{enumchron} = $itemInfo->{enumchron};
$itemLoopIter->{ccode} = $itemInfo->{ccode};
$itemLoopIter->{copynumber} = $itemInfo->{copynumber};
+ $itemLoopIter->{itemnotes} = $itemInfo->{itemnotes};
if ($itemLevelTypes) {
$itemLoopIter->{translated_description} = $itemInfo->{translated_description};
$itemLoopIter->{itype} = $itemInfo->{itype};
--
2.20.1