blob: 170dde882f3420c22eb2852b949e9c354378e667 (
plain) (
blame)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
<form method="post" action="?do=permissionmanager">
<input type="hidden" name="token" value="{{token}}">
<input type="hidden" name="action" value="deleteRole">
<div>
<input type="text" class="form-control" id="roleNameSearchField" onkeyup="searchFieldFunction()" placeholder="{{lang_searchPlaceholder}}">
</div>
<div class="row">
<div class="col-md-12">
<table class="table table-condensed table-hover stupidtable">
<thead>
<tr>
<th data-sort="string">{{lang_roles}}</th>
<th data-sort="string">{{lang_description}}</th>
<th class="text-center slx-smallcol">
{{#perms.roles.edit.disabled}}
{{lang_view}}
{{/perms.roles.edit.disabled}}
{{^perms.roles.edit.disabled}}
{{lang_edit}}
{{/perms.roles.edit.disabled}}
</th>
<th class="text-center slx-smallcol">{{lang_delete}}</th>
</tr>
</thead>
<tbody>
{{#roles}}
<tr>
<td class="rolename">{{rolename}}</td>
<td class="text-muted"><table class="slx-ellipsis"><tr><td>{{roledescription}}</td></tr></table></td>
<td class="text-center">
<a class="btn btn-xs btn-primary" href="?do=permissionmanager&show=roleEditor&roleid={{roleid}}">
{{#builtin}}
<span class="glyphicon glyphicon-duplicate"></span>
{{/builtin}}
{{^builtin}}
<span class="glyphicon glyphicon-edit"></span>
{{/builtin}}
</a>
</td>
<td class="text-center">
{{^builtin}}
<button type="submit" name="deleteId" value="{{roleid}}" class="btn btn-xs btn-danger" {{perms.roles.edit.disabled}}
data-confirm="#confirm-role-{{roleid}}" data-title="{{rolename}}">
<span class="glyphicon glyphicon-trash"></span>
</button>
<div class="hidden" id="confirm-role-{{roleid}}">
<p>{{lang_roleDeleteConfirm}}</p>
{{lang_numAssignedUsers}}: {{users}}
</div>
{{/builtin}}
</td>
</tr>
{{/roles}}
</tbody>
</table>
</div>
</div>
</form>
<div class="text-right">
<a href="?do=permissionmanager&show=roleEditor" class="btn btn-success {{perms.roles.edit.disabled}}">
<span class="glyphicon glyphicon-plus"></span>
{{lang_newRole}}
</a>
</div>
<script>
function searchFieldFunction() {
var filter = $("#roleNameSearchField").val().toLowerCase();
$(".rolename").each(function() {
if ($(this).text().toLowerCase().indexOf(filter) >= 0) {
$(this).closest("tr").show();
} else {
$(this).closest("tr").hide();
}
});
}
</script>
|