From a5a4d91d84add7de18b07dd2f5404666ce176754 Mon Sep 17 00:00:00 2001 From: Cesar Velez Date: Mon, 2 Oct 2017 17:57:39 -0400 Subject: [PATCH] LP#1714566 - enable hold notes set to print on slip to be shown Adds a bit of code and edits the realted templates in order to be able to see any hold notes set to print on the slip. Signed-off by: Cesar Velez Signed-off-by: Mike Rylander --- .../templates/staff/circ/share/t_hold_shelf_dialog.tt2 | 4 ++++ .../staff/share/print_templates/t_hold_shelf_slip.tt2 | 7 ++++++- Open-ILS/web/js/ui/default/staff/circ/services/circ.js | 9 +++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/templates/staff/circ/share/t_hold_shelf_dialog.tt2 b/Open-ILS/src/templates/staff/circ/share/t_hold_shelf_dialog.tt2 index 8fa2d4ba01..c7b3d4a5c9 100644 --- a/Open-ILS/src/templates/staff/circ/share/t_hold_shelf_dialog.tt2 +++ b/Open-ILS/src/templates/staff/circ/share/t_hold_shelf_dialog.tt2 @@ -53,6 +53,10 @@ [% l('Request Date:') %] {{hold.request_time | date:$root.egDateFormat}} +
+ [% l('Request Notes:') %] +
  • {{n.title}}: {{n.body}}
+
[% l('Slip Date:') %] {{today | date:$root.egDateFormat}} diff --git a/Open-ILS/src/templates/staff/share/print_templates/t_hold_shelf_slip.tt2 b/Open-ILS/src/templates/staff/share/print_templates/t_hold_shelf_slip.tt2 index 2d1a9f7091..315c155ac4 100644 --- a/Open-ILS/src/templates/staff/share/print_templates/t_hold_shelf_slip.tt2 +++ b/Open-ILS/src/templates/staff/share/print_templates/t_hold_shelf_slip.tt2 @@ -13,6 +13,7 @@ Template for printing hold request slips. Fields include: * hold.phone_notify * hold.sms_notify * hold.email_notify +* holdslip_notes (array of slip-printable notes) -->
@@ -44,7 +45,11 @@ Template for printing hold request slips. Fields include:
[% l('Notify by phone: [_1]', '{{hold.phone_notify}}') %]
[% l('Notify by text: [_1]', '{{hold.sms_notify}}') %]
[% l('Notify by email: [_1]', '{{patron.email}}') %]
- +
+
    Notes: +
  • {{note}}
  • +
+

[% l('Request Date: [_1]', diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js index 5910127244..06166dfb76 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js +++ b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js @@ -1504,6 +1504,15 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog, if (data.patron) { print_context.hold = egCore.idl.toHash(evt.payload.hold); + var notes = print_context.hold.notes; + if(notes.length > 0){ + print_context.holdslip_notes = []; + angular.forEach(notes, function(n){ + if (n.slip){ + print_context.holdslip_notes.push(n); + } + }); + } print_context.patron = egCore.idl.toHash(data.patron); } -- 2.43.2