Commit | Line | Data |
---|---|---|
2f670e13 | 1 | package Reaction::UI::Widget::Object; |
7b78a39d | 2 | |
3 | use Reaction::UI::WidgetClass; | |
4 | ||
bae75bee | 5 | use namespace::clean -except => [ qw(meta) ]; |
d7b00a50 | 6 | |
599c1172 | 7 | implements fragment container_list { |
8 | render container => over $_{viewport}->containers; | |
9 | }; | |
10 | ||
11 | implements fragment container { | |
12 | render 'viewport'; | |
13 | }; | |
d7b00a50 | 14 | |
599c1172 | 15 | #we won't be needing these anymore |
bae75bee | 16 | implements fragment field_list { |
17 | render field => over $_{viewport}->fields; | |
18 | }; | |
d7b00a50 | 19 | |
bae75bee | 20 | implements fragment field { |
21 | render 'viewport'; | |
7b78a39d | 22 | }; |
23 | ||
d738d11f | 24 | implements fragment actions { |
25 | render action => over $_{viewport}->actions; | |
26 | }; | |
27 | ||
28 | implements fragment action { | |
29 | render 'viewport'; | |
30 | }; | |
31 | ||
bae75bee | 32 | __PACKAGE__->meta->make_immutable; |
33 | ||
7b78a39d | 34 | 1; |
35 | ||
36 | __END__; | |
37 | ||
5a1a893e | 38 | =head1 NAME |
7b78a39d | 39 | |
f9b32c83 | 40 | Reaction::UI::Widget::Object - Widget to implement rendering of an object |
7b78a39d | 41 | |
5a1a893e | 42 | =head1 DESCRIPTION |
43 | ||
44 | =head1 FRAGMENTS | |
45 | ||
599c1172 | 46 | =head2 container_list |
47 | ||
f9b32c83 | 48 | Sequentially renders the C<fields> of the viewport found in its C<containers> |
49 | method return values. | |
599c1172 | 50 | |
51 | =head2 container | |
52 | ||
f9b32c83 | 53 | Renders the C<field> viewport passed by C<container_list>. |
599c1172 | 54 | |
d738d11f | 55 | =head2 actions |
56 | ||
57 | Renders the C<action> fragment with every item in the viewports C<actions>. | |
58 | ||
59 | =head2 action | |
60 | ||
61 | Renders the C<viewport> fragment provided by L<Reaction::UI::Widget>, thus | |
62 | rendering the current viewport stored in the C<_> topic argument provided | |
63 | by the C<actions> fragment. | |
64 | ||
599c1172 | 65 | =head1 DEPRECATED FRAGMENTS |
66 | ||
6bc27bd3 | 67 | =head2 field_list |
5a1a893e | 68 | |
599c1172 | 69 | Sequentially renders the C<fields> of the viewport; |
5a1a893e | 70 | |
49170400 | 71 | =head2 field |
72 | ||
73 | Renders the C<field> viewport passed by C<field_list> | |
74 | ||
f9b32c83 | 75 | =head1 LAYOUT SETS |
76 | ||
77 | =head2 base | |
78 | ||
79 | share/skin/base/layout/object.tt | |
80 | ||
81 | The following layouts are provided: | |
82 | ||
83 | =over 4 | |
84 | ||
85 | =item widget | |
86 | ||
87 | Renders the C<container_list> fragment. | |
88 | ||
89 | =item container | |
90 | ||
91 | Renders the container viewport. | |
92 | ||
93 | =back | |
94 | ||
95 | =head2 default | |
96 | ||
97 | share/skin/default/layout/object.tt | |
98 | ||
99 | This layout set inherits from the one with the same name in the C<base> skin. | |
100 | ||
101 | The following layouts are provided: | |
102 | ||
103 | =over 4 | |
104 | ||
105 | =item container | |
106 | ||
107 | Renders the container viewport. | |
108 | ||
109 | =back | |
110 | ||
5a1a893e | 111 | =head1 AUTHORS |
112 | ||
113 | See L<Reaction::Class> for authors. | |
114 | ||
115 | =head1 LICENSE | |
116 | ||
117 | See L<Reaction::Class> for the license. | |
7b78a39d | 118 | |
119 | =cut |