do not include .git directory
[catagits/Reaction.git] / lib / Reaction / UI / Widget / Object.pm
1 package Reaction::UI::Widget::Object;
2
3 use Reaction::UI::WidgetClass;
4
5 use namespace::clean -except => [ qw(meta) ];
6
7 implements fragment container_list {
8   render container => over $_{viewport}->containers;
9 };
10
11 implements fragment container {
12   render 'viewport';
13 };
14
15 #we won't be needing these anymore
16 implements fragment field_list {
17   render field => over $_{viewport}->fields;
18 };
19
20 implements fragment field {
21   render 'viewport';
22 };
23
24 implements fragment actions {
25   render action => over $_{viewport}->actions;
26 };
27
28 implements fragment action {
29   render 'viewport';
30 };
31
32 __PACKAGE__->meta->make_immutable;
33
34 1;
35
36 __END__;
37
38 =head1 NAME
39
40 Reaction::UI::Widget::Object - Widget to implement rendering of an object
41
42 =head1 DESCRIPTION
43
44 =head1 FRAGMENTS
45
46 =head2 container_list
47
48 Sequentially renders the C<fields> of the viewport found in its C<containers>
49 method return values.
50
51 =head2 container
52
53 Renders the C<field> viewport passed by C<container_list>.
54
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
65 =head1 DEPRECATED FRAGMENTS
66
67 =head2 field_list
68
69 Sequentially renders the C<fields> of the viewport;
70
71 =head2 field
72
73 Renders the C<field> viewport passed by C<field_list>
74
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
111 =head1 AUTHORS
112
113 See L<Reaction::Class> for authors.
114
115 =head1 LICENSE
116
117 See L<Reaction::Class> for the license.
118
119 =cut