Add "Show Holds on Bib" menu items
authorThomas Berezansky <tsbere@mvlc.org>
Mon, 8 Oct 2012 03:14:27 +0000 (23:14 -0400)
committerBen Shum <bshum@biblio.org>
Thu, 14 Mar 2013 19:48:14 +0000 (15:48 -0400)
Add a "Show holds on bibs" option from item checkin, item status, and patron
hold interfaces. This makes it quicker to flip to viewing who else has holds
on an item instead of having to click an option to see the bib, then clicking
in the menus for view holds. One less click.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
12 files changed:
Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/server/circ/checkin.js
Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul
Open-ILS/xul/staff_client/server/circ/copy_status.js
Open-ILS/xul/staff_client/server/circ/copy_status.xul
Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul
Open-ILS/xul/staff_client/server/circ/renew.js
Open-ILS/xul/staff_client/server/circ/renew.xul
Open-ILS/xul/staff_client/server/circ/renew_overlay.xul
Open-ILS/xul/staff_client/server/patron/holds.js
Open-ILS/xul/staff_client/server/patron/holds_overlay.xul
docs/RELEASE_NOTES_NEXT/show_holds_on_bib.txt [new file with mode: 0644]

index 47cf83d..c519abf 100644 (file)
 <!ENTITY staff.circ.checkin_overlay.sel_bucket.accesskey "A">
 <!ENTITY staff.circ.checkin_overlay.sel_opac.label "Show in Catalog">
 <!ENTITY staff.circ.checkin_overlay.sel_opac.accesskey "S">
+<!ENTITY staff.circ.checkin_overlay.sel_opac_holds.label "Show Holds on Bib">
+<!ENTITY staff.circ.checkin_overlay.sel_opac_holds.accesskey "H">
 <!ENTITY staff.circ.checkin_overlay.sel_copy_details.label "Show Item Details">
 <!ENTITY staff.circ.checkin_overlay.sel_copy_details.accesskey "I">
 <!ENTITY staff.circ.checkin_overlay.sel_patron.label "Show Last Few Circulations">
 <!ENTITY staff.circ.renew_overlay.sel_bucket.accesskey "A">
 <!ENTITY staff.circ.renew_overlay.sel_opac.label "Show in Catalog">
 <!ENTITY staff.circ.renew_overlay.sel_opac.accesskey "S">
+<!ENTITY staff.circ.renew_overlay.sel_opac_holds.label "Show Holds on Bib">
+<!ENTITY staff.circ.renew_overlay.sel_opac_holds.accesskey "H">
 <!ENTITY staff.circ.renew_overlay.sel_copy_details.label "Show Item Details">
 <!ENTITY staff.circ.renew_overlay.sel_copy_details.accesskey "I">
 <!ENTITY staff.circ.renew_overlay.sel_patron.label "Show Last Few Circulations">
 <!ENTITY staff.circ.copy_status_overlay.sel_record_bucket.accesskey "">
 <!ENTITY staff.circ.copy_status_overlay.sel_opac.label "Show in Catalog">
 <!ENTITY staff.circ.copy_status_overlay.sel_opac.accesskey "S">
+<!ENTITY staff.circ.copy_status_overlay.sel_opac_holds.label "Show Holds on Bib">
+<!ENTITY staff.circ.copy_status_overlay.sel_opac_holds.accesskey "H">
 <!ENTITY staff.circ.copy_status_overlay.sel_copy_details.label "Show Item Details">
 <!ENTITY staff.circ.copy_status_overlay.sel_copy_details.accesskey "I">
 <!ENTITY staff.circ.copy_status_overlay.sel_patron.label "Show Last Few Circulations">
 <!ENTITY staff.circ.holds.copy_to_clipboard.accesskey "C">
 <!ENTITY staff.circ.holds.show_in_catalog "Show in Catalog">
 <!ENTITY staff.circ.holds.show_in_catalog.accesskey "S">
+<!ENTITY staff.circ.holds.show_in_catalog_holds "Show Holds on Bib">
+<!ENTITY staff.circ.holds.show_in_catalog_holds.accesskey "H">
 <!ENTITY staff.circ.holds.show_item_details "Show Item Details">
 <!ENTITY staff.circ.holds.show_item_details.accesskey "I">
 <!ENTITY staff.circ.holds.show_last_few_circulations "Show Last Few Circulations">
index c5cf940..3f1d976 100644 (file)
@@ -79,6 +79,7 @@ circ.checkin.prototype = {
                             obj.controller.view.sel_edit.setAttribute('disabled','true');
                             obj.controller.view.sel_backdate.setAttribute('disabled','true');
                             obj.controller.view.sel_opac.setAttribute('disabled','true');
+                            obj.controller.view.sel_opac_holds.setAttribute('disabled','true');
                             obj.controller.view.sel_patron.setAttribute('disabled','true');
                             obj.controller.view.sel_last_patron.setAttribute('disabled','true');
                             obj.controller.view.sel_copy_details.setAttribute('disabled','true');
@@ -92,6 +93,7 @@ circ.checkin.prototype = {
                             obj.controller.view.sel_edit.setAttribute('disabled','false');
                             obj.controller.view.sel_backdate.setAttribute('disabled','false');
                             obj.controller.view.sel_opac.setAttribute('disabled','false');
+                            obj.controller.view.sel_opac_holds.setAttribute('disabled','false');
                             obj.controller.view.sel_patron.setAttribute('disabled','false');
                             obj.controller.view.sel_last_patron.setAttribute('disabled','false');
                             obj.controller.view.sel_copy_details.setAttribute('disabled','false');
@@ -160,6 +162,13 @@ circ.checkin.prototype = {
                             cat.util.show_in_opac(obj.selection_list);
                         }
                     ],
+                    'sel_opac_holds' : [
+                        ['command'],
+                        function() {
+                            JSAN.use('cat.util');
+                            cat.util.show_in_opac(obj.selection_list,{default_view:'hold_browser'});
+                        }
+                    ],
                     'sel_transit_abort' : [
                         ['command'],
                         function() {
index 1dc7896..9cc6b67 100644 (file)
@@ -22,6 +22,7 @@
     <command id="sel_edit" disabled="true"/>
     <command id="sel_backdate" disabled="true"/>
     <command id="sel_opac" disabled="true"/>
+    <command id="sel_opac_holds" disabled="true"/>
     <command id="sel_patron" disabled="true"/>
     <command id="sel_last_patron" disabled="true"/>
     <command id="sel_copy_details" disabled="true"/>
@@ -46,6 +47,7 @@
         <menuitem command="sel_clip" label="&staff.circ.checkin_overlay.sel_clip.label;" accesskey="&staff.circ.checkin_overlay.sel_clip.accesskey;" />
         <menuitem command="sel_bucket" label="&staff.circ.checkin_overlay.sel_bucket.label;" accesskey="&staff.circ.checkin_overlay.sel_bucket.accesskey;"/>
         <menuitem command="sel_opac" label="&staff.circ.checkin_overlay.sel_opac.label;" accesskey="&staff.circ.checkin_overlay.sel_opac.accesskey;" />
+        <menuitem command="sel_opac_holds" label="&staff.circ.checkin_overlay.sel_opac_holds.label;" accesskey="&staff.circ.checkin_overlay.sel_opac_holds.accesskey;" />
         <menuitem command="sel_copy_details" label="&staff.circ.checkin_overlay.sel_copy_details.label;" accesskey="&staff.circ.checkin_overlay.sel_copy_details.accesskey;" />
         <menuitem command="sel_patron" label="&staff.circ.checkin_overlay.sel_patron.label;" accesskey="&staff.circ.checkin_overlay.sel_patron.accesskey;"/>
         <menuitem command="sel_last_patron" label="&staff.circ.checkin_overlay.sel_last_patron.label;" accesskey="&staff.circ.checkin_overlay.sel_last_patron.accesskey;"/>
                     <menuitem command="sel_clip" label="&staff.circ.checkin_overlay.sel_clip.label;" accesskey="&staff.circ.checkin_overlay.sel_clip.accesskey;" />
                     <menuitem command="sel_bucket" label="&staff.circ.checkin_overlay.sel_bucket.label;" accesskey="&staff.circ.checkin_overlay.sel_bucket.accesskey;"/>
                     <menuitem command="sel_opac" label="&staff.circ.checkin_overlay.sel_opac.label;" accesskey="&staff.circ.checkin_overlay.sel_opac.accesskey;" />
+                    <menuitem command="sel_opac_holds" label="&staff.circ.checkin_overlay.sel_opac_holds.label;" accesskey="&staff.circ.checkin_overlay.sel_opac_holds.accesskey;" />
                     <menuitem command="sel_copy_details" label="&staff.circ.checkin_overlay.sel_copy_details.label;" accesskey="&staff.circ.checkin_overlay.sel_copy_details.accesskey;" />
                     <menuitem command="sel_patron" label="&staff.circ.checkin_overlay.sel_patron.label;" accesskey="&staff.circ.checkin_overlay.sel_patron.accesskey;"/>
                     <menuitem command="sel_last_patron" label="&staff.circ.checkin_overlay.sel_last_patron.label;" accesskey="&staff.circ.checkin_overlay.sel_last_patron.accesskey;"/>
index ca42c3c..8a2eca7 100644 (file)
@@ -60,6 +60,7 @@ circ.copy_status.prototype = {
                             obj.controller.view.sel_edit.setAttribute('disabled','true');
                             obj.controller.view.sel_vol_copy_edit.setAttribute('disabled','true');
                             obj.controller.view.sel_opac.setAttribute('disabled','true');
+                            obj.controller.view.sel_opac_holds.setAttribute('disabled','true');
                             obj.controller.view.sel_bucket.setAttribute('disabled','true');
                             obj.controller.view.sel_record_bucket.setAttribute('disabled','true');
                             obj.controller.view.sel_copy_details.setAttribute('disabled','true');
@@ -90,6 +91,7 @@ circ.copy_status.prototype = {
                             obj.controller.view.sel_edit.setAttribute('disabled','false');
                             obj.controller.view.sel_vol_copy_edit.setAttribute('disabled','false');
                             obj.controller.view.sel_opac.setAttribute('disabled','false');
+                            obj.controller.view.sel_opac_holds.setAttribute('disabled','false');
                             obj.controller.view.sel_patron.setAttribute('disabled','false');
                             obj.controller.view.cmd_triggered_events.setAttribute('disabled','false');
                             obj.controller.view.sel_bucket.setAttribute('disabled','false');
@@ -336,6 +338,13 @@ circ.copy_status.prototype = {
                             cat.util.show_in_opac(obj.selection_list);
                         }
                     ],
+                    'sel_opac_holds' : [
+                        ['command'],
+                        function() {
+                            JSAN.use('cat.util');
+                            cat.util.show_in_opac(obj.selection_list,{default_view:'hold_browser'});
+                        }
+                    ],
                     'sel_transit_abort' : [
                         ['command'],
                         function() {
index 89610e3..f12f209 100644 (file)
         <command id="sel_edit" disabled="true"/>
         <command id="sel_vol_copy_edit" disabled="true"/>
         <command id="sel_opac" disabled="true"/>
+        <command id="sel_opac_holds" disabled="true"/>
         <command id="sel_bucket" disabled="true"/>
         <command id="sel_record_bucket" disabled="true" label="&staff.circ.copy_status_overlay.sel_record_bucket.label;" accesskey="&staff.circ.copy_status_overlay.sel_record_bucket.accesskey;" />
         <command id="sel_spine" disabled="true"/>
index 200ea9e..0e991aa 100644 (file)
@@ -15,6 +15,7 @@
         <menuitem command="sel_bucket" label="&staff.circ.copy_status_overlay.sel_bucket.label;" accesskey="&staff.circ.copy_status_overlay.sel_bucket.accesskey;"/>
         <menuitem command="sel_record_bucket" />
         <menuitem command="sel_opac" label="&staff.circ.copy_status_overlay.sel_opac.label;" accesskey="&staff.circ.copy_status_overlay.sel_opac.accesskey;" />
+        <menuitem command="sel_opac_holds" label="&staff.circ.copy_status_overlay.sel_opac_holds.label;" accesskey="&staff.circ.copy_status_overlay.sel_opac_holds.accesskey;" />
         <menuitem command="sel_copy_details" label="&staff.circ.copy_status_overlay.sel_copy_details.label;" accesskey="&staff.circ.copy_status_overlay.sel_copy_details.accesskey;" />
         <menuitem command="sel_patron" label="&staff.circ.copy_status_overlay.sel_patron.label;" accesskey="&staff.circ.copy_status_overlay.sel_patron.accesskey;"/>
         <menuseparator/>
@@ -49,6 +50,7 @@
         <menuitem command="sel_bucket" label="&staff.circ.copy_status_overlay.sel_bucket.label;" accesskey="&staff.circ.copy_status_overlay.sel_bucket.accesskey;"/>
         <menuitem command="sel_record_bucket" />
         <menuitem command="sel_opac" label="&staff.circ.copy_status_overlay.sel_opac.label;" accesskey="&staff.circ.copy_status_overlay.sel_opac.accesskey;" />
+        <menuitem command="sel_opac_holds" label="&staff.circ.copy_status_overlay.sel_opac_holds.label;" accesskey="&staff.circ.copy_status_overlay.sel_opac_holds.accesskey;" />
         <menuitem command="sel_copy_details" label="&staff.circ.copy_status_overlay.sel_copy_details.label;" accesskey="&staff.circ.copy_status_overlay.sel_copy_details.accesskey;" />
         <menuitem command="sel_patron" label="&staff.circ.copy_status_overlay.sel_patron.label;" accesskey="&staff.circ.copy_status_overlay.sel_patron.accesskey;"/>
         <menuseparator/>
             <menuitem command="sel_bucket" label="&staff.circ.copy_status_overlay.sel_bucket.label;" accesskey="&staff.circ.copy_status_overlay.sel_bucket.accesskey;"/>
             <menuitem command="sel_record_bucket" />
             <menuitem command="sel_opac" label="&staff.circ.copy_status_overlay.sel_opac.label;" accesskey="&staff.circ.copy_status_overlay.sel_opac.accesskey;" />
+            <menuitem command="sel_opac_holds" label="&staff.circ.copy_status_overlay.sel_opac_holds.label;" accesskey="&staff.circ.copy_status_overlay.sel_opac_holds.accesskey;" />
             <menuitem command="sel_copy_details" label="&staff.circ.copy_status_overlay.sel_copy_details.label;" accesskey="&staff.circ.copy_status_overlay.sel_copy_details.accesskey;" />
             <menuitem command="sel_patron" label="&staff.circ.copy_status_overlay.sel_patron.label;" accesskey="&staff.circ.copy_status_overlay.sel_patron.accesskey;"/>
             <menuitem command="cmd_triggered_events" label="&staff.circ.copy_status_overlay.cmd_triggered_events.label;" accesskey="&staff.circ.copy_status_overlay.cmd_triggered_events.accesskey;"/>
             <menuitem command="sel_bucket" label="&staff.circ.copy_status_overlay.sel_bucket.label;" accesskey="&staff.circ.copy_status_overlay.sel_bucket.accesskey;"/>
             <menuitem command="sel_record_bucket" />
             <menuitem command="sel_opac" label="&staff.circ.copy_status_overlay.sel_opac.label;" accesskey="&staff.circ.copy_status_overlay.sel_opac.accesskey;" />
+            <menuitem command="sel_opac_holds" label="&staff.circ.copy_status_overlay.sel_opac_holds.label;" accesskey="&staff.circ.copy_status_overlay.sel_opac_holds.accesskey;" />
             <menuitem command="sel_copy_details" label="&staff.circ.copy_status_overlay.sel_copy_details.label;" accesskey="&staff.circ.copy_status_overlay.sel_copy_details.accesskey;" />
             <menuitem command="sel_patron" label="&staff.circ.copy_status_overlay.sel_patron.label;" accesskey="&staff.circ.copy_status_overlay.sel_patron.accesskey;"/>
             <menuitem command="cmd_triggered_events" label="&staff.circ.copy_status_overlay.cmd_triggered_events.label;" accesskey="&staff.circ.copy_status_overlay.cmd_triggered_events.accesskey;"/>
index 3264c84..cf538a1 100644 (file)
@@ -59,6 +59,7 @@ circ.renew.prototype = {
                         if (obj.selection_list.length == 0) {
                             obj.controller.view.sel_edit.setAttribute('disabled','true');
                             obj.controller.view.sel_opac.setAttribute('disabled','true');
+                            obj.controller.view.sel_opac_holds.setAttribute('disabled','true');
                             obj.controller.view.sel_patron.setAttribute('disabled','true');
                             obj.controller.view.sel_last_patron.setAttribute('disabled','true');
                             obj.controller.view.sel_copy_details.setAttribute('disabled','true');
@@ -70,6 +71,7 @@ circ.renew.prototype = {
                         } else {
                             obj.controller.view.sel_edit.setAttribute('disabled','false');
                             obj.controller.view.sel_opac.setAttribute('disabled','false');
+                            obj.controller.view.sel_opac_holds.setAttribute('disabled','false');
                             obj.controller.view.sel_patron.setAttribute('disabled','false');
                             obj.controller.view.sel_last_patron.setAttribute('disabled','false');
                             obj.controller.view.sel_copy_details.setAttribute('disabled','false');
@@ -122,6 +124,13 @@ circ.renew.prototype = {
                             cat.util.show_in_opac(obj.selection_list);
                         }
                     ],
+                    'sel_opac_holds' : [
+                        ['command'],
+                        function() {
+                            JSAN.use('cat.util');
+                            cat.util.show_in_opac(obj.selection_list,{default_view:'hold_browser'});
+                        }
+                    ],
                     'sel_transit_abort' : [
                         ['command'],
                         function() {
index 300d253..7ff5e2b 100644 (file)
@@ -75,6 +75,7 @@
         <command id="sel_clip" disabled="true"/>
         <command id="sel_edit" disabled="true"/>
         <command id="sel_opac" disabled="true"/>
+        <command id="sel_opac_holds" disabled="true"/>
         <command id="sel_patron" disabled="true"/>
         <command id="sel_last_patron" disabled="true"/>
         <command id="sel_copy_details" disabled="true"/>
index a36e3f8..bac321d 100644 (file)
@@ -17,6 +17,7 @@
         <menuitem command="sel_clip" label="&staff.circ.renew_overlay.sel_clip.label;" accesskey="&staff.circ.renew_overlay.sel_clip.accesskey;" />
         <menuitem command="sel_bucket" label="&staff.circ.renew_overlay.sel_bucket.label;" accesskey="&staff.circ.renew_overlay.sel_bucket.accesskey;"/>
         <menuitem command="sel_opac" label="&staff.circ.renew_overlay.sel_opac.label;" accesskey="&staff.circ.renew_overlay.sel_opac.accesskey;" />
+        <menuitem command="sel_opac_holds" label="&staff.circ.renew_overlay.sel_opac_holds.label;" accesskey="&staff.circ.renew_overlay.sel_opac_holds.accesskey;" />
         <menuitem command="sel_copy_details" label="&staff.circ.renew_overlay.sel_copy_details.label;" accesskey="&staff.circ.renew_overlay.sel_copy_details.accesskey;" />
         <menuitem command="sel_patron" label="&staff.circ.renew_overlay.sel_patron.label;" accesskey="&staff.circ.renew_overlay.sel_patron.accesskey;"/>
         <menuitem command="sel_last_patron" label="&staff.circ.renew_overlay.sel_last_patron.label;" accesskey="&staff.circ.renew_overlay.sel_last_patron.accesskey;"/>
@@ -81,6 +82,7 @@
                     <menuitem command="sel_clip" label="&staff.circ.renew_overlay.sel_clip.label;" accesskey="&staff.circ.renew_overlay.sel_clip.accesskey;" />
                     <menuitem command="sel_bucket" label="&staff.circ.renew_overlay.sel_bucket.label;" accesskey="&staff.circ.renew_overlay.sel_bucket.accesskey;"/>
                     <menuitem command="sel_opac" label="&staff.circ.renew_overlay.sel_opac.label;" accesskey="&staff.circ.renew_overlay.sel_opac.accesskey;" />
+                    <menuitem command="sel_opac_holds" label="&staff.circ.renew_overlay.sel_opac_holds.label;" accesskey="&staff.circ.renew_overlay.sel_opac_holds.accesskey;" />
                     <menuitem command="sel_copy_details" label="&staff.circ.renew_overlay.sel_copy_details.label;" accesskey="&staff.circ.renew_overlay.sel_copy_details.accesskey;" />
                     <menuitem command="sel_patron" label="&staff.circ.renew_overlay.sel_patron.label;" accesskey="&staff.circ.renew_overlay.sel_patron.accesskey;"/>
                     <menuitem command="sel_last_patron" label="&staff.circ.renew_overlay.sel_last_patron.label;" accesskey="&staff.circ.renew_overlay.sel_last_patron.accesskey;"/>
index c90e28f..b8d151a 100644 (file)
@@ -182,6 +182,7 @@ patron.holds.prototype = {
                         obj.controller.view.cmd_holds_cancel.setAttribute('disabled','false');
                         obj.controller.view.cmd_holds_uncancel.setAttribute('disabled','false');
                         obj.controller.view.cmd_show_catalog.setAttribute('disabled','false');
+                        obj.controller.view.cmd_show_catalog_holds.setAttribute('disabled','false');
                     } else {
                         obj.controller.view.sel_mark_items_damaged.setAttribute('disabled','true');
                         obj.controller.view.sel_mark_items_missing.setAttribute('disabled','true');
@@ -205,6 +206,7 @@ patron.holds.prototype = {
                         obj.controller.view.cmd_holds_cancel.setAttribute('disabled','true');
                         obj.controller.view.cmd_holds_uncancel.setAttribute('disabled','true');
                         obj.controller.view.cmd_show_catalog.setAttribute('disabled','true');
+                        obj.controller.view.cmd_show_catalog_holds.setAttribute('disabled','true');
                     }
                 }
             }
@@ -1321,62 +1323,13 @@ patron.holds.prototype = {
                     'cmd_show_catalog' : [
                         ['command'],
                         function() {
-                            try {
-                                for (var i = 0; i < obj.retrieve_ids.length; i++) {
-                                    var htarget = obj.retrieve_ids[i].target;
-                                    var htype = obj.retrieve_ids[i].type;
-                                    var opac_url;
-                                    switch(htype) {
-                                        case 'M' :
-                                            opac_url = xulG.url_prefix('opac_rresult_metarecord') + htarget;
-                                        break;
-                                        case 'T' :
-                                            opac_url = xulG.url_prefix('opac_rdetail') + htarget;
-                                        break;
-                                        case 'P' :
-                                            opac_url = xulG.url_prefix('opac_rdetail')
-                                            + obj.hold_part_map[ obj.retrieve_ids[i].id ].record();
-                                        break;
-                                        case 'I' :
-                                            opac_url = xulG.url_prefix('opac_rdetail')
-                                            + obj.hold_subscription_map[ obj.retrieve_ids[i].id ].record_entry();
-                                        break;
-                                        case 'V' :
-                                            var my_acn = obj.network.simple_request( 'FM_ACN_RETRIEVE.authoritative', [ htarget ]);
-                                            opac_url = xulG.url_prefix('opac_rdetail') + my_acn.record();
-                                        break;
-                                        case 'C' :
-                                        case 'R' :
-                                        case 'F' :
-                                            var my_acp = obj.network.simple_request( 'FM_ACP_RETRIEVE', [ htarget ]);
-                                            var my_acn;
-                                            if (typeof my_acp.call_number() == 'object') {
-                                                my_acn = my.acp.call_number();
-                                            } else {
-                                                my_acn = obj.network.simple_request( 'FM_ACN_RETRIEVE.authoritative',
-                                                    [ my_acp.call_number() ]);
-                                            }
-                                            opac_url = xulG.url_prefix('opac_rdetail') + my_acn.record();
-                                        break;
-                                        default:
-                                            obj.error.standard_unexpected_error_alert($("patronStrings").getFormattedString('staff.patron.holds.show_catalog.unknown_htype', [htype]), obj.retrieve_ids[i]);
-                                            continue;
-                                        break;
-                                    }
-                                    var content_params = {
-                                        'session' : ses(),
-                                        'authtime' : ses('authtime'),
-                                        'opac_url' : opac_url
-                                    };
-                                    xulG.new_tab(
-                                        xulG.url_prefix('XUL_OPAC_WRAPPER'),
-                                        {'tab_name': htype == 'M' ? 'Catalog' : $("patronStrings").getString('staff.patron.holds.show_catalog.retrieving_title') },
-                                        content_params
-                                    );
-                                }
-                            } catch(E) {
-                                obj.error.standard_unexpected_error_alert('',E);
-                            }
+                            obj.show_catalog_impl();
+                        }
+                    ],
+                    'cmd_show_catalog_holds' : [
+                        ['command'],
+                        function() {
+                            obj.show_catalog_impl('hold_browser');
                         }
                     ],
                     'cmd_holds_title_transfer' : [
@@ -1608,6 +1561,7 @@ patron.holds.prototype = {
                 obj.controller.view.cmd_holds_cancel.setAttribute('disabled','true');
                 obj.controller.view.cmd_holds_uncancel.setAttribute('disabled','true');
                 obj.controller.view.cmd_show_catalog.setAttribute('disabled','true');
+                obj.controller.view.cmd_show_catalog_holds.setAttribute('disabled','true');
             }, 0
         );
 
@@ -1654,6 +1608,73 @@ patron.holds.prototype = {
         } else { /*************************************************** PULL ******************************/
             obj.hold_interface_type = 'pull';
         }
+        if(obj.hold_interface_type != 'patron') {
+            var disableItems = document.getElementsByAttribute('command','cmd_show_catalog_holds');
+            for(var i = 0; i < disableItems.length; i++)
+                disableItems.item(i).style.display='none';
+        }
+    },
+
+    'show_catalog_impl' : function(default_view) {
+        var obj = this;
+        try {
+            for (var i = 0; i < obj.retrieve_ids.length; i++) {
+                var htarget = obj.retrieve_ids[i].target;
+                var htype = obj.retrieve_ids[i].type;
+                var opac_url;
+                switch(htype) {
+                    case 'M' :
+                        opac_url = xulG.url_prefix('opac_rresult_metarecord') + htarget;
+                    break;
+                    case 'T' :
+                        opac_url = xulG.url_prefix('opac_rdetail') + htarget;
+                    break;
+                    case 'P' :
+                        opac_url = xulG.url_prefix('opac_rdetail')
+                        + obj.hold_part_map[ obj.retrieve_ids[i].id ].record();
+                    break;
+                    case 'I' :
+                        opac_url = xulG.url_prefix('opac_rdetail')
+                        + obj.hold_subscription_map[ obj.retrieve_ids[i].id ].record_entry();
+                    break;
+                    case 'V' :
+                        var my_acn = obj.network.simple_request( 'FM_ACN_RETRIEVE.authoritative', [ htarget ]);
+                        opac_url = xulG.url_prefix('opac_rdetail') + my_acn.record();
+                    break;
+                    case 'C' :
+                    case 'R' :
+                    case 'F' :
+                        var my_acp = obj.network.simple_request( 'FM_ACP_RETRIEVE', [ htarget ]);
+                        var my_acn;
+                        if (typeof my_acp.call_number() == 'object') {
+                            my_acn = my.acp.call_number();
+                        } else {
+                            my_acn = obj.network.simple_request( 'FM_ACN_RETRIEVE.authoritative',
+                                [ my_acp.call_number() ]);
+                        }
+                        opac_url = xulG.url_prefix('opac_rdetail') + my_acn.record();
+                    break;
+                    default:
+                        obj.error.standard_unexpected_error_alert($("patronStrings").getFormattedString('staff.patron.holds.show_catalog.unknown_htype', [htype]), obj.retrieve_ids[i]);
+                        continue;
+                    break;
+                }
+                var content_params = {
+                    'session' : ses(),
+                    'authtime' : ses('authtime'),
+                    'opac_url' : opac_url
+                };
+                if(default_view)
+                    content_params['default_view'] = default_view;
+                xulG.new_tab(
+                    xulG.url_prefix('XUL_OPAC_WRAPPER'),
+                    {'tab_name': htype == 'M' ? 'Catalog' : $("patronStrings").getString('staff.patron.holds.show_catalog.retrieving_title') },
+                    content_params
+                );
+            }
+        } catch(E) {
+            obj.error.standard_unexpected_error_alert('',E);
+        }
     },
 
     'clear_and_retrieve' : function() {
index 8b73396..3f7e36b 100644 (file)
@@ -22,6 +22,7 @@
         <command id="cmd_holds_print_alt" />
         <command id="cmd_simplified_pull_list" />
         <command id="cmd_show_catalog" />
+        <command id="cmd_show_catalog_holds" />
         <command id="cmd_retrieve_patron" />
         <command id="cmd_holds_edit_desire_mint_condition" />
         <command id="cmd_holds_edit_pickup_lib" />
@@ -65,6 +66,7 @@
         <menupopup id="holds_actions" position="at_pointer"> 
             <menuitem command="sel_clip" label="&staff.circ.holds.copy_to_clipboard;" accesskey="&staff.circ.holds.copy_to_clipboard.accesskey;" />
             <menuitem label="&staff.circ.holds.show_in_catalog;" command="cmd_show_catalog" accesskey="&staff.circ.holds.show_in_catalog.accesskey;"/>
+            <menuitem label="&staff.circ.holds.show_in_catalog_holds;" command="cmd_show_catalog_holds" accesskey="&staff.circ.holds.show_in_catalog_holds.accesskey;"/>
             <menuitem command="sel_copy_details" label="&staff.circ.holds.show_item_details;" accesskey="&staff.circ.holds.show_item_details.accesskey;" />
             <menuitem command="sel_patron" label="&staff.circ.holds.show_last_few_circulations;" accesskey="&staff.circ.holds.show_last_few_circulations.accesskey;"/>
             <menuseparator />
                 <menupopup>
                     <menuitem command="sel_clip" label="&staff.circ.holds.copy_to_clipboard;" accesskey="&staff.circ.holds.copy_to_clipboard.accesskey;" />
                     <menuitem label="&staff.circ.holds.show_in_catalog;" command="cmd_show_catalog" accesskey="&staff.circ.holds.show_in_catalog.accesskey;"/>
+                    <menuitem label="&staff.circ.holds.show_in_catalog_holds;" command="cmd_show_catalog_holds" accesskey="&staff.circ.holds.show_in_catalog_holds.accesskey;"/>
                     <menuitem command="sel_copy_details" label="&staff.circ.holds.show_item_details;" accesskey="&staff.circ.holds.show_item_details.accesskey;" />
                     <menuitem command="sel_patron" label="&staff.circ.holds.show_last_few_circulations;" accesskey="&staff.circ.holds.show_last_few_circulations.accesskey;"/>
                     <menuseparator />
diff --git a/docs/RELEASE_NOTES_NEXT/show_holds_on_bib.txt b/docs/RELEASE_NOTES_NEXT/show_holds_on_bib.txt
new file mode 100644 (file)
index 0000000..27b69bd
--- /dev/null
@@ -0,0 +1,7 @@
+Show Holds On Bib Menu Option
+=============================
+
+Add direct "Show holds on bibs" menu option from item checkin, item status, 
+and patron hold interfaces. This gives staff a quicker way of viewing who 
+else has holds on an item instead of having to click an option to view the 
+bib record, then clicking into the menus to view holds.