add Part Holds to Actions for this Record -> View Holds. Also add xul support for...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 18 Apr 2011 18:40:30 +0000 (18:40 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 18 Apr 2011 18:40:30 +0000 (18:40 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@20174 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
Open-ILS/xul/staff_client/server/circ/util.js
Open-ILS/xul/staff_client/server/locale/en-US/common.properties
Open-ILS/xul/staff_client/server/patron/holds.js

index 8323382..696cd06 100644 (file)
@@ -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});
 
index 923539b..a500a1b 100644 (file)
@@ -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,
index 5b6408d..abe5c4d 100644 (file)
@@ -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
index feef114..40792e5 100644 (file)
@@ -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();
                 }