workstation reg repairs
authorBill Erickson <berick@esilibrary.com>
Thu, 1 May 2014 18:59:07 +0000 (14:59 -0400)
committerBill Erickson <berick@esilibrary.com>
Thu, 1 May 2014 18:59:07 +0000 (14:59 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/staff/admin/workstation/index.tt2
Open-ILS/web/js/ui/default/staff/admin/workstation/app.js

index 9adc8fb..94b9521 100644 (file)
@@ -14,7 +14,7 @@ angular.module('egCoreMod')
 .factory('egAppStrings', function() {return {
 PREFS_REMOVE_KEY_CONFIRM : 
   '[% l('Delete content for key "[_1]"?', '{{deleteKey}}') %]',
-DEFAULT_WS_LABEL : '[% l('[_1] (Default)') %]'
+DEFAULT_WS_LABEL : '[% l('[_1] (Default)', '{{ws}}') %]'
 }});
 </script>
 [% END %]
index dd67797..d2ad586 100644 (file)
@@ -36,21 +36,13 @@ angular.module('egWorkstationAdmin',
 }])
 
 .controller('SplashCtrl',
-       ['$scope','$window','$location','egPrintStore','egAuth','egOrg','egPerm','egEvent','egNet','egAppStrings',
-function($scope , $window , $location , egPrintStore , egAuth , egOrg , egPerm , egEvent , egNet , egAppStrings) {
+       ['$scope','$window','$location','$interpolate','egPrintStore','egAuth','egOrg','egPerm','egEvent','egNet','egAppStrings',
+function($scope , $window , $location , $interpolate , egPrintStore , egAuth , egOrg , egPerm , egEvent , egNet , egAppStrings) {
 
     var allWorkstations = [];
     var permMap = {};
-    var wsPerms = [
-        'ADMIN_WORKSTATION', //FIXME: create
-        'REGISTER_WORKSTATION',
-        'UPDATE_WORKSTATION',
-        'DELETE_WORKSTATION'
-    ]
-
     $scope.contextOrg = egOrg.get(egAuth.user().ws_ou());
 
-    $scope.userHasAdminPerm = false;
     egPerm.hasPermAt('REGISTER_WORKSTATION', true)
     .then(function(orgList) { 
 
@@ -77,7 +69,8 @@ function($scope , $window , $location , egPrintStore , egAuth , egOrg , egPerm ,
     });
 
     $scope.getWSLabel = function(ws) {
-        return ws; // FIXME: appstrings
+        return ws == $scope.defaultWS ? 
+            $interpolate(egAppStrings.DEFAULT_WS_LABEL)({ws:ws}) : ws;
     }
 
     $scope.setDefaultWS = function() {
@@ -141,14 +134,6 @@ function($scope , $window , $location , egPrintStore , egAuth , egOrg , egPerm ,
             'eg.conf.workstation.required', $scope.usesWorkstation);
     }
 
-    $scope.updateUsesWorkstation = function() {
-        // TODO
-        /*
-        egPrintStore.setLocalItem(
-            'eg.conf.workstation.name', $scope.workstationName);
-        */
-    }
-
     // ---------------------
     // Hatch Configs
     $scope.hatchURL = egPrintStore.hatchURL();