From 7ec151d7bbcfd042dc1e5213d6a468ad3e41202f Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Thu, 19 Apr 2012 21:02:12 -0400 Subject: [PATCH] Work Log entry for holds placed within patron display Signed-off-by: Jason Etheridge Signed-off-by: Bill Erickson --- .../src/templates/opac/parts/place_hold_result.tt2 | 18 +++++++++++++++ .../chrome/locale/en-US/offline.properties | 2 ++ Open-ILS/xul/staff_client/server/patron/holds.js | 27 +++++++++++++++++++++- 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/templates/opac/parts/place_hold_result.tt2 b/Open-ILS/src/templates/opac/parts/place_hold_result.tt2 index 6504906b21..b933d6a8d5 100644 --- a/Open-ILS/src/templates/opac/parts/place_hold_result.tt2 +++ b/Open-ILS/src/templates/opac/parts/place_hold_result.tt2 @@ -54,6 +54,24 @@
[% l("Hold was successfully placed"); %]
+ [% IF ctx.is_staff %] + + [% END %] + [% ELSIF hdata.hold_failed; any_failures = 1 %]
[% l("Hold was not successfully placed"); %]
diff --git a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties index 23cd01a0c5..5a5b0c474b 100644 --- a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties +++ b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties @@ -120,6 +120,8 @@ menu.cmd_patron_register.related.tab=Editing Related Patron menu.cmd_patron_register.tab=Register Patron # 1 - Staff Username 2 - Patron Family 3 - Patron Barcode staff.circ.work_log_patron_registration.message=%1$s registered %3$s (%2$s) +# 1 - Staff Username 2 - Patron Family 3 - Patron Barcode 4 - Hold ID 5 - Hold Type +staff.circ.work_log_hold_placed.message=%1$s placed hold %4$s (%5$s) for %3$s (%2$s) menu.cmd_browse_holds.tab=Hold Browser menu.cmd_browse_holds_shelf.tab=Holds Shelf menu.cmd_browse_hold_pull_list.tab=On Shelf Pull List diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js index cad4e88dcb..a17e24720c 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -1482,11 +1482,12 @@ patron.holds.prototype = { }, 'opac_hold_placed' : function(hold) { try { + var hold_id = typeof hold == 'object' ? hold.id() : hold; obj.list.append( { 'row' : { 'my' : { - 'hold_id' : typeof hold == 'object' ? hold.id() : hold + 'hold_id' : hold_id } } } @@ -1494,6 +1495,30 @@ patron.holds.prototype = { if (window.xulG && typeof window.xulG.on_list_change == 'function') { window.xulG.on_list_change(); } + obj.list.wrap_in_full_retrieve( + function() { + try { + obj.error.work_log( + $('offlineStrings').getFormattedString( + 'staff.circ.work_log_hold_placed.message', + [ + ses('staff_usrname'), + obj.holds_map[ hold_id ].patron_last, + obj.holds_map[ hold_id ].patron_barcode, + hold_id, + obj.holds_map[ hold_id ].hold.hold_type() + ] + ), { + 'au_id' : obj.holds_map[ hold_id ].hold.usr(), + 'au_family_name' : obj.holds_map[ hold_id ].patron_family_name, + 'au_barcode' : obj.holds_map[ hold_id ].patron_barcode + } + ); + } catch(F) { + obj.error.standard_unexpected_error_alert('holds.js, opac_hold_placed(), work_log: ',F); + } + } + ); } catch(E) { obj.error.standard_unexpected_error_alert('holds.js, opac_hold_placed(): ',E); } -- 2.11.0