big kahuna
This commit is contained in:
27
lib/CW/Template/Index.pm
Normal file
27
lib/CW/Template/Index.pm
Normal file
@@ -0,0 +1,27 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user