From 1ceea6447ba5d33ebef3e0352a04c50d0866b07d 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 --- Open-ILS/src/templates/staff/circ/share/t_hold_shelf_dialog.tt2 | 4 ++++ .../templates/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 7fe8a99392..90ae8250bb 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 @@ -50,6 +50,10 @@ {{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 c7ff7c8703..50aa191aa1 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 @@ -12,6 +12,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) -->
@@ -41,7 +42,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 b8f0d60a39..6d0383df86 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 @@ -1491,6 +1491,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.11.0