widget documentation
[catagits/Reaction.git] / lib / Reaction / UI / Widget / Collection / Grid / Member / WithActions.pm
1 package Reaction::UI::Widget::Collection::Grid::Member::WithActions;
2
3 use Reaction::UI::WidgetClass;
4
5 use namespace::clean -except => [ qw(meta) ];
6 extends 'Reaction::UI::Widget::Collection::Grid::Member';
7
8 implements fragment actions {
9   render action => over $_{viewport}->actions;
10 };
11
12 implements fragment action {
13   render 'viewport';
14 };
15
16 __PACKAGE__->meta->make_immutable;
17
18 1;
19
20 __END__;
21
22 =head1 NAME
23
24 Reaction::UI::Widget::Grid::Member::WithActions - Grid members with actions
25
26 =head1 DESCRIPTION
27
28 This is a subclass of L<Reaction::UI::Widget::Grid::Member> additionally
29 providing actions per member.
30
31 =head1 FRAGMENTS
32
33 =head2 actions
34
35 Renders the C<action> fragment with every item in the viewports C<actions>.
36
37 =head2 action
38
39 Renders the C<viewport> fragment provided by L<Reaction::UI::Widget>, thus
40 rendering the current viewport stored in the C<_> topic argument provided
41 by the C<actions> fragment.
42
43 =head1 LAYOUT SETS
44
45 =head2 base
46
47   share/skin/base/layout/collection/grid/member/with_actions.tt
48
49 This layout set extends the C<collection/grid/member> layout set in the parent
50 skin.
51
52 The following layouts are provided:
53
54 =over 4
55
56 =item field_list
57
58 First renders the original C<field_list> fragment, then the C<actions> fragment.
59
60 =item action
61
62 Simply renders the next C<action> fragment in line.
63
64 =back
65
66 =head2 default
67
68   share/skin/default/layout/collection/grid/member/with_actions.tt
69
70 This layout skin extends the C<collection/grid/member> layout set in the parent
71 skin.
72
73 The following layouts are provided:
74
75 =over 4
76
77 =item field_list
78
79 The same as in the C<base> skin.
80
81 =item action
82
83 Renders the original C<action> fragment surrounded by a C<td> element.
84
85 =back
86
87 =head1 SEE ALSO
88
89 =over 4
90
91 =item * L<Reaction::UI::Widget::Grid::Member>
92
93 =item * L<Reaction::UI::Widget::Grid>
94
95 =back
96
97 =head1 AUTHORS
98
99 See L<Reaction::Class> for authors.
100
101 =head1 LICENSE
102
103 See L<Reaction::Class> for the license.
104
105 =cut