PageRenderTime 22ms CodeModel.GetById 17ms app.highlight 4ms RepoModel.GetById 0ms app.codeStats 1ms

/shabti/templates/microsite/+package+/templates/test.mako

https://bitbucket.org/gawel/shabti
Mako | 67 lines | 64 code | 3 blank | 0 comment | 3 complexity | 9619b39462762e0c2cb24baab3b46cba MD5 | raw file
 1<?xml version="1.0" encoding="utf-8"?>
 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 4<head>
 5    <title>${c.title}</title>
 6    <style type="text/css">
 7    th {text-align: left; background-color: #eef; padding:0.25em 0;}
 8    </style>
 9</head>
10<body>
11    
12    <h4>Users</h4>
13    <table style="width:100%;padding:0 1em; font-size:75%">
14        <tr>
15            <th>username</th>
16            <th>email</th>
17            <th>password</th>
18            <th>created</th>
19            <th>active</th>
20        </tr>
21        % for u in c.users:
22        <tr>
23            <td>${u.username}</td>
24            <td>${u.email}</td>
25            <td>${u.password}</td>
26            <td>${u.created}</td>
27            <td>${u.active}</td>
28        </tr>
29        % endfor
30    </table>
31
32    <h4>Groups</h4>
33    <table style="width:100%;padding:0 1em; font-size:75%">
34        <tr>
35            <th>name</th>
36            <th>description</th>
37            <th>created</th>
38            <th>active</th>
39            <th>users</th>
40            <th>permissions</th>
41        </tr>
42        % for g in c.groups:
43        <tr>
44            <td>${g.name}</td>
45            <td>${g.description}</td>
46            <td>${g.created}</td><td>${g.active}</td>
47            <td>${', '.join([u.username for u in g.users])}</td>
48            <td>${', '.join([p.name for p in g.permissions])}</td>
49        </tr>
50    % endfor
51    </table>
52
53    <h4>Permissions</h4>
54    <table style="width:100%;padding:0 1em; font-size:75%">
55        <tr>
56            <th>name</th>
57            <th>description</th>
58            <th>groups</th>
59        </tr>
60        % for p in c.permissions:
61        <tr><td>${p.name}</td><td>${p.description}</td>
62        <td>${', '.join([group.name for group in p.groups])}</td>
63        </tr>
64    % endfor
65    </table>
66</body>
67</html>