From 5757ab093599b0f98b178dc879032f555fc8f878 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Mon, 13 Feb 2017 11:49:58 -0500 Subject: [PATCH] webstaff: Book Items Now from Item Status We can't do what we did with Make Items Bookable, consolidating the items into one call and invoking a single interface; we get "Can't book multiple resource types at once". For now, we disable the 'Book Item Now' menu entry if multiple items are selected. Signed-off-by: Jason Etheridge Signed-off-by: Galen Charlton Signed-off-by: Kathy Lussier --- .../src/templates/staff/cat/item/t_list.tt2 | 3 +- .../web/js/ui/default/staff/cat/item/app.js | 73 +++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/templates/staff/cat/item/t_list.tt2 b/Open-ILS/src/templates/staff/cat/item/t_list.tt2 index f152ac887d..9755360308 100644 --- a/Open-ILS/src/templates/staff/cat/item/t_list.tt2 +++ b/Open-ILS/src/templates/staff/cat/item/t_list.tt2 @@ -12,7 +12,8 @@ + disabled="need_one_selected" + label="[% l('Book Item Now') %]"> 0 || combined_brsrc.length > 0) { + $uibModal.open({ + template: '', + animation: true, + size: 'md', + controller: + ['$scope','$location','egCore','$uibModalInstance', + function($scope , $location , egCore , $uibModalInstance) { + + $scope.funcs = { + ses : egCore.auth.token(), + bresv_interface_opts : { + booking_results : { + brt : combined_brt + ,brsrc : combined_brsrc + } + } + } + + var booking_path = '/eg/booking/reservation'; + + $scope.booking_admin_url = + $location.absUrl().replace(/\/eg\/staff.*/, booking_path); + + }] + }); + } + }); + } + $scope.requestItems = function() { var copy_list = gatherSelectedHoldingsIds(); if (copy_list.length == 0) return; -- 2.43.2