From a33275e9ca03d1a65e58200ef960b95d1c4eb6c7 Mon Sep 17 00:00:00 2001 From: wreis Date: Tue, 31 Mar 2009 03:11:02 +0000 Subject: layout option for action_prototypes --- lib/Reaction/UI/ViewPort/Role/Actions.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/Reaction/UI/ViewPort/Role/Actions.pm') diff --git a/lib/Reaction/UI/ViewPort/Role/Actions.pm b/lib/Reaction/UI/ViewPort/Role/Actions.pm index f1f731c..6f3cd6a 100644 --- a/lib/Reaction/UI/ViewPort/Role/Actions.pm +++ b/lib/Reaction/UI/ViewPort/Role/Actions.pm @@ -49,11 +49,13 @@ sub _build_actions { my $proto = $self->action_prototypes->{$proto_name}; my $uri = $proto->{uri} or confess('uri is required in prototype action'); my $label = exists $proto->{label} ? $proto->{label} : $proto_name; + my $layout = exists $proto->{layout} ? $proto->{layout} : 'uri'; my $action = Reaction::UI::ViewPort::URI->new( location => join ('-', $loc, 'action', $i++), uri => ( ref($uri) eq 'CODE' ? $uri->($target, $ctx) : $uri ), display => ( ref($label) eq 'CODE' ? $label->($target, $ctx) : $label ), + layout => ( ref($layout) eq 'CODE' ? $layout->($target, $ctx) : $layout ), ); push(@act, $action); } -- cgit v1.2.3-54-g00ecf