File: role.tt

package info (click to toggle)
libmojomojo-perl 1.12%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,524 kB
  • sloc: perl: 14,730; xml: 120; sh: 97; makefile: 8; ruby: 6
file content (42 lines) | stat: -rw-r--r-- 1,084 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
[%
    admin_header = 1;
    title = c.pref('name');
    selected = 'roles';
    WRAPPER page/wrapper.tt;
%]

<div id="content">
    <h1>[% loc('Roles') %]</h1>
[% IF roles.size > 0 %]
    <a href="[% c.uri_for('admin/create_role') %]">[%loc('Create a new role')%]</a>
    <table class="roles">
    <thead>
        <tr>
            <th>[%loc('ID')%]</th>
            <th>[%loc('Name')%]</th>
            <th>[%loc('Active')%]</th>
            <th></th>
        </tr>
    </thead>
    [% FOREACH role IN roles %]
    <tbody>
        <tr>
            <td>[% role.id     %]</td>
            <td>[% role.name   %]</td>
            <td>[% role.active ? loc('Yes') : loc('No') %]</td>
            <td><a href="[% c.uri_for('admin/role', role.name) %]">[%loc('Edit')%]</a></td>
        </tr>
    [% END %]
    </tbody>
    </table>
[% ELSE %]
    <div>
        [%loc('No roles created yet.')%]
        <a href="[% c.uri_for('admin/create_role') %]">[%loc('Create a new role')%]</a>
    </div>
[% END %]
    <h2>[% message %]</h2>
</div>

<div id="bottomnav">&nbsp;</div>
[% END # WRAPPER %]