}])
.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) {
});
$scope.getWSLabel = function(ws) {
- return ws; // FIXME: appstrings
+ return ws == $scope.defaultWS ?
+ $interpolate(egAppStrings.DEFAULT_WS_LABEL)({ws:ws}) : ws;
}
$scope.setDefaultWS = function() {
'eg.conf.workstation.required', $scope.usesWorkstation);
}
- $scope.updateUsesWorkstation = function() {
- // TODO
- /*
- egPrintStore.setLocalItem(
- 'eg.conf.workstation.name', $scope.workstationName);
- */
- }
-
// ---------------------
// Hatch Configs
$scope.hatchURL = egPrintStore.hatchURL();