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