1 package Gitalist::Controller::Fragment;
4 use namespace::autoclean;
6 BEGIN { extends 'Gitalist::Controller' }
8 sub base : Chained('/base') PathPart('fragment') CaptureArgs(0) {
10 $c->stash(no_wrapper => 1);
13 sub collectionofrepositories : Chained('base') Args(0) {
15 my @list = @{ $c->model()->repositories };
16 die 'No repositories found in '. $c->model->repo_dir
19 my $search = $c->req->param('s') || '';
22 index($_->name, $search) > -1
23 or ( $_->description !~ /^Unnamed repository/ and index($_->description, $search) > -1 )
28 repositories => \@list,
32 __PACKAGE__->meta->make_immutable;