X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FReaction%2FUI%2FWidget%2FCollection.pm;h=e991c4c6d2b678deabf3256528191d19dde3464b;hb=dfed49732b9c4594f104d4fc074c421fc8e7df4c;hp=65e9d641eca3446403ca35a2149bee5c7ed97b2b;hpb=2f670e13aa8f30bbf6ba910f2d8ef97aa8a9e3e5;p=catagits%2FReaction.git diff --git a/lib/Reaction/UI/Widget/Collection.pm b/lib/Reaction/UI/Widget/Collection.pm index 65e9d64..e991c4c 100644 --- a/lib/Reaction/UI/Widget/Collection.pm +++ b/lib/Reaction/UI/Widget/Collection.pm @@ -2,18 +2,76 @@ package Reaction::UI::Widget::Collection; use Reaction::UI::WidgetClass; -class Collection, which { +use namespace::clean -except => [ qw(meta) ]; - implements fragment members { - render member => over $_{viewport}->members; - }; - implements fragment member { - render 'viewport'; - }; +implements fragment members { + render member => over $_{viewport}->members; +}; +implements fragment member { + render 'viewport'; }; +__PACKAGE__->meta->make_immutable; + + 1; __END__; + +=head1 NAME + +Reaction::UI::Widget::Collection - Render the current viewport's member viewports + +=head1 DESCRIPTION + +This widget will allow you to render the viewports stored in the current viewports +C attribute. + +=head1 FRAGMENTS + +=head2 members + +Renders the C fragment for every entry in the viewports C attribute. + +=head2 member + +Renders the C fragment, which will in turn render the C<_> argument. That +will be one of the viewports in the current viewport's C attribute when +called from C. + +=head1 LAYOUT SETS + + share/skin/base/layout/collection.tt + +The following layouts are provided: + +=over 4 + +=item widget + +Renders a C
element with a class attribute of C and the +C fragment as the content. + +=back + +=head1 SEE ALSO + +=over 4 + +=item * L + +=item * L + +=back + +=head1 AUTHORS + +See L for authors. + +=head1 LICENSE + +See L for the license. + +=cut