Added badges to users and pagination

This commit is contained in:
Tom Bloor 2017-11-20 13:26:52 +00:00
parent bccb292441
commit 9aaf3b4718
No known key found for this signature in database
GPG key ID: 4657C7EBE42CC5CC
2 changed files with 32 additions and 7 deletions

View file

@ -22,9 +22,15 @@ has organisation_result_set => sub {
sub index {
my $c = shift;
my $user_rs = $c->user_result_set;
$user_rs->result_class('DBIx::Class::ResultClass::HashRefInflator');
$c->stash( users => [ $user_rs->all ] );
my $user_rs = $c->user_result_set->search(
undef, {
prefech => { entity => [ qw/ customer organisation / ] },
page => $c->param('page') || 1,
rows => 10,
order_by => { -asc => 'email' },
}
);
$c->stash( user_rs => $user_rs );
}
sub read {