Merge remote branch 'shadowcat/master' into sc
[catagits/Gitalist.git] / lib / Gitalist / View / Default.pm
CommitLineData
d3feefcf 1package Gitalist::View::Default;
42fe5d11 2use Moose;
1f9a47c2 3use Moose::Autobox;
42fe5d11 4use namespace::autoclean;
d3feefcf 5
42fe5d11 6extends 'Catalyst::View::TT';
16bdb8df 7with 'Catalyst::View::Component::SubInclude';
d3feefcf 8
04d1d917 9use Template::Plugin::Cycle;
10
775e96e0 11__PACKAGE__->config(
12 TEMPLATE_EXTENSION => '.tt2',
7e8a7295 13 WRAPPER => 'wrapper.tt2',
16bdb8df 14 subinclude_plugin => 'SubRequest',
775e96e0 15);
16
1f9a47c2 17use Template::Stash;
18
19# define list method to flatten arrayrefs
20$Template::Stash::LIST_OPS->{ to_path } = sub {
cd196b66 21 my $path = join('%2F', shift->flatten, @_);
22 $path =~ s{/}{%2F}g;
23 return $path;
1f9a47c2 24};
25
775e96e0 26__PACKAGE__->meta->make_immutable(inline_constructor => 0);
27
28__END__
29
d3feefcf 30=head1 NAME
31
775e96e0 32Gitalist::View::Default - HTML View
d3feefcf 33
34=head1 DESCRIPTION
35
775e96e0 36HTML View.
d3feefcf 37
775e96e0 38=head1 AUTHORS
d3feefcf 39
775e96e0 40See L<Gitalist> for authors.
d3feefcf 41
42=head1 LICENSE
43
775e96e0 44See L<Gitalist> for the license.
d3feefcf 45
46=cut