From a841aae8c18238dc34d87e5eda150ab2f0770475 Mon Sep 17 00:00:00 2001 From: purge Date: Thu, 17 Sep 2009 14:21:58 +0000 Subject: pass through layout_args to actions --- lib/Reaction/UI/ViewPort/Role/Actions.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/Reaction/UI/ViewPort/Role/Actions.pm b/lib/Reaction/UI/ViewPort/Role/Actions.pm index 32c7bbb..89b5ae3 100644 --- a/lib/Reaction/UI/ViewPort/Role/Actions.pm +++ b/lib/Reaction/UI/ViewPort/Role/Actions.pm @@ -62,12 +62,14 @@ sub _build_actions { 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 $layout_args = exists $proto->{layout_args} ? $proto->{layout_args} : {}; 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 ), + layout_args => ( ref($layout_args) eq 'CODE' ? $layout_args->($target, $ctx) : $layout_args ), ); push(@act, $action); } -- cgit v1.2.3-54-g00ecf