From 0f5a34064e8e3ffa6ef02e525b2cf07c546055f8 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 27 Apr 2021 11:23:02 -0400 Subject: [PATCH] LP1926310 Record bucket batch edit destination Record Bucket => Batch Edit now opens the new Angular MARC Batch Edit interface. Signed-off-by: Bill Erickson Signed-off-by: Garry Collum Signed-off-by: Galen Charlton --- .../eg2/src/app/staff/cat/marcbatch/marcbatch.component.html | 3 ++- .../eg2/src/app/staff/cat/marcbatch/marcbatch.component.ts | 12 ++++++++++++ .../src/eg2/src/app/staff/cat/marcbatch/routing.module.ts | 6 ++++++ Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js | 3 +-- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.html b/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.html index bfa2952226..a9e2b8975e 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.html @@ -125,7 +125,8 @@
Bucket named:
- +
diff --git a/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.ts index 81e391302b..67ab4b3372 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/marcbatch.component.ts @@ -56,6 +56,18 @@ export class MarcBatchComponent implements OnInit { ) {} ngOnInit() { + + this.route.paramMap.subscribe((params: ParamMap) => { + this.bucket = +params.get('bucketId'); + this.recordId = +params.get('recordId'); + + if (this.bucket) { + this.source = 'b'; + } else if (this.recordId) { + this.source = 'r'; + } + }); + this.load(); } diff --git a/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/routing.module.ts b/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/routing.module.ts index bb268e644d..9eb287bbc6 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/routing.module.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/marcbatch/routing.module.ts @@ -5,6 +5,12 @@ import {MarcBatchComponent} from './marcbatch.component'; const routes: Routes = [{ path: '', component: MarcBatchComponent + }, { + path: 'bucket/:bucketId', + component: MarcBatchComponent + }, { + path: 'record/:recordId', + component: MarcBatchComponent }]; @NgModule({ diff --git a/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js b/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js index 0474429f9a..0a126b5e02 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/bucket/record/app.js @@ -763,8 +763,7 @@ function($scope, $q , $routeParams, bucketSvc, egCore, $window, } $scope.batchEdit = function() { - var url = egCore.env.basePath + - 'cat/catalog/batchEdit/bucket/' + $scope.bucketId; + var url = '/eg2/staff/cat/marcbatch/bucket/' + $scope.bucketId; $timeout(function() { $window.open(url, '_blank') }); } -- 2.11.0