From: Kyle Huckins Date: Thu, 6 Oct 2016 16:17:19 +0000 (-0700) Subject: LP#1537223 Show Username on copy buckets X-Git-Url: http://git.equinoxoli.org/?p=evergreen-equinox.git;a=commitdiff_plain;h=a1c55d75dd8e17f4beb5ac089321034290694789 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 --- 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 aa80153..bcc0366 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_edit.tt2 b/Open-ILS/src/templates/staff/cat/bucket/copy/t_bucket_edit.tt2 deleted file mode 100644 index 288c577..0000000 --- a/Open-ILS/src/templates/staff/cat/bucket/copy/t_bucket_edit.tt2 +++ /dev/null @@ -1,34 +0,0 @@ - -
-
- - - -
-
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 877fcf6..0000000 --- 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 24b5ac9..5ef7994 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 e6bb3fe..0000000 --- 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 0ca9887..0000000 --- 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_selector.tt2 b/Open-ILS/src/templates/staff/cat/bucket/record/t_bucket_selector.tt2 deleted file mode 100644 index e9aeacc..0000000 --- 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 e6bb3fe..210ab8f 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/record/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/record/t_bucket_edit.tt2 rename to Open-ILS/src/templates/staff/cat/bucket/share/t_bucket_edit.tt2 index 288c577..81b8cf6 100644 --- a/Open-ILS/src/templates/staff/cat/bucket/record/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 877fcf6..70c8882 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 e3b068e..efd8ab1 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 b6c4661..a1d63ee 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;