[Jifty-commit] r2755 - in jifty/branches/template-declare: .
lib/Jifty/View/Declare lib/Jifty/Web
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Feb 6 00:26:47 EST 2007
Author: jesse
Date: Tue Feb 6 00:26:44 2007
New Revision: 2755
Modified:
jifty/branches/template-declare/ (props changed)
jifty/branches/template-declare/lib/Jifty/View/Declare/BaseClass.pm
jifty/branches/template-declare/lib/Jifty/View/Declare/CoreTemplates.pm
jifty/branches/template-declare/lib/Jifty/View/Declare/Handler.pm
jifty/branches/template-declare/lib/Jifty/View/Declare/Helpers.pm
jifty/branches/template-declare/lib/Jifty/Web/PageRegion.pm
jifty/branches/template-declare/t/Continuations/t/02-api.t
Log:
r21803 at hualien: jesse | 2007-02-06 18:20:02 +1300
* Ported to new T::D
Modified: jifty/branches/template-declare/lib/Jifty/View/Declare/BaseClass.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/View/Declare/BaseClass.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/View/Declare/BaseClass.pm Tue Feb 6 00:26:44 2007
@@ -3,7 +3,7 @@
use strict;
use warnings;
use vars qw( $r );
-use base qw/Jifty::View::Declare::Helpers/;
+use base qw/Exporter Jifty::View::Declare::Helpers/;
use Scalar::Defer;
use Template::Declare::Tags;
use Jifty::View::Declare::Helpers;
Modified: jifty/branches/template-declare/lib/Jifty/View/Declare/CoreTemplates.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/View/Declare/CoreTemplates.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/View/Declare/CoreTemplates.pm Tue Feb 6 00:26:44 2007
@@ -65,11 +65,10 @@
defined $title or return;
return if $done_header++;
- local $Template::Declare::Tags::BUFFER = '';
-
+ Template::Declare->new_buffer_frame;
render_header($title);
-
- $done_header = $Template::Declare::Tags::BUFFER;
+ $done_header = Template::Declare->buffer->data;
+ Template::Declare->end_buffer_frame;
'';
@@ -122,11 +121,9 @@
script { outs('new Jifty.Subs({}).start();') };
}
};
- outs_raw('</body></html>');
};
- $Template::Declare::Tags::BUFFER =
- $done_header . $Template::Declare::Tags::BUFFER;
+ Template::Declare->buffer->data( $done_header . Template::Declare->buffer->data);
}
template '_elements/sidebar' => sub {
@@ -1542,7 +1539,7 @@
$writer->endTag();
Jifty->handler->apache->content_type('text/xml; charset=utf-8');
- out_raws($output);
+ Jifty->web->out($output);
};
template '__jifty/webservices/yaml' => sub {
Modified: jifty/branches/template-declare/lib/Jifty/View/Declare/Handler.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/View/Declare/Handler.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/View/Declare/Handler.pm Tue Feb 6 00:26:44 2007
@@ -29,7 +29,7 @@
no warnings qw/redefine utf8/;
local *Jifty::Web::out = sub {
shift; # Turn the method into a function
- unless ( Jifty->handler->apache->http_header_sent ) {
+ unless ( Jifty->handler->apache->http_header_sent ||Jifty->web->request->is_subrequest ) {
Jifty->handler->apache->send_http_header();
}
Modified: jifty/branches/template-declare/lib/Jifty/View/Declare/Helpers.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/View/Declare/Helpers.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/View/Declare/Helpers.pm Tue Feb 6 00:26:44 2007
@@ -6,7 +6,7 @@
use Template::Declare::Tags;
use base qw/Template::Declare/;
-our @EXPORT = qw(form hyperlink tangent redirect new_action form_submit form_next_page request get set render_param current_user render_action render_region );
+our @EXPORT = (qw(form hyperlink tangent redirect new_action form_submit form_next_page request get set render_param current_user render_action render_region ), @Template::Declare::Tags::EXPORT);
{
no warnings qw/redefine/;
@@ -39,7 +39,11 @@
sub render_region(@){
unshift @_, 'name' if @_ % 2;
+ Template::Declare->new_buffer_frame;
Jifty::Web::PageRegion->new(@_)->render;
+ my $content = Template::Declare->buffer->data();
+ Template::Declare->end_buffer_frame;
+ Jifty->web->out($content);
}
sub render_action(@){
Modified: jifty/branches/template-declare/lib/Jifty/Web/PageRegion.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Web/PageRegion.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/Web/PageRegion.pm Tue Feb 6 00:26:44 2007
@@ -277,7 +277,7 @@
my $orig_out = Jifty->handler->mason->interp->out_method || \&Jifty::View::Mason::Handler::out_method;
- Jifty->handler->mason->interp->out_method($out_method);
+ # Jifty->handler->mason->interp->out_method($out_method);
# Make a fake request and throw it at the dispatcher
my $subrequest = Jifty->web->request->clone;
Modified: jifty/branches/template-declare/t/Continuations/t/02-api.t
==============================================================================
--- jifty/branches/template-declare/t/Continuations/t/02-api.t (original)
+++ jifty/branches/template-declare/t/Continuations/t/02-api.t Tue Feb 6 00:26:44 2007
@@ -33,6 +33,7 @@
#### Create and call
# Create a continuation
+diag($mech->content);
ok($mech->find_link( text => "Get help" ), "'Get Help' link exists");
$mech->follow_link_ok( text => "Get help" );
More information about the Jifty-commit
mailing list