forked from DH-Center-Tuebingen/ThesauRex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroles.html
62 lines (62 loc) · 2.63 KB
/
roles.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<div ng-controller="userCtrl" resize-watcher>
<table class="table table-striped table-hover" ng-if="currentUser.permissions.add_edit_role || currentUser.permissions.delete_role" ng-init="getRoles()">
<tr>
<th>
Name
</th>
<th>
Display Name
</th>
<th>
Description
</th>
<th ng-if="currentUser.permissions.add_remove_permission">
Permissions
</th>
<th ng-if="currentUser.permissions.add_edit_role || currentUser.permissions.delete_role">
Options
</th>
<th>
Created
</th>
<th>
Last Updated
</th>
</tr>
<tr ng-repeat="role in roles">
<td>
{{ role.name }}
</td>
<td>
{{ role.display_name }}
</td>
<td>
{{ role.description }}
</td>
<td ng-if="currentUser.permissions.add_remove_permission" ng-init="getRolePermissions(role)">
<ui-select multiple ng-model="role.permissions" close-on-select="false" name="role_permissions_{{ role.id }}" id="role_permissions_{{ role.id }}" on-select="addRolePermission($item, role)" on-remove="removeRolePermission($item, role)">
<ui-select-match><span uib-tooltip="{{ $item.description }}">{{ $item.display_name }}</span></ui-select-match>
<ui-select-choices repeat="permission in permissions | filter:$select.search">
{{ permission.display_name }}
</ui-select-choices>
</ui-select>
</td>
<th ng-if="currentUser.permissions.add_edit_role || currentUser.permissions.delete_role">
<button type="button" class="btn btn-info" ng-click="openEditRoleDialog(role)" ng-if="currentUser.permissions.add_edit_role">
<i class="fa fa-fw fa-pencil"></i>
</button> <button type="button" class="btn btn-danger" ng-click="deleteRole(role)" ng-if="currentUser.permissions.delete_role">
<i class="fa fa-fw fa-trash-o"></i>
</button>
</th>
<td>
{{ role.created_at }}
</td>
<td>
{{ role.updated_at }}
</td>
</tr>
</table>
<button type="button" class="btn btn-success" ng-click="openAddRoleDialog()" ng-if="currentUser.permissions.add_edit_role">
<i class="fa fa-fw fa-plus"></i> New Role
</button>
</div>