Commit | Line | Data |
---|---|---|
d3feefcf | 1 | package Gitalist::View::Default; |
42fe5d11 | 2 | use Moose; |
1f9a47c2 | 3 | use Moose::Autobox; |
42fe5d11 | 4 | use namespace::autoclean; |
d3feefcf | 5 | |
42fe5d11 | 6 | extends 'Catalyst::View::TT'; |
16bdb8df | 7 | with 'Catalyst::View::Component::SubInclude'; |
d3feefcf | 8 | |
04d1d917 | 9 | use 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 | 17 | use 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 | 32 | Gitalist::View::Default - HTML View |
d3feefcf | 33 | |
34 | =head1 DESCRIPTION | |
35 | ||
775e96e0 | 36 | HTML View. |
d3feefcf | 37 | |
775e96e0 | 38 | =head1 AUTHORS |
d3feefcf | 39 | |
775e96e0 | 40 | See L<Gitalist> for authors. |
d3feefcf | 41 | |
42 | =head1 LICENSE | |
43 | ||
775e96e0 | 44 | See L<Gitalist> for the license. |
d3feefcf | 45 | |
46 | =cut |