Skip Menu |

This queue is for tickets about the Maypole-FormBuilder CPAN distribution.

Report information
The Basics
Id: 13771
Status: resolved
Priority: 0/
Queue: Maypole-FormBuilder

People
Owner: Nobody in particular
Requestors: dave [...] riverside-cms.co.uk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: TT templates
Need to add the TT templates built by Ron McClain
From: Ron McClain
[guest - Tue Jul 19 06:39:29 2005]: Show quoted text
> Need to add the TT templates built by Ron McClain
I'll send you the latest version of the templates tomorrow. One thing I'd like if possible would be to refactor FormBuilder and QuickTable public methods to accept arguments TT style. When you pass in named arguments with TT like [% func(arg1, foo = 'bar', boo = 'baz') %], it collects all the named arguments in a hashref and passes it as the last argument to foo like so: foo(arg1, { foo => 'bar', boo => 'baz' }); I don't know if that's doable without breaking BC, or if you even care about BC at this point. I can live without this.. it just makes templates ugly. I currently have to call something like func above as func(arg1, 'foo', 'bar', 'boo', 'baz') with no arrows.
From: Ron McClain
[guest - Wed Jul 20 06:09:47 2005]: Here are the templates. Had to remove all the stuff I had in them to work well with M:P:Authorize. I tested the changes only slightly but all seems ok. Also note, TT users must bless an object called mclass into $request->model_class and add it to the template vars in additional_data(). This is to make moniker work, which will always return Proxy if if you do [% mclass = Class(request.model_class) %] because Class creates a Proxy object around the model class. Lame-o-rama. Show quoted text
> [guest - Tue Jul 19 06:39:29 2005]: >
> > Need to add the TT templates built by Ron McClain
> > I'll send you the latest version of the templates tomorrow. One thing > I'd like if possible would be to refactor FormBuilder and QuickTable > public methods to accept arguments TT style. When you pass in named > arguments with TT like [% func(arg1, foo = 'bar', boo = 'baz') %], it > collects all the named arguments in a hashref and passes it as the > last > argument to foo like so: > foo(arg1, { foo => 'bar', boo => 'baz' }); > > I don't know if that's doable without breaking BC, or if you even care > about BC at this point. I can live without this.. it just makes > templates ugly. I currently have to call something like func above as > func(arg1, 'foo', 'bar', 'boo', 'baz') with no arrows. >
Download templates.tgz
application/x-gzip 5.1k

Message body not shown because it is not plain text.

[guest - Wed Jul 20 15:37:12 2005]: Show quoted text
> [guest - Wed Jul 20 06:09:47 2005]: > Here are the templates. Had to remove all the stuff I had in them to > work well with M:P:Authorize. I tested the changes only slightly but > all seems ok. > Also note, TT users must bless an object called mclass into > $request->model_class and add it to the template vars in > additional_data(). > This is to make moniker work, which will always return Proxy if if you > do [% mclass = Class(request.model_class) %] because Class creates a > Proxy object around the model class. Lame-o-rama. > > >
> > [guest - Tue Jul 19 06:39:29 2005]: > >
> > > Need to add the TT templates built by Ron McClain
> > > > I'll send you the latest version of the templates tomorrow. One
> thing
> > I'd like if possible would be to refactor FormBuilder and QuickTable > > public methods to accept arguments TT style. When you pass in named > > arguments with TT like [% func(arg1, foo = 'bar', boo = 'baz') %],
> it
> > collects all the named arguments in a hashref and passes it as the > > last > > argument to foo like so: > > foo(arg1, { foo => 'bar', boo => 'baz' }); > > > > I don't know if that's doable without breaking BC, or if you even
> care
> > about BC at this point. I can live without this.. it just makes > > templates ugly. I currently have to call something like func above
> as
> > func(arg1, 'foo', 'bar', 'boo', 'baz') with no arrows. > >
> >
TT templates included in 0.27 - thanks!
[DAVEBAIRD - Thu Jul 21 15:16:51 2005]: I apparently uploaded a messed up view template. Here's a good one. Another one where I tried to pass in key value pairs to a method.
Download view
application/octet-stream 669b

Message body not shown because it is not plain text.

From: Ron McClain
That's me btw ;) oops
[guest - Sun Jul 24 16:45:32 2005]: Show quoted text
> [DAVEBAIRD - Thu Jul 21 15:16:51 2005]: > > I apparently uploaded a messed up view template. > > Here's a good one. Another one where I tried to pass in key value pairs > to a method. > > >
Thanks, it's in 0.301 By the way, I made some significant modifications to the templates in 0.3, you might take a look at that (see the Changes file for details). d.