[open-ils-commits] r20174 - in trunk/Open-ILS: src/perlmods/lib/OpenILS/Application/Circ xul/staff_client/server/circ xul/staff_client/server/locale/en-US xul/staff_client/server/patron (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Apr 18 14:40:35 EDT 2011


Author: phasefx
Date: 2011-04-18 14:40:30 -0400 (Mon, 18 Apr 2011)
New Revision: 20174

Modified:
   trunk/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
   trunk/Open-ILS/xul/staff_client/server/circ/util.js
   trunk/Open-ILS/xul/staff_client/server/locale/en-US/common.properties
   trunk/Open-ILS/xul/staff_client/server/patron/holds.js
Log:
add Part Holds to Actions for this Record -> View Holds.  Also add xul support for displaying issuance holds (needs testing)


Modified: trunk/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm	2011-04-18 18:07:08 UTC (rev 20173)
+++ trunk/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm	2011-04-18 18:40:30 UTC (rev 20174)
@@ -2741,6 +2741,25 @@
 			%$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});
 

Modified: trunk/Open-ILS/xul/staff_client/server/circ/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/util.js	2011-04-18 18:07:08 UTC (rev 20173)
+++ trunk/Open-ILS/xul/staff_client/server/circ/util.js	2011-04-18 18:40:30 UTC (rev 20174)
@@ -1957,6 +1957,15 @@
         },
         {
             '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,

Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/common.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/common.properties	2011-04-18 18:07:08 UTC (rev 20173)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/common.properties	2011-04-18 18:40:30 UTC (rev 20174)
@@ -53,6 +53,7 @@
 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

Modified: trunk/Open-ILS/xul/staff_client/server/patron/holds.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/holds.js	2011-04-18 18:07:08 UTC (rev 20173)
+++ trunk/Open-ILS/xul/staff_client/server/patron/holds.js	2011-04-18 18:40:30 UTC (rev 20174)
@@ -21,6 +21,8 @@
 
     'filter_lib' : null,
 
+    'hold_subscription_map' : {},
+
     'expired' : false,
     'post_clear_shelf_hold_action_map' : {},
 
@@ -89,6 +91,11 @@
                                     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 @@
                                         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 @@
                     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();
                 }



More information about the open-ils-commits mailing list