X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FReaction%2FUI%2FViewPort%2FRole%2FActions.pm;h=89b5ae369a7ba610c1237957dec88befbee24049;hb=a841aae8c18238dc34d87e5eda150ab2f0770475;hp=32c7bbb2c17dbacbe760171ad1c6e59960a4621a;hpb=28d2d47d3d0780bf8a8841f6168cec263900ed8e;p=catagits%2FReaction.git 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); }