From a1c55d75dd8e17f4beb5ac089321034290694789 Mon Sep 17 00:00:00 2001 From: Kyle Huckins Date: Thu, 6 Oct 2016 09:17:19 -0700 Subject: [PATCH] LP#1537223 Show Username on copy buckets Display bucket owner name, id, and owner's home OU on copy buckets and record buckets in webstaff client. Signed-off-by: Kyle Huckins Signed-off-by: Bill Erickson Signed-off-by: Dawn Dale Signed-off-by: Kathy Lussier --- .../templates/staff/cat/bucket/copy/index.tt2 | 2 +- .../staff/cat/bucket/copy/t_bucket_info.tt2 | 16 --------- .../staff/cat/bucket/record/index.tt2 | 2 +- .../cat/bucket/record/t_bucket_create.tt2 | 35 ------------------- .../cat/bucket/record/t_bucket_delete.tt2 | 16 --------- .../staff/cat/bucket/record/t_bucket_edit.tt2 | 34 ------------------ .../cat/bucket/record/t_bucket_selector.tt2 | 27 -------------- .../{copy => share}/t_bucket_create.tt2 | 2 +- .../{copy => share}/t_bucket_delete.tt2 | 0 .../bucket/{copy => share}/t_bucket_edit.tt2 | 2 +- .../{record => share}/t_bucket_info.tt2 | 5 +-- .../{copy => share}/t_bucket_selector.tt2 | 0 .../bucket/{copy => share}/t_load_shared.tt2 | 0 .../ui/default/staff/cat/bucket/copy/app.js | 15 +++++--- .../ui/default/staff/cat/bucket/record/app.js | 14 +++++--- 15 files changed, 28 insertions(+), 142 deletions(-) delete mode 100644 Open-ILS/src/templates/staff/cat/bucket/copy/t_bucket_info.tt2 delete mode 100644 Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_create.tt2 delete mode 100644 Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_delete.tt2 delete mode 100644 Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_edit.tt2 delete mode 100644 Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_selector.tt2 rename Open-ILS/src/templates/staff/cat/bucket/{copy => share}/t_bucket_create.tt2 (96%) rename Open-ILS/src/templates/staff/cat/bucket/{copy => share}/t_bucket_delete.tt2 (100%) rename Open-ILS/src/templates/staff/cat/bucket/{copy => share}/t_bucket_edit.tt2 (96%) rename Open-ILS/src/templates/staff/cat/bucket/{record => share}/t_bucket_info.tt2 (70%) rename Open-ILS/src/templates/staff/cat/bucket/{copy => share}/t_bucket_selector.tt2 (100%) rename Open-ILS/src/templates/staff/cat/bucket/{copy => share}/t_load_shared.tt2 (100%) diff --git a/Open-ILS/src/templates/staff/cat/bucket/copy/index.tt2 b/Open-ILS/src/templates/staff/cat/bucket/copy/index.tt2 index aa80153def..bcc0366285 100644 --- a/Open-ILS/src/templates/staff/cat/bucket/copy/index.tt2 +++ b/Open-ILS/src/templates/staff/cat/bucket/copy/index.tt2 @@ -55,7 +55,7 @@ changing routes with each tab selection anyway.
- [% INCLUDE 'staff/cat/bucket/copy/t_bucket_info.tt2' %] + [% INCLUDE 'staff/cat/bucket/share/t_bucket_info.tt2' %]
diff --git a/Open-ILS/src/templates/staff/cat/bucket/copy/t_bucket_info.tt2 b/Open-ILS/src/templates/staff/cat/bucket/copy/t_bucket_info.tt2 deleted file mode 100644 index 877fcf6aaf..0000000000 --- a/Open-ILS/src/templates/staff/cat/bucket/copy/t_bucket_info.tt2 +++ /dev/null @@ -1,16 +0,0 @@ - -
- [% l('Bucket: {{bucket().name()}}') %] - - - - - / [% l('Created {{bucket().create_time() | date}}') %] - / {{bucket().description()}} -
- -
- [% l('No Bucket Selected') %] -
- diff --git a/Open-ILS/src/templates/staff/cat/bucket/record/index.tt2 b/Open-ILS/src/templates/staff/cat/bucket/record/index.tt2 index 24b5ac98a1..5ef79947f1 100644 --- a/Open-ILS/src/templates/staff/cat/bucket/record/index.tt2 +++ b/Open-ILS/src/templates/staff/cat/bucket/record/index.tt2 @@ -60,7 +60,7 @@ changing routes with each tab selection anyway.
- [% INCLUDE 'staff/cat/bucket/record/t_bucket_info.tt2' %] + [% INCLUDE 'staff/cat/bucket/share/t_bucket_info.tt2' %]
diff --git a/Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_create.tt2 b/Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_create.tt2 deleted file mode 100644 index e6bb3fe2ed..0000000000 --- a/Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_create.tt2 +++ /dev/null @@ -1,35 +0,0 @@ - - - -
-
- - - -
-
diff --git a/Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_delete.tt2 b/Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_delete.tt2 deleted file mode 100644 index 0ca9887f9a..0000000000 --- a/Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_delete.tt2 +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_edit.tt2 b/Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_edit.tt2 deleted file mode 100644 index 288c577c95..0000000000 --- a/Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_edit.tt2 +++ /dev/null @@ -1,34 +0,0 @@ - -
-
- - - -
-
diff --git a/Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_selector.tt2 b/Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_selector.tt2 deleted file mode 100644 index e9aeacc18e..0000000000 --- a/Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_selector.tt2 +++ /dev/null @@ -1,27 +0,0 @@ - - diff --git a/Open-ILS/src/templates/staff/cat/bucket/copy/t_bucket_create.tt2 b/Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_create.tt2 similarity index 96% rename from Open-ILS/src/templates/staff/cat/bucket/copy/t_bucket_create.tt2 rename to Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_create.tt2 index e6bb3fe2ed..210ab8f59d 100644 --- a/Open-ILS/src/templates/staff/cat/bucket/copy/t_bucket_create.tt2 +++ b/Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_create.tt2 @@ -21,7 +21,7 @@
diff --git a/Open-ILS/src/templates/staff/cat/bucket/copy/t_bucket_delete.tt2 b/Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_delete.tt2 similarity index 100% rename from Open-ILS/src/templates/staff/cat/bucket/copy/t_bucket_delete.tt2 rename to Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_delete.tt2 diff --git a/Open-ILS/src/templates/staff/cat/bucket/copy/t_bucket_edit.tt2 b/Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_edit.tt2 similarity index 96% rename from Open-ILS/src/templates/staff/cat/bucket/copy/t_bucket_edit.tt2 rename to Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_edit.tt2 index 288c577c95..81b8cf6367 100644 --- a/Open-ILS/src/templates/staff/cat/bucket/copy/t_bucket_edit.tt2 +++ b/Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_edit.tt2 @@ -19,7 +19,7 @@
diff --git a/Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_info.tt2 b/Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_info.tt2 similarity index 70% rename from Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_info.tt2 rename to Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_info.tt2 index 877fcf6aaf..70c8882806 100644 --- a/Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_info.tt2 +++ b/Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_info.tt2 @@ -1,12 +1,13 @@
- [% l('Bucket: {{bucket().name()}}') %] + [% l('Bucket #{{bucket().id()}}: {{bucket().name()}}') %] - + / [% l('Created {{bucket().create_time() | date}}') %] + / {{bucket()._owner_name}} @ {{bucket()._owner_ou}} / {{bucket().description()}}
diff --git a/Open-ILS/src/templates/staff/cat/bucket/copy/t_bucket_selector.tt2 b/Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_selector.tt2 similarity index 100% rename from Open-ILS/src/templates/staff/cat/bucket/copy/t_bucket_selector.tt2 rename to Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_selector.tt2 diff --git a/Open-ILS/src/templates/staff/cat/bucket/copy/t_load_shared.tt2 b/Open-ILS/src/templates/staff/cat/bucket/share/t_load_shared.tt2 similarity index 100% rename from Open-ILS/src/templates/staff/cat/bucket/copy/t_load_shared.tt2 rename to Open-ILS/src/templates/staff/cat/bucket/share/t_load_shared.tt2 diff --git a/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js b/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js index e3b068e1e0..efd8ab141d 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js @@ -153,6 +153,13 @@ angular.module('egCatCopyBuckets', deferred.reject(evt); return; } + egCore.pcrud.retrieve( + 'au', bucket.owner() + ).then(function(patron) { + bucket._owner_name = patron.usrname(); + bucket._owner_ou = egCore.org.get(patron.home_ou()).shortname(); + }); + service.currentBucket = bucket; deferred.resolve(bucket); }); @@ -265,7 +272,7 @@ function($scope, $location, $q, $timeout, $uibModal, $scope.openCreateBucketDialog = function() { $uibModal.open({ - templateUrl: './cat/bucket/copy/t_bucket_create', + templateUrl: './cat/bucket/share/t_bucket_create', controller: ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) { $scope.focusMe = true; @@ -289,7 +296,7 @@ function($scope, $location, $q, $timeout, $uibModal, $scope.openEditBucketDialog = function() { $uibModal.open({ - templateUrl: './cat/bucket/copy/t_bucket_edit', + templateUrl: './cat/bucket/share/t_bucket_edit', controller: ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) { $scope.focusMe = true; @@ -315,7 +322,7 @@ function($scope, $location, $q, $timeout, $uibModal, // bucket if the user confirms. $scope.openDeleteBucketDialog = function() { $uibModal.open({ - templateUrl: './cat/bucket/copy/t_bucket_delete', + templateUrl: './cat/bucket/share/t_bucket_delete', controller : ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) { $scope.bucket = function() { return bucketSvc.currentBucket } @@ -334,7 +341,7 @@ function($scope, $location, $q, $timeout, $uibModal, // retrieves the requested bucket by ID $scope.openSharedBucketDialog = function() { $uibModal.open({ - templateUrl: './cat/bucket/copy/t_load_shared', + templateUrl: './cat/bucket/share/t_load_shared', controller : ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) { $scope.focusMe = true; 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 b6c4661f87..a1d63ee473 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 @@ -166,6 +166,12 @@ angular.module('egCatRecordBuckets', deferred.reject(evt); return; } + egCore.pcrud.retrieve( + 'au', bucket.owner() + ).then(function(patron) { + bucket._owner_name = patron.usrname(); + bucket._owner_ou = egCore.org.get(patron.home_ou()).shortname(); + }); service.currentBucket = bucket; deferred.resolve(bucket); }); @@ -296,7 +302,7 @@ function($scope, $location, $q, $timeout, $uibModal, $scope.openCreateBucketDialog = function() { $uibModal.open({ - templateUrl: './cat/bucket/record/t_bucket_create', + templateUrl: './cat/bucket/share/t_bucket_create', controller: ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) { $scope.focusMe = true; @@ -320,7 +326,7 @@ function($scope, $location, $q, $timeout, $uibModal, $scope.openEditBucketDialog = function() { $uibModal.open({ - templateUrl: './cat/bucket/record/t_bucket_edit', + templateUrl: './cat/bucket/share/t_bucket_edit', controller: ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) { $scope.focusMe = true; @@ -347,7 +353,7 @@ function($scope, $location, $q, $timeout, $uibModal, // bucket if the user confirms. $scope.openDeleteBucketDialog = function() { $uibModal.open({ - templateUrl: './cat/bucket/record/t_bucket_delete', + templateUrl: './cat/bucket/share/t_bucket_delete', controller : ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) { $scope.bucket = function() { return bucketSvc.currentBucket } @@ -366,7 +372,7 @@ function($scope, $location, $q, $timeout, $uibModal, // retrieves the requested bucket by ID $scope.openSharedBucketDialog = function() { $uibModal.open({ - templateUrl: './cat/bucket/record/t_load_shared', + templateUrl: './cat/bucket/share/t_load_shared', controller : ['$scope', '$uibModalInstance', function($scope, $uibModalInstance) { $scope.focusMe = true; -- 2.43.2