From 1b5a72cb5c349d698aec268ef339b9c79cd089ce Mon Sep 17 00:00:00 2001 From: phasefx Date: Mon, 18 Apr 2011 18:40:30 +0000 Subject: [PATCH] add Part Holds to Actions for this Record -> View Holds. Also add xul support for displaying issuance holds (needs testing) git-svn-id: svn://svn.open-ils.org/ILS/trunk@20174 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../perlmods/lib/OpenILS/Application/Circ/Holds.pm | 19 +++++++++++++++++++ Open-ILS/xul/staff_client/server/circ/util.js | 9 +++++++++ .../server/locale/en-US/common.properties | 1 + Open-ILS/xul/staff_client/server/patron/holds.js | 13 +++++++++++++ 4 files changed, 42 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm index 832338294..696cd0685 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm @@ -2741,6 +2741,25 @@ sub all_rec_holds { %$args }, {idlist=>1} ); + $resp->{part_holds} = $e->search_action_hold_request( + { + hold_type => OILS_HOLD_TYPE_MONOPART, + target => $title_id, + %$args + }, {idlist=>1} ); + + my $subs = $e->search_serial_subscription( + { record_entry => $title_id }, {idlist=>1}); + my $issuances = $e->search_serial_issuance( + { subscription => $subs }, {idlist=>1}); + + $resp->{issuance_holds} = $e->search_action_hold_request( + { + hold_type => OILS_HOLD_TYPE_ISSUANCE, + target => $issuances, + %$args + }, {idlist=>1} ); + my $vols = $e->search_asset_call_number( { record => $title_id, deleted => 'f' }, {idlist=>1}); diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js index 923539b57..a500a1b0e 100644 --- a/Open-ILS/xul/staff_client/server/circ/util.js +++ b/Open-ILS/xul/staff_client/server/circ/util.js @@ -1957,6 +1957,15 @@ circ.util.hold_columns = function(modify,params) { }, { 'persist' : 'hidden width ordinal', + 'id' : 'subscription_label', + 'label' : document.getElementById('commonStrings').getString('staff.ahr_subscription_label_label'), + 'flex' : 1, + 'primary' : false, + 'hidden' : true, + 'editable' : false, 'render' : function(my) { return my.subscription.label(); } + }, + { + 'persist' : 'hidden width ordinal', 'id' : 'ahr_id', 'label' : document.getElementById('commonStrings').getString('staff.ahr_id_label'), 'flex' : 1, diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/common.properties b/Open-ILS/xul/staff_client/server/locale/en-US/common.properties index 5b6408d8b..abe5c4de9 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/common.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/common.properties @@ -53,6 +53,7 @@ staff.ahr_fulfillment_time_label=Fulfillment Time staff.ahr_hold_type_label=Type staff.ahr_holdable_formats_label=Holdable Formats staff.ahr_holdable_part_label=Holdable Part +staff.ahr_subscription_label_label=Subscription Label staff.ahr_id_label=Hold ID staff.ahr_phone_notify_label=Phone Notify staff.ahr_pickup_lib_label=Pickup Library diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js index feef11496..40792e50d 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -21,6 +21,8 @@ patron.holds.prototype = { 'filter_lib' : null, + 'hold_subscription_map' : {}, + 'expired' : false, 'post_clear_shelf_hold_action_map' : {}, @@ -89,6 +91,11 @@ patron.holds.prototype = { row.my.acn = blob.volume; row.my.mvr = blob.mvr; row.my.part = blob.part; + row.my.issuance = blob.issuance; + if (blob.issuance) { + row.my.subscription = blob.issuance.subscription(); + obj.hold_subscription_map[ row.my.hold_id ] = row.my.subscription; + } row.my.patron_family_name = blob.patron_last; row.my.patron_first_given_name = blob.patron_first; row.my.patron_barcode = blob.patron_barcode; @@ -1145,6 +1152,10 @@ patron.holds.prototype = { case 'P' : opac_url = xulG.url_prefix( urls.opac_rdetail ) + '?r=' + htarget; break; + case 'I' : + opac_url = xulG.url_prefix( urls.opac_rdetail ) + + '?r=' + obj.hold_subscription_map[ obj.retrieve_ids[i].hold_id ].record_entry(); + break; case 'V' : var my_acn = obj.network.simple_request( 'FM_ACN_RETRIEVE.authoritative', [ htarget ]); opac_url = xulG.url_prefix( urls.opac_rdetail) + '?r=' + my_acn.record(); @@ -1521,6 +1532,8 @@ patron.holds.prototype = { holds = holds.concat( robj.copy_holds ); holds = holds.concat( robj.volume_holds ); holds = holds.concat( robj.title_holds ); + holds = holds.concat( robj.part_holds ); + holds = holds.concat( robj.issuance_holds ); holds = holds.concat( robj.metarecord_holds ); holds = holds.sort(); } -- 2.11.0