[open-ils-commits] [GIT] Evergreen ILS branch master updated. a63533f3ce0835f9c9c4d6ecff85ea90b47b6804

Evergreen Git git at git.evergreen-ils.org
Fri Feb 21 13:30:22 EST 2020


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  a63533f3ce0835f9c9c4d6ecff85ea90b47b6804 (commit)
       via  ce721a53839f3c226144198cda2db08441d55ebf (commit)
      from  81a018c686c96385d358d378609b200532b51be0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a63533f3ce0835f9c9c4d6ecff85ea90b47b6804
Author: Kyle Huckins <khuckins at catalyte.io>
Date:   Tue Feb 18 18:43:37 2020 +0000

    lp1760193 - Action Rewording
    
    - Rename "Add Items to Bucket/Record Bucket" and
    "Add Items/Item Records to Bucket" to "Add to Item/Record
    Bucket"
    
    Signed-off-by: Kyle Huckins <khuckins at catalyte.io>
    
            modified:   Open-ILS/src/templates/staff/cat/item/index.tt2
            modified:   Open-ILS/src/templates/staff/cat/item/t_list.tt2
    
    Signed-off-by: Terran McCanna <tmccanna at georgialibraries.org>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>

diff --git a/Open-ILS/src/templates/staff/cat/item/index.tt2 b/Open-ILS/src/templates/staff/cat/item/index.tt2
index 7444838205..cff1f5fcc9 100644
--- a/Open-ILS/src/templates/staff/cat/item/index.tt2
+++ b/Open-ILS/src/templates/staff/cat/item/index.tt2
@@ -89,8 +89,8 @@
         <span>[% l('Actions') %]</span><span class="caret"></span>
       </button>
       <ul uib-dropdown-menu class="scrollable-menu dropdown-menu-right">
-        <li><a href ng-click="add_copies_to_bucket()">[% l('Add Items to Bucket') %]</a></li>
-        <li><a href ng-click="add_records_to_bucket()">[% l('Add Items to Record Bucket') %]</a></li>
+        <li><a href ng-click="add_copies_to_bucket()">[% l('Add to Item Bucket') %]</a></li>
+        <li><a href ng-click="add_records_to_bucket()">[% l('Add to Record Bucket') %]</a></li>
         <li><a href ng-click="show_in_catalog()">[% l('Show in Catalog') %]</a></li>
         <li><a href ng-click="make_copies_bookable()">[% l('Make Items Bookable') %]</a></li>
         <li><a href ng-click="book_copies_now()">[% l('Book Item Now') %]</a></li>
diff --git a/Open-ILS/src/templates/staff/cat/item/t_list.tt2 b/Open-ILS/src/templates/staff/cat/item/t_list.tt2
index 64e88a7eb3..ca61728a29 100644
--- a/Open-ILS/src/templates/staff/cat/item/t_list.tt2
+++ b/Open-ILS/src/templates/staff/cat/item/t_list.tt2
@@ -11,9 +11,9 @@
   dateformat="{{$root.egDateAndTimeFormat}}">
 
   <eg-grid-action handler="add_copies_to_bucket"
-    label="[% l('Add Items to Bucket') %]"></eg-grid-action>
+    label="[% l('Add to Item Bucket') %]"></eg-grid-action>
   <eg-grid-action handler="add_records_to_bucket"
-    label="[% l('Add Item Records to Bucket') %]"></eg-grid-action>
+    label="[% l('Add to Record Bucket') %]"></eg-grid-action>
   <eg-grid-action handler="show_in_catalog"
     label="[% l('Show in Catalog') %]"></eg-grid-action>
   <eg-grid-action handler="make_copies_bookable"

commit ce721a53839f3c226144198cda2db08441d55ebf
Author: Kyle Huckins <khuckins at catalyte.io>
Date:   Tue Jan 28 18:27:36 2020 +0000

    lp1760193 Add to Record Bucket from Item Status
    
    - Add "Add Items to Record Bucket" option in Item Status
    UI
    - Refactor Add Copy to Bucket functionality to support
    adding to Copy Buckets or to Record Buckets depending
    on optional bucket_type parameter
    
    Signed-off-by: Kyle Huckins <khuckins at catalyte.io>
    
     Changes to be committed:
            modified:   Open-ILS/src/templates/staff/cat/item/index.tt2
            modified:   Open-ILS/src/templates/staff/cat/item/t_list.tt2
            modified:   Open-ILS/web/js/ui/default/staff/cat/item/app.js
            modified:   Open-ILS/web/js/ui/default/staff/circ/services/item.js
    
    Signed-off-by: Terran McCanna <tmccanna at georgialibraries.org>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>

diff --git a/Open-ILS/src/templates/staff/cat/item/index.tt2 b/Open-ILS/src/templates/staff/cat/item/index.tt2
index 9cb8be84b7..7444838205 100644
--- a/Open-ILS/src/templates/staff/cat/item/index.tt2
+++ b/Open-ILS/src/templates/staff/cat/item/index.tt2
@@ -90,6 +90,7 @@
       </button>
       <ul uib-dropdown-menu class="scrollable-menu dropdown-menu-right">
         <li><a href ng-click="add_copies_to_bucket()">[% l('Add Items to Bucket') %]</a></li>
+        <li><a href ng-click="add_records_to_bucket()">[% l('Add Items to Record Bucket') %]</a></li>
         <li><a href ng-click="show_in_catalog()">[% l('Show in Catalog') %]</a></li>
         <li><a href ng-click="make_copies_bookable()">[% l('Make Items Bookable') %]</a></li>
         <li><a href ng-click="book_copies_now()">[% l('Book Item Now') %]</a></li>
diff --git a/Open-ILS/src/templates/staff/cat/item/t_list.tt2 b/Open-ILS/src/templates/staff/cat/item/t_list.tt2
index 3747835a8e..64e88a7eb3 100644
--- a/Open-ILS/src/templates/staff/cat/item/t_list.tt2
+++ b/Open-ILS/src/templates/staff/cat/item/t_list.tt2
@@ -12,6 +12,8 @@
 
   <eg-grid-action handler="add_copies_to_bucket"
     label="[% l('Add Items to Bucket') %]"></eg-grid-action>
+  <eg-grid-action handler="add_records_to_bucket"
+    label="[% l('Add Item Records to Bucket') %]"></eg-grid-action>
   <eg-grid-action handler="show_in_catalog"
     label="[% l('Show in Catalog') %]"></eg-grid-action>
   <eg-grid-action handler="make_copies_bookable"
diff --git a/Open-ILS/web/js/ui/default/staff/cat/item/app.js b/Open-ILS/web/js/ui/default/staff/cat/item/app.js
index 52d2d021fa..614db62ecf 100644
--- a/Open-ILS/web/js/ui/default/staff/cat/item/app.js
+++ b/Open-ILS/web/js/ui/default/staff/cat/item/app.js
@@ -86,6 +86,10 @@ function($scope , $q , $window , $location , $timeout , egCore , egNet , egGridD
         itemSvc.add_copies_to_bucket([$scope.args.copyId]);
     }
 
+    $scope.add_records_to_bucket = function() {
+        itemSvc.add_records_to_bucket([$scope.args.recordId], 'biblio');
+    }
+
     $scope.show_in_catalog = function() {
         window.open('/eg/staff/cat/catalog/record/' + $scope.args.recordId + '/catalog', '_blank');
     }
@@ -469,6 +473,17 @@ function($scope , $q , $window , $location , $timeout , egCore , egNet , egGridD
         return cp_id_list;
     }
 
+    function gatherSelectedHoldingsRecords() {
+        var record_id_list = [];
+        angular.forEach(
+            copyGrid.selectedItems(),
+            function (item) {
+                record_id_list.push(item['call_number.record.id']);
+            }
+        )
+        return record_id_list;
+    }
+
     $scope.refreshGridData = function() {
         var chain = $q.when();
         var all_items = itemSvc.copies.map(function(item) {
@@ -491,6 +506,11 @@ function($scope , $q , $window , $location , $timeout , egCore , egNet , egGridD
         itemSvc.add_copies_to_bucket(copy_list);
     }
 
+    $scope.add_records_to_bucket = function() {
+        var record_list = gatherSelectedHoldingsRecords();
+        itemSvc.add_copies_to_bucket(record_list, 'biblio');
+    }
+
     $scope.locateAcquisition = function() {
         if (gatherSelectedHoldingsIds) {
             var cp_list = gatherSelectedHoldingsIds();
diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/item.js b/Open-ILS/web/js/ui/default/staff/circ/services/item.js
index d07c598e81..c06b252236 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/services/item.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/services/item.js
@@ -224,8 +224,9 @@ function(egCore , egOrg , egCirc , $uibModal , $q , $timeout , $window , ngToast
         });
     }
 
-    service.add_copies_to_bucket = function(copy_list) {
-        if (copy_list.length == 0) return;
+    service.add_copies_to_bucket = function(list, bucket_type) {
+        if (list.length == 0) return;
+        if (!bucket_type) bucket_type = 'copy';
 
         return $uibModal.open({
             templateUrl: './cat/catalog/t_add_to_bucket',
@@ -244,20 +245,21 @@ function(egCore , egOrg , egCirc , $uibModal , $q , $timeout , $window , ngToast
                     'open-ils.actor',
                     'open-ils.actor.container.retrieve_by_class.authoritative',
                     egCore.auth.token(), egCore.auth.user().id(),
-                    'copy', 'staff_client'
+                    bucket_type, 'staff_client'
                 ).then(function(buckets) { $scope.allBuckets = buckets; });
 
                 $scope.add_to_bucket = function() {
                     var promises = [];
-                    angular.forEach(copy_list, function (cp) {
-                        var item = new egCore.idl.ccbi()
+                    angular.forEach(list, function (entry) {
+                        var item = bucket_type == 'copy' ? new egCore.idl.ccbi() : new egCore.idl.cbrebi();
                         item.bucket($scope.bucket_id);
-                        item.target_copy(cp);
+                        if (bucket_type == 'copy') item.target_copy(entry);
+                        if (bucket_type == 'biblio') item.target_biblio_record_entry(entry);
                         promises.push(
                             egCore.net.request(
                                 'open-ils.actor',
                                 'open-ils.actor.container.item.create',
-                                egCore.auth.token(), 'copy', item
+                                egCore.auth.token(), bucket_type, item
                             )
                         );
 
@@ -268,7 +270,7 @@ function(egCore , egOrg , egCirc , $uibModal , $q , $timeout , $window , ngToast
                 }
 
                 $scope.add_to_new_bucket = function() {
-                    var bucket = new egCore.idl.ccb();
+                    var bucket = bucket_type == 'copy' ? new egCore.idl.ccb() : new egCore.idl.cbreb();
                     bucket.owner(egCore.auth.user().id());
                     bucket.name($scope.newBucketName);
                     bucket.description('');
@@ -277,7 +279,7 @@ function(egCore , egOrg , egCirc , $uibModal , $q , $timeout , $window , ngToast
                     return egCore.net.request(
                         'open-ils.actor',
                         'open-ils.actor.container.create',
-                        egCore.auth.token(), 'copy', bucket
+                        egCore.auth.token(), bucket_type, bucket
                     ).then(function(bucket) {
                         $scope.bucket_id = bucket;
                         $scope.add_to_bucket();

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/templates/staff/cat/item/index.tt2      |  3 ++-
 Open-ILS/src/templates/staff/cat/item/t_list.tt2     |  4 +++-
 Open-ILS/web/js/ui/default/staff/cat/item/app.js     | 20 ++++++++++++++++++++
 .../web/js/ui/default/staff/circ/services/item.js    | 20 +++++++++++---------
 4 files changed, 36 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list