1[%
2    admin_header = 1;
3    title = c.pref('name');
4    selected = 'user';
5    WRAPPER page/wrapper.tt;
6%]
7
8<div id="content">
9    <h1>[% c.loc('Users') %]</h1>
10    <table>
11    <thead>
12        <tr>
13            <th>[% c.loc('Active') %]</th>
14            <th>[% c.loc('login') %]</th>
15            <th>[% c.loc('roles') %]</th>
16            <th>[% loc('name') %]</th>
17            <th>[% loc('email') %]</th>
18        </tr>
19    </thead>
20    <tbody>
21[% WHILE (user=users.next) %]
22        <tr>
23            [% activeurl= c.uri_for('/.admin/update_user',  user.id , 'active') %]
24            [% active=(user.active==1) ? loc('yes') : loc('no') %]
25            <td><a class="activelink" href="[% activeurl %]">[% active %]</a></td>
26            <td><a href="[% c.uri_for(user.link) %].profile">[% user.login %]</a></td>
27            <td>[% FOR role=user.roles %] [% role.name %] [% END %]</td>
28            <td>[% user.name %]</td>
29            <td>
30                [% IF user.email %]
31                    <a href="mailto:[%user.email%]">[%user.email%]</a>
32                [% ELSE %]
33                    [% loc("no email address") %]
34                [% END %]
35            </td>
36        </tr>
37[% END %]
38    </table>
39
40    <p>
41[% IF pager.previous_page %]
42        <a href="[% c.uri_for('/.admin/user', {page => pager.previous_page}) %]">[% loc('Previous') %]</a>
43[% END %]
44
45[% IF pager.previous_page AND pager.next_page %]
46|
47[% END %]
48
49[% IF pager.next_page %]
50        <a href="[% c.uri_for('/.admin/user', {page => pager.next_page}) %]">[% loc('Next') %]</a>
51[% END %]
52    </p>
53
54    <a href="[% c.uri_for('/.register') %]">[% loc('Add user') %]</a>
55</div>
56[% END # WRAPPER %]
57