<div id="process-details-actors"><h2 class="SubHeading">{{'Actors' | translate}}</h2><p>{{'Select the entities (users, groups, roles, memberships) to map to the actors. These entities will do the human tasks in the process.' | translate}}</p><p>{{'Check that each entity is mapped to a profile, for either Bonita Portal or for applications you have created.' | translate}} {{'To do so, go to' | translate}} <a target="_parent" ng-href="{{actorsMappingCtrl.getLinkToProfiles()}}">{{'Profiles' | translate}}</a>.</p><table class="table actorMappingList"><thead><tr><th>{{'Actor name' | translate}}</th><th>{{'Users' | translate}}</th><th>{{'Roles' | translate}}</th><th>{{'Groups' | translate}}</th><th>{{'Memberships' | translate}}</th></tr></thead><tbody><tr ng-repeat-start="actor in actorsMappingCtrl.actors"><td class="actorName">{{actor.name}}</td><td class="members"><span ng-repeat="user in actorsMappingCtrl.actorsMembers[actor.id].users.data" class="label label-default member">{{user.user_id.firstname}} {{user.user_id.lastname}}</span> <span ng-if="actorsMappingCtrl.actorsMembers[actor.id].users.resource.pagination.total > actorsMappingCtrl.membersPerCell" class="label label-default member">{{'{} more' | translate | stringTemplater: actorsMappingCtrl.actorsMembers[actor.id].users.resource.pagination.total - actorsMappingCtrl.membersPerCell}}</span></td><td class="members"><span ng-repeat="role in actorsMappingCtrl.actorsMembers[actor.id].roles.data" class="label label-default member">{{role.role_id.displayName}}</span> <span ng-if="actorsMappingCtrl.actorsMembers[actor.id].roles.resource.pagination.total > actorsMappingCtrl.membersPerCell" class="label label-default member">{{'{} more' | translate | stringTemplater: actorsMappingCtrl.actorsMembers[actor.id].roles.resource.pagination.total - actorsMappingCtrl.membersPerCell}}</span></td><td class="members"><span ng-repeat="group in actorsMappingCtrl.actorsMembers[actor.id].groups.data" class="label label-default member">{{group.group_id.displayName}}</span> <span ng-if="actorsMappingCtrl.actorsMembers[actor.id].groups.resource.pagination.total > actorsMappingCtrl.membersPerCell" class="label label-default member">{{'{} more' | translate | stringTemplater: actorsMappingCtrl.actorsMembers[actor.id].groups.resource.pagination.total - actorsMappingCtrl.membersPerCell}}</span></td><td class="members"><span ng-repeat="membership in actorsMappingCtrl.actorsMembers[actor.id].memberships.data" class="label label-default member">{{'{} of {}' | translate | stringTemplater: [membership.role_id.displayName, membership.group_id.displayName]}}</span> <span ng-if="actorsMappingCtrl.actorsMembers[actor.id].memberships.resource.pagination.total > actorsMappingCtrl.membersPerCell" class="label label-default member">{{'{} more' | translate | stringTemplater: actorsMappingCtrl.actorsMembers[actor.id].memberships.resource.pagination.total - actorsMappingCtrl.membersPerCell}}</span></td></tr><tr ng-repeat-end class="mappingEdition-actions"><td></td><td><div class="cellFooter pull-right"><button ng-click="actorsMappingCtrl.editMapping(actor, 'users')" class="btn btn-primary"><span class="glyphicon" ng-class="{'glyphicon-pencil': actorsMappingCtrl.actorsMembers[actor.id].users.data.length, 'glyphicon-plus': !actorsMappingCtrl.actorsMembers[actor.id].users.data.length}"></span></button></div></td><td><div class="cellFooter pull-right"><button ng-click="actorsMappingCtrl.editMapping(actor, 'roles')" class="btn btn-primary"><span class="glyphicon" ng-class="{'glyphicon-pencil': actorsMappingCtrl.actorsMembers[actor.id].roles.data.length, 'glyphicon-plus': !actorsMappingCtrl.actorsMembers[actor.id].roles.data.length}"></span></button></div></td><td><div class="cellFooter pull-right"><button ng-click="actorsMappingCtrl.editMapping(actor, 'groups')" class="btn btn-primary"><span class="glyphicon" ng-class="{'glyphicon-pencil': actorsMappingCtrl.actorsMembers[actor.id].groups.data.length, 'glyphicon-plus': !actorsMappingCtrl.actorsMembers[actor.id].groups.data.length}"></span></button></div></td><td><div class="cellFooter pull-right"><button ng-click="actorsMappingCtrl.editMapping(actor, 'memberships')" class="btn btn-primary"><span class="glyphicon" ng-class="{'glyphicon-pencil': actorsMappingCtrl.actorsMembers[actor.id].memberships.data.length, 'glyphicon-plus': !actorsMappingCtrl.actorsMembers[actor.id].memberships.data.length}"></span></button></div></td></tr></tbody></table></div>