do not include .git directory
[catagits/Reaction.git] / lib / Reaction / UI / Widget / Collection.pm
CommitLineData
2f670e13 1package Reaction::UI::Widget::Collection;
2
3use Reaction::UI::WidgetClass;
4
bae75bee 5use namespace::clean -except => [ qw(meta) ];
2f670e13 6
bae75bee 7implements fragment members {
8 render member => over $_{viewport}->members;
9};
2f670e13 10
bae75bee 11implements fragment member {
12 render 'viewport';
2f670e13 13};
14
372fcc32 15implements fragment actions {
16 render action => over $_{viewport}->actions;
17};
18
19implements fragment action {
20 render 'viewport';
21};
22
bae75bee 23__PACKAGE__->meta->make_immutable;
24
25
2f670e13 261;
27
28__END__;
2dba7201 29
30=head1 NAME
31
f9b32c83 32Reaction::UI::Widget::Collection - Render the current viewport's member viewports
2dba7201 33
34=head1 DESCRIPTION
35
f9b32c83 36This widget will allow you to render the viewports stored in the current viewports
37C<members> attribute.
38
2dba7201 39=head1 FRAGMENTS
40
f9b32c83 41=head2 members
42
43Renders the C<member> fragment for every entry in the viewports C<members> attribute.
44
45=head2 member
46
47Renders the C<viewport> fragment, which will in turn render the C<_> argument. That
48will be one of the viewports in the current viewport's C<members> attribute when
49called from C<members>.
50
51=head1 LAYOUT SETS
52
53 share/skin/base/layout/collection.tt
54
55The following layouts are provided:
56
57=over 4
58
59=item widget
60
61Renders a C<div> element with a class attribute of C<collection_members> and the
62C<members> fragment as the content.
63
64=back
65
66=head1 SEE ALSO
67
68=over 4
69
70=item * L<Reaction::UI::Widget::Collection::Grid>
71
72=item * L<Reaction::UI::ViewPort::Collection>
73
74=back
75
2dba7201 76=head1 AUTHORS
77
78See L<Reaction::Class> for authors.
79
80=head1 LICENSE
81
82See L<Reaction::Class> for the license.
83
84=cut