Make tree browing fragment work again
[catagits/Gitalist.git] / lib / Gitalist / View / Default.pm
index 7a9b11e..4bc7be6 100644 (file)
@@ -1,35 +1,36 @@
 package Gitalist::View::Default;
 use Moose;
-use Gitalist; # ->path_to
 use namespace::autoclean;
 
 extends 'Catalyst::View::TT';
-with 'Catalyst::View::ContentNegotiation::XHTML';
+with 'Catalyst::View::Component::SubInclude';
+
+use Template::Plugin::Cycle;
+
+__PACKAGE__->config(
+  TEMPLATE_EXTENSION => '.tt2',
+  WRAPPER            => 'wrapper.tt2',
+  subinclude_plugin => 'SubRequest',
+);
+
+__PACKAGE__->meta->make_immutable(inline_constructor => 0);
+
+__END__
 
 =head1 NAME
 
-Gitalist::View::Default - Catalyst View
+Gitalist::View::Default - HTML View
 
 =head1 DESCRIPTION
 
-Catalyst View.
+HTML View.
 
-=head1 AUTHOR
+=head1 AUTHORS
 
-Dan Brook,,,
+See L<Gitalist> for authors.
 
 =head1 LICENSE
 
-This library is free software. You can redistribute it and/or modify
-it under the same terms as Perl itself.
+See L<Gitalist> for the license.
 
 =cut
-
-__PACKAGE__->config(
-       TEMPLATE_EXTENSION => '.tt2',
-       # Set the location for TT files
-       INCLUDE_PATH => [ Gitalist->path_to( 'templates' ) ],
-#      WRAPPER => 'default.tt2',
-);
-
-__PACKAGE__->meta->make_immutable(inline_constructor => 0);