Fix translations in group detail template.
This commit is contained in:
parent
88b2e8a73e
commit
d3d73a019d
@ -105,6 +105,9 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users'])
|
||||
resolve: {
|
||||
group: function(Group, $stateParams) {
|
||||
return Group.find($stateParams.id);
|
||||
},
|
||||
permissions: function(Group) {
|
||||
return Group.getPermissions();
|
||||
}
|
||||
}
|
||||
})
|
||||
@ -854,8 +857,19 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users'])
|
||||
'$scope',
|
||||
'Group',
|
||||
'group',
|
||||
function($scope, Group, group) {
|
||||
'permissions',
|
||||
function($scope, Group, group, permissions) {
|
||||
Group.bindOne(group.id, $scope, 'group');
|
||||
$scope.groupPermissionNames = [];
|
||||
// get display names of group permissions
|
||||
// from an object array with all available permissions [{display_name, value}]
|
||||
angular.forEach(group.permissions, function(permValue) {
|
||||
angular.forEach(permissions, function(p) {
|
||||
if (p.value == permValue) {
|
||||
$scope.groupPermissionNames.push(p.display_name);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
])
|
||||
|
||||
|
@ -6,14 +6,14 @@
|
||||
<translate>Back to overview</translate>
|
||||
</a>
|
||||
</div>
|
||||
<h1>{{ group.name }}</h1>
|
||||
<h1>{{ group.name | translate }}</h1>
|
||||
<h2 translate>Group</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="details">
|
||||
<p class="lead" translate>Permissions:</p>
|
||||
<ul ng-repeat="perm in group.permissions">
|
||||
<li>{{ perm }}
|
||||
<ul ng-repeat="permission in groupPermissionNames">
|
||||
<li>{{ permission | translate }}
|
||||
</ul>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user