package Gruntmaster::Page::Us;

use 5.014000;
use strict;
use warnings;
use Gruntmaster::Page::Base us => 'Users';
our @ISA = qw/Gruntmaster::Page::Base/;
our $VERSION = '0.001';

use constant TEMPLATES => {
	en => <<'HTML',
<div class="list-group"><tmpl_loop users><a class="list-group-item" href="<tmpl_var id>"><tmpl_var name></a>
</tmpl_loop></ol>
HTML
};

sub _generate{
	my ($self, $htc, $lang, $env) = @_;
	debug $env => "language is '$lang'";

	$htc->param(users => [ sort { lc $a->{name} cmp lc $b->{name} }
							 map { {id => $_, name => user_name} }
							   grep { user_name =~ /\w/ } users ]);
}

1
