webstaff: SCT editor now displays location names qualified with OU
authorGalen Charlton <gmc@equinoxinitiative.org>
Thu, 29 Jun 2017 21:11:11 +0000 (17:11 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Thu, 29 Jun 2017 21:11:11 +0000 (17:11 -0400)
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/templates/staff/admin/serials/t_attr_edit.tt2
Open-ILS/web/js/ui/default/staff/admin/serials/app.js

index d1be2d3..a4bfecf 100644 (file)
                 <div class="col-md-6" ng-class="{'bg-success': working.location !== undefined}">
                     <select class="form-control"
                         ng-disabled="!defaults.attributes.location" ng-model="working.location"
-                        ng-options="l.id() as l.name() for l in location_list"
+                        ng-options="l.id() as i18n.ou_qualified_location_name(l) for l in location_list"
                     ></select>
                 </div>
                 <div class="col-md-6" ng-class="{'bg-success': working.opac_visible !== undefined}">
index 71ac4f2..81f68e4 100644 (file)
@@ -93,7 +93,13 @@ function(egCore , $q) {
                 owning_lib : orgs,
                 deleted    : 'f'
             },
-            {order_by : { acpl : 'name' }}, {atomic : true}
+            {
+                flesh : 1,
+                flesh_fields : {
+                    'acpl' : ['owning_lib']
+                },
+                order_by : { acpl : 'name' }
+            }, {atomic : true}
         );
     };
 
@@ -502,7 +508,8 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
                 };
                 $scope.location_orgs = [];
                 $scope.location_cache = {};
-            
+
+                $scope.i18n = egCore.i18n;
                 $scope.location_list = [];
                 itemSvc.get_locations(
                     egCore.org.fullPath( egCore.auth.user().ws_ou(), true )