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( |
10f3d646 | 12 | TEMPLATE_EXTENSION => '.tt2', |
13 | WRAPPER => 'wrapper.tt2', | |
14 | subinclude_plugin => 'SubRequest', | |
15 | render_die => 1, | |
775e96e0 | 16 | ); |
17 | ||
1f9a47c2 | 18 | use Template::Stash; |
19 | ||
20 | # define list method to flatten arrayrefs | |
21 | $Template::Stash::LIST_OPS->{ to_path } = sub { | |
cd196b66 | 22 | my $path = join('%2F', shift->flatten, @_); |
23 | $path =~ s{/}{%2F}g; | |
24 | return $path; | |
1f9a47c2 | 25 | }; |
26 | ||
775e96e0 | 27 | __PACKAGE__->meta->make_immutable(inline_constructor => 0); |
28 | ||
29 | __END__ | |
30 | ||
d3feefcf | 31 | =head1 NAME |
32 | ||
775e96e0 | 33 | Gitalist::View::Default - HTML View |
d3feefcf | 34 | |
35 | =head1 DESCRIPTION | |
36 | ||
775e96e0 | 37 | HTML View. |
d3feefcf | 38 | |
775e96e0 | 39 | =head1 AUTHORS |
d3feefcf | 40 | |
775e96e0 | 41 | See L<Gitalist> for authors. |
d3feefcf | 42 | |
43 | =head1 LICENSE | |
44 | ||
775e96e0 | 45 | See L<Gitalist> for the license. |
d3feefcf | 46 | |
47 | =cut |