File: user.tt

package info (click to toggle)
libmojomojo-perl 1.01%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,272 kB
  • ctags: 879
  • sloc: perl: 14,055; sh: 145; xml: 120; ruby: 6; makefile: 2
file content (56 lines) | stat: -rw-r--r-- 1,658 bytes parent folder | download | duplicates (5)
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
[%
    admin_header = 1;
    title = c.pref('name');
    selected = 'user';
    WRAPPER page/wrapper.tt;
%]

<div id="content">
    <h1>[% c.loc('Users') %]</h1>
    <table>
    <thead>
        <tr>
            <th>[% c.loc('Active') %]</th>
            <th>[% c.loc('login') %]</th>
            <th>[% c.loc('roles') %]</th>
            <th>[% loc('name') %]</th>
            <th>[% loc('email') %]</th>
        </tr>
    </thead>
    <tbody>
[% WHILE (user=users.next) %]
        <tr>
            [% activeurl= c.uri_for('/.admin/update_user',  user.id , 'active') %]
            [% active=(user.active==1) ? loc('yes') : loc('no') %]
            <td><a class="activelink" href="[% activeurl %]">[% active %]</a></td>
            <td><a href="[% c.uri_for(user.link) %].profile">[% user.login %]</a></td>
            <td>[% FOR role=user.roles %] [% role.name %] [% END %]</td>
            <td>[% user.name %]</td>
            <td>
                [% IF user.email %]
                    <a href="mailto:[%user.email%]">[%user.email%]</a>
                [% ELSE %]
                    [% loc("no email address") %]
                [% END %]
            </td>
        </tr>
[% END %]
    </table>

    <p>
[% IF pager.previous_page %]
        <a href="[% c.uri_for('/.admin/user', {page => pager.previous_page}) %]">[% loc('Previous') %]</a>
[% END %]

[% IF pager.previous_page AND pager.next_page %]
|
[% END %]

[% IF pager.next_page %]
        <a href="[% c.uri_for('/.admin/user', {page => pager.next_page}) %]">[% loc('Next') %]</a>
[% END %]
    </p>

    <a href="[% c.uri_for('/.register') %]">[% loc('Add user') %]</a>
</div>
[% END # WRAPPER %]