search spec components factored out of T365
[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
2f670e13 7
bae75bee 8implements fragment members {
9 render member => over $_{viewport}->members;
10};
2f670e13 11
bae75bee 12implements fragment member {
13 render 'viewport';
2f670e13 14};
15
bae75bee 16__PACKAGE__->meta->make_immutable;
17
18
2f670e13 191;
20
21__END__;
2dba7201 22
23=head1 NAME
24
f9b32c83 25Reaction::UI::Widget::Collection - Render the current viewport's member viewports
2dba7201 26
27=head1 DESCRIPTION
28
f9b32c83 29This widget will allow you to render the viewports stored in the current viewports
30C<members> attribute.
31
2dba7201 32=head1 FRAGMENTS
33
f9b32c83 34=head2 members
35
36Renders the C<member> fragment for every entry in the viewports C<members> attribute.
37
38=head2 member
39
40Renders the C<viewport> fragment, which will in turn render the C<_> argument. That
41will be one of the viewports in the current viewport's C<members> attribute when
42called from C<members>.
43
44=head1 LAYOUT SETS
45
46 share/skin/base/layout/collection.tt
47
48The following layouts are provided:
49
50=over 4
51
52=item widget
53
54Renders a C<div> element with a class attribute of C<collection_members> and the
55C<members> fragment as the content.
56
57=back
58
59=head1 SEE ALSO
60
61=over 4
62
63=item * L<Reaction::UI::Widget::Collection::Grid>
64
65=item * L<Reaction::UI::ViewPort::Collection>
66
67=back
68
2dba7201 69=head1 AUTHORS
70
71See L<Reaction::Class> for authors.
72
73=head1 LICENSE
74
75See L<Reaction::Class> for the license.
76
77=cut