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
|
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/">
<head>
<title>Users</title>
</head>
<body>
<h1>User list</h1>
<div id="ivle_padding">
<div class="majorsection" py:def="userlist(title, admin)"
py:if="users.find(admin=admin).count()"
py:with="these_users = users.find(admin=admin)">
<h2>${title}</h2>
<table class="pretty_table">
<thead><tr><th>Login</th><th>Name</th></tr></thead>
<tbody>
<tr py:for="user in these_users">
<td py:attrs="{'class': 'disabled_user'} if user.state == u'disabled' else {}">
<a href="${req.publisher.generate(user)}">${user.login}</a>
</td>
<td>${user.display_name}</td>
</tr>
</tbody>
</table>
</div>
${userlist("Admins", True)}
${userlist("Users", False)}
<div class="horizontalactions">
<a class="addaction" href="/users/+new">Create new user</a>
</div>
</div>
</body>
</html>
|