]>
Commit | Line | Data |
---|---|---|
4aa8ba86 MG |
1 | package Gruntmaster::Page::Us; |
2 | ||
3 | use 5.014000; | |
4 | use strict; | |
5 | use warnings; | |
bb95f538 MG |
6 | use Gruntmaster::Page::Base us => 'Users'; |
7 | our @ISA = qw/Gruntmaster::Page::Base/; | |
4aa8ba86 MG |
8 | our $VERSION = '0.001'; |
9 | ||
bb95f538 | 10 | use constant TEMPLATES => { |
4aa8ba86 | 11 | en => <<'HTML', |
f7d696bc MG |
12 | <ol><tmpl_loop users><li><a href="<tmpl_var id>.var"><tmpl_var name></a> |
13 | </tmpl_loop></ol> | |
4aa8ba86 | 14 | HTML |
bb95f538 | 15 | }; |
4aa8ba86 | 16 | |
bb95f538 MG |
17 | sub _generate{ |
18 | my ($self, $htc, $path, $lang) = @_; | |
4aa8ba86 | 19 | |
f7d696bc MG |
20 | $htc->param(users => [ sort { lc $a->{name} cmp lc $b->{name} } |
21 | map { {id => $_, name => user_name} } | |
22 | grep { user_name =~ /\w/ } users ]); | |
4aa8ba86 MG |
23 | } |
24 | ||
25 | 1 |