]> iEval git - plack-app-gruntmaster.git/blame - lib/Gruntmaster/Page/Us.pm
Modernize templates
[plack-app-gruntmaster.git] / lib / Gruntmaster / Page / Us.pm
CommitLineData
4aa8ba86
MG
1package Gruntmaster::Page::Us;
2
3use 5.014000;
4use strict;
5use warnings;
bb95f538
MG
6use Gruntmaster::Page::Base us => 'Users';
7our @ISA = qw/Gruntmaster::Page::Base/;
4aa8ba86
MG
8our $VERSION = '0.001';
9
bb95f538 10use constant TEMPLATES => {
4aa8ba86 11 en => <<'HTML',
a94f8453 12<div class="list-group"><tmpl_loop users><a class="list-group-item" href="<tmpl_var id>"><tmpl_var name></a>
f7d696bc 13</tmpl_loop></ol>
4aa8ba86 14HTML
bb95f538 15};
4aa8ba86 16
bb95f538 17sub _generate{
7dc32473
MG
18 my ($self, $htc, $lang, $logger) = @_;
19 debug $logger => "language is '$lang'";
4aa8ba86 20
f7d696bc
MG
21 $htc->param(users => [ sort { lc $a->{name} cmp lc $b->{name} }
22 map { {id => $_, name => user_name} }
23 grep { user_name =~ /\w/ } users ]);
4aa8ba86
MG
24}
25
261
This page took 0.027837 seconds and 4 git commands to generate.