-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathusermanagement.pt
More file actions
91 lines (87 loc) · 5.11 KB
/
Copy pathusermanagement.pt
File metadata and controls
91 lines (87 loc) · 5.11 KB
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
82
83
84
85
86
87
88
89
90
91
<div metal:use-macro="layout.base" i18n:domain="onegov.town6">
<tal:b metal:fill-slot="title">
${title}
</tal:b>
<tal:b metal:fill-slot="content">
<div class="grid-x grid-padding-x">
<div class="medium-7 cell main-content small-order-2 medium-order-1 large-order-1">
<table class="usermanagement stack hover table" tal:define="enable_yubikey request.app.enable_yubikey; enable_mtan request.app.mtan_second_factor_enabled">
<tal:b repeat="role roles">
<thead>
<tr>
<td>
<tal:b metal:use-macro="layout.macros['role-plural']" />
(${len(users.get(role, []))})
</td>
<td></td>
<td tal:condition="enable_yubikey" i18n:translate>
Yubikey
</td>
<td tal:condition="enable_mtan" i18n:translate>
mTAN
</td>
<td></td>
</tr>
</thead>
<tbody tal:condition="users.get(role)">
<tr tal:repeat="user users[role]" class="${user.active and 'user-active' or 'user-inactive'}">
<td>
<tal:b condition="user.active">
<i class="far fa-user" aria-hidden="true" title="Active" i18n:attributes="title"></i>
</tal:b>
<tal:b condition="not:user.active">
<i class="fa fa-ban" aria-hidden="true" title="Inactive" i18n:attributes="title"></i>
</tal:b>
<span>${user.username}</span>
</td>
<td>${user.realname}</td>
<tal:b define="serial user.yubikey_serial" condition="enable_yubikey">
<td tal:condition="serial">
<span class="yubikey">
<i class="fa fa-key" aria-hidden="true"></i>
${serial}
</span>
</td>
<td tal:condition="not:serial" i18n:translate></td>
</tal:b>
<tal:b define="phone_number user.mtan_phone_number" condition="enable_mtan">
<td tal:condition="phone_number">
<span class="yubikey">
<i class="fa fa-mobile" aria-hidden="true"></i>
${phone_number}
</span>
</td>
<td tal:condition="not:phone_number" i18n:translate></td>
</tal:b>
<td class="text-links">
<a href="${request.link(user)}" i18n:translate>View</a>
</td>
</tr>
</tbody>
</tal:b>
</table>
</div>
<div class="medium-4 cell medium-offset-1 sidebar filter-panel small-order-1 medium-order-2 large-order-2">
<div class="sidebar-wrapper">
<div tal:condition="filters['active']|nothing" class="side-panel filter-active">
<h2 class="filter-title h3" i18n:translate>State</h2>
<div metal:use-macro="layout.macros['tags']" tal:define="tags filters['active']" />
</div>
<div tal:condition="filters['role']|nothing" class="side-panel filter-role">
<h2 class="filter-title h3" i18n:translate>Role</h2>
<div metal:use-macro="layout.macros['tags']" tal:define="tags filters['role']" />
</div>
<div tal:condition="filters['tag']|nothing" class="side-panel filter-tags">
<h2 class="filter-title h3" i18n:translate>Tags</h2>
<div metal:use-macro="layout.macros['tags']" tal:define="tags filters['tag']" />
</div>
<div tal:condition="filters['source']|nothing" class="side-panel filter-source">
<h2 class="filter-title h3" i18n:translate>Source</h2>
<div metal:use-macro="layout.macros['tags']" tal:define="tags filters['source']" />
</div>
</div>
</div>
</div>
</tal:b>
</div>