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: {
|
resolve: {
|
||||||
group: function(Group, $stateParams) {
|
group: function(Group, $stateParams) {
|
||||||
return Group.find($stateParams.id);
|
return Group.find($stateParams.id);
|
||||||
|
},
|
||||||
|
permissions: function(Group) {
|
||||||
|
return Group.getPermissions();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -854,8 +857,19 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users'])
|
|||||||
'$scope',
|
'$scope',
|
||||||
'Group',
|
'Group',
|
||||||
'group',
|
'group',
|
||||||
function($scope, Group, group) {
|
'permissions',
|
||||||
|
function($scope, Group, group, permissions) {
|
||||||
Group.bindOne(group.id, $scope, 'group');
|
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>
|
<translate>Back to overview</translate>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<h1>{{ group.name }}</h1>
|
<h1>{{ group.name | translate }}</h1>
|
||||||
<h2 translate>Group</h2>
|
<h2 translate>Group</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="details">
|
<div class="details">
|
||||||
<p class="lead" translate>Permissions:</p>
|
<p class="lead" translate>Permissions:</p>
|
||||||
<ul ng-repeat="perm in group.permissions">
|
<ul ng-repeat="permission in groupPermissionNames">
|
||||||
<li>{{ perm }}
|
<li>{{ permission | translate }}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user