Translate users view

This commit is contained in:
Johannes Zellner
2020-11-13 16:44:39 +01:00
parent 42d8dae900
commit 4fd1f31ab7
3 changed files with 347 additions and 227 deletions

View File

@@ -5,7 +5,7 @@
/* global async */
/* global $ */
angular.module('Application').controller('UsersController', ['$scope', '$location', '$timeout', 'Client', function ($scope, $location, $timeout, Client) {
angular.module('Application').controller('UsersController', ['$scope', '$location', '$translate', '$timeout', 'Client', function ($scope, $location, $translate, $timeout, Client) {
Client.onReady(function () { if (!Client.getUserInfo().isAtLeastUserManager) $location.path('/'); });
$scope.ldapProvider = [
@@ -31,10 +31,10 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
// Order matters for permissions used in canEdit
$scope.roles = [
{ id: 'user', name: 'User', disabled: false },
{ id: 'usermanager', name: 'User Manager', disabled: true },
{ id: 'admin', name: 'Administrator', disabled: true },
{ id: 'owner', name: 'Superadmin', disabled: true }
{ id: 'user', name: $translate.instant('users.role.user'), disabled: false },
{ id: 'usermanager', name: $translate.instant('users.role.usermanager'), disabled: true },
{ id: 'admin', name: $translate.instant('users.role.admin'), disabled: true },
{ id: 'owner', name: $translate.instant('users.role.owner'), disabled: true }
];
$scope.allUsers = []; // all the users and not just current page, have to load this for group assignment
@@ -42,9 +42,9 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
$scope.userSearchString = '';
$scope.currentPage = 1;
$scope.pageItemCount = [
{ name: 'Show 20 per page', value: 20 },
{ name: 'Show 50 per page', value: 50 },
{ name: 'Show 100 per page', value: 100 }
{ name: $translate.instant('main.pagination.perPageSelector', { n: 20 }), value: 20 },
{ name: $translate.instant('main.pagination.perPageSelector', { n: 50 }), value: 50 },
{ name: $translate.instant('main.pagination.perPageSelector', { n: 100 }), value: 100 }
];
$scope.pageItems = $scope.pageItemCount[0];
$scope.userRefreshBusy = true;