From 9eec45da756eb24d93d5059fa73f1d7450949454 Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Thu, 15 Jul 2021 16:27:21 -0400 Subject: [PATCH] LP1786971 z39.50 add TCN to overlay popups as well Displays TCN on the Overlay modal and on the confirmation popup that displays if the live overlay target has changed. Signed-off-by: Terran McCanna Signed-off-by: Mary Llewellyn Signed-off-by: Bill Erickson --- Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2 | 2 +- Open-ILS/src/templates/staff/cat/z3950/t_overlay.tt2 | 5 ++++- Open-ILS/web/js/ui/default/staff/cat/z3950/app.js | 10 +++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2 b/Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2 index a043b3137f..fffa195721 100644 --- a/Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2 +++ b/Open-ILS/src/templates/staff/cat/share/z3950_strings.tt2 @@ -11,7 +11,7 @@ angular.module('egCoreMod').run(['egStrings', function(s) { s.IMPORT_BUTTON_LABEL = "[% l('Import') %]"; s.SAVE_BUTTON_LABEL = "[% l('Save') %]"; s.OVERLAY_CHANGED_TITLE = "[% l('Overlay target changed') %]"; - s.OVERLAY_CHANGED = "[% l('The overlay target has changed from [_1] to [_2]. Continue with overlay of record [_2]?', '{{id}}', '{{live_id}}') %]"; + s.OVERLAY_CHANGED = "[% l('The overlay target has changed from [_1] (TCN [_2]) to [_3] (TCN [_4]). Continue with overlay of record [_3]?', '{{id}}', '{{tcn}}', '{{live_id}}', '{{live_tcn}}') %]"; s.OVERLAY_REMOVED_TITLE = "[% l('Overlay target removed') %]"; s.OVERLAY_REMOVED = "[% l('The overlay target has been removed. The previous target was record [_1]. Continue with overlay of record [_1]?', '{{id}}') %]"; }]); diff --git a/Open-ILS/src/templates/staff/cat/z3950/t_overlay.tt2 b/Open-ILS/src/templates/staff/cat/z3950/t_overlay.tt2 index b892bf11fb..c67918ba46 100644 --- a/Open-ILS/src/templates/staff/cat/z3950/t_overlay.tt2 +++ b/Open-ILS/src/templates/staff/cat/z3950/t_overlay.tt2 @@ -16,7 +16,10 @@
-
[% l('Replace record [_1] ', '{{overlay_target.id}}') %]...
+
+ [% l('Replace record [_1]', '{{overlay_target.id}}') %] + ([% l('TCN [_1]', '{{overlay_target_tcn}}') %]) + ...
diff --git a/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js b/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js index 6a4c250890..a43401c032 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/z3950/app.js @@ -197,6 +197,7 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi }; $scope.local_overlay_target = egCore.hatch.getLocalItem('eg.cat.marked_overlay_record') || 0; + $scope.local_overlay_target_tcn = egCore.hatch.getLocalItem('eg.cat.marked_overlay_tcn') || 0; if($scope.local_overlay_target) { var currTarget = $scope.local_overlay_target; get_tcn(currTarget); @@ -212,6 +213,7 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi get_tcn(currTarget); } egCore.hatch.setLocalItem('eg.cat.marked_overlay_record',$scope.local_overlay_target); + egCore.hatch.setLocalItem('eg.cat.marked_overlay_tcn',$scope.local_overlay_target_tcn); } function get_tcn(currTarget) { @@ -366,7 +368,9 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi $scope.overlay_record = function() { var items = $scope.gridControls.selectedItems(); var overlay_target = $scope.local_overlay_target; + var overlay_target_tcn = $scope.local_overlay_target_tcn; var live_overlay_target = egCore.hatch.getLocalItem('eg.cat.marked_overlay_record') || 0; + var live_overlay_target_tcn = egCore.hatch.getLocalItem('eg.cat.marked_overlay_tcn') || 0; var args = { 'marc_xml' : items[0]['marcxml'], 'bib_source' : null @@ -385,6 +389,7 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi .then(function(rec) { $scope.overlay_target.orig_marc_xml = rec.marc(); $scope.merge_marc(); // in case a sticky value was already set + $scope.overlay_target_tcn = overlay_target_tcn; }); } @@ -455,7 +460,8 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi egConfirmDialog.open( confirm_title, confirm_msg, - { id : overlay_target, live_id : live_overlay_target } + { id : overlay_target, live_id : live_overlay_target, + tcn : overlay_target_tcn, live_tcn: live_overlay_target_tcn} ).result.then( function () { // proceed -- but check live overlay for unset-ness if (live_overlay_target != 0) { @@ -487,7 +493,9 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi ).then( function(result) { $scope.local_overlay_target = 0; + $scope.local_overlay_target_tcn = 0; egCore.hatch.removeLocalItem('eg.cat.marked_overlay_record'); + egCore.hatch.removeLocalItem('eg.cat.marked_overlay_tcn'); console.debug('overlay complete, target removed'); $window.open('/eg2/staff/catalog/record/' + overlay_target); } -- 2.11.0