28 lines
584 B
Perl
28 lines
584 B
Perl
package CW::Template::Index;
|
|
|
|
use Moo;
|
|
|
|
extends 'CW::Template';
|
|
|
|
sub render {
|
|
my ($self) = @_;
|
|
|
|
my @boards = @{ $self->ctx->{boards} };
|
|
return [
|
|
map {
|
|
(
|
|
li => [
|
|
a => {
|
|
href => '/' . $_->{id} . '/',
|
|
class => 'index-board-link'
|
|
} => [ '/' . $_->{id} . '/ - ' . $_->{name} ],
|
|
p => { class => 'index-board-description' } =>
|
|
[ $_->{description} ]
|
|
]
|
|
)
|
|
} @boards
|
|
];
|
|
}
|
|
|
|
1;
|