From: Thomas Berezansky Date: Mon, 8 Oct 2012 03:14:27 +0000 (-0400) Subject: Add "Show Holds on Bib" menu items X-Git-Tag: sprint4-merge-nov22~3256 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=67fe98a9185ace222fe8051519cb23e4b5e42fd0;p=working%2FEvergreen.git Add "Show Holds on Bib" menu items 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 Signed-off-by: Ben Shum --- diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 47cf83da50..c519abfda2 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -2275,6 +2275,8 @@ + + @@ -2329,6 +2331,8 @@ + + @@ -2394,6 +2398,8 @@ + + @@ -2571,6 +2577,8 @@ + + diff --git a/Open-ILS/xul/staff_client/server/circ/checkin.js b/Open-ILS/xul/staff_client/server/circ/checkin.js index c5cf940cf1..3f1d976404 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkin.js +++ b/Open-ILS/xul/staff_client/server/circ/checkin.js @@ -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() { diff --git a/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul b/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul index 1dc7896812..9cc6b67f20 100644 --- a/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul +++ b/Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul @@ -22,6 +22,7 @@ + @@ -46,6 +47,7 @@ + @@ -121,6 +123,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/circ/copy_status.js b/Open-ILS/xul/staff_client/server/circ/copy_status.js index ca42c3cf55..8a2eca7999 100644 --- a/Open-ILS/xul/staff_client/server/circ/copy_status.js +++ b/Open-ILS/xul/staff_client/server/circ/copy_status.js @@ -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() { diff --git a/Open-ILS/xul/staff_client/server/circ/copy_status.xul b/Open-ILS/xul/staff_client/server/circ/copy_status.xul index 89610e319b..f12f209576 100644 --- a/Open-ILS/xul/staff_client/server/circ/copy_status.xul +++ b/Open-ILS/xul/staff_client/server/circ/copy_status.xul @@ -140,6 +140,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul b/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul index 200ea9e8df..0e991aa112 100644 --- a/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul +++ b/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul @@ -15,6 +15,7 @@ + @@ -49,6 +50,7 @@ + @@ -126,6 +128,7 @@ + @@ -159,6 +162,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/circ/renew.js b/Open-ILS/xul/staff_client/server/circ/renew.js index 3264c84cee..cf538a13cf 100644 --- a/Open-ILS/xul/staff_client/server/circ/renew.js +++ b/Open-ILS/xul/staff_client/server/circ/renew.js @@ -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() { diff --git a/Open-ILS/xul/staff_client/server/circ/renew.xul b/Open-ILS/xul/staff_client/server/circ/renew.xul index 300d253dd2..7ff5e2b84e 100644 --- a/Open-ILS/xul/staff_client/server/circ/renew.xul +++ b/Open-ILS/xul/staff_client/server/circ/renew.xul @@ -75,6 +75,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/circ/renew_overlay.xul b/Open-ILS/xul/staff_client/server/circ/renew_overlay.xul index a36e3f823f..bac321dceb 100644 --- a/Open-ILS/xul/staff_client/server/circ/renew_overlay.xul +++ b/Open-ILS/xul/staff_client/server/circ/renew_overlay.xul @@ -17,6 +17,7 @@ + @@ -81,6 +82,7 @@ + diff --git a/Open-ILS/xul/staff_client/server/patron/holds.js b/Open-ILS/xul/staff_client/server/patron/holds.js index c90e28f31e..b8d151ae44 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds.js +++ b/Open-ILS/xul/staff_client/server/patron/holds.js @@ -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() { diff --git a/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul b/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul index 8b73396b8d..3f7e36b8ad 100644 --- a/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/holds_overlay.xul @@ -22,6 +22,7 @@ + @@ -65,6 +66,7 @@ + @@ -150,6 +152,7 @@ + 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 index 0000000000..27b69bd2f6 --- /dev/null +++ b/docs/RELEASE_NOTES_NEXT/show_holds_on_bib.txt @@ -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.