From: Jessica Woolford Date: Wed, 17 Mar 2021 20:31:30 +0000 (-0400) Subject: LP1786971 z39.50 using TCN instead of ID X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=022e08bae17ad0046f1ddef233795844b16abd5e;p=working%2FEvergreen.git LP1786971 z39.50 using TCN instead of ID This patch switches the target to overlays to the bib ID instead of the TCN. This allows overlays to work for sites where TCN and bib ID are not the same. Signed-off-by: Jessica Woolford Signed-off-by: Terran McCanna --- diff --git a/Open-ILS/src/templates/staff/cat/z3950/t_list.tt2 b/Open-ILS/src/templates/staff/cat/z3950/t_list.tt2 index 9d7ef21718..14f02a9799 100644 --- a/Open-ILS/src/templates/staff/cat/z3950/t_list.tt2 +++ b/Open-ILS/src/templates/staff/cat/z3950/t_list.tt2 @@ -73,7 +73,7 @@ [% l('Total hits: [_1]', '{{total_hits}}') %]
- [% l('Record with TCN [_1] marked for overlay.', '{{local_overlay_target}}') %] + [% l('Record [_1] marked for overlay.', '{{local_overlay_target}}') %]
[% l('No record marked for overlay.') %] 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 e471e20ac8..89a36f997e 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,7 @@
-
[% l('Replace TCN [_1] ...', '{{overlay_target.id}}') %]
+
[% l('Replace [_1] ...', '{{overlay_target.id}}') %]
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 e2c363c4c3..88f5a24f63 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 @@ -116,6 +116,7 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi // case, result.count is not supplied. $scope.total_hits += (result.count || 0); for (var i in result.records) { + result.records[i].mvr['bibid'] = result.records[i].bibid; result.records[i].mvr['service'] = result.service; result.records[i].mvr['index'] = resultIndex++; result.records[i].mvr['marcxml'] = result.records[i].marcxml; @@ -185,7 +186,7 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi $scope.showInCatalog = function() { var items = $scope.gridControls.selectedItems(); // relying on cant_showInCatalog to protect us - var url = '/eg2/staff/catalog/record/' + items[0].tcn(); + var url = '/eg2/staff/catalog/record/' + items[0]['bibid']; $timeout(function() { $window.open(url, '_blank') }); }; $scope.cant_showInCatalog = function() { @@ -198,10 +199,10 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi $scope.local_overlay_target = egCore.hatch.getLocalItem('eg.cat.marked_overlay_record') || 0; $scope.mark_as_overlay_target = function() { var items = $scope.gridControls.selectedItems(); - if ($scope.local_overlay_target == items[0].tcn()) { + if ($scope.local_overlay_target == items[0]['bibid']) { $scope.local_overlay_target = 0; } else { - $scope.local_overlay_target = items[0].tcn(); + $scope.local_overlay_target = items[0]['bibid']; } egCore.hatch.setLocalItem('eg.cat.marked_overlay_record',$scope.local_overlay_target); } @@ -211,7 +212,7 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi if (items.length != 1) return true; if ( items[0]['service'] == 'native-evergreen-catalog' && - items[0].tcn() == $scope.local_overlay_target + items[0]['bibid'] == $scope.local_overlay_target ) return true; return false; } @@ -342,7 +343,7 @@ function($scope , $q , $location , $timeout , $window, egCore , egGridDataProvi }] }).result.then(function (args) { if (!args || !args.name) return; - }); + } $scope.overlay_record = function() {