aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/UI/Widget/Collection/Grid/Member/WithActions.pm
blob: f9ed586387c3b735e0a4c58324d4eb704a08925f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
package Reaction::UI::Widget::Collection::Grid::Member::WithActions;

use Reaction::UI::WidgetClass;

use namespace::clean -except => [ qw(meta) ];
extends 'Reaction::UI::Widget::Collection::Grid::Member';

implements fragment actions {
  render action => over $_{viewport}->actions;
};

implements fragment action {
  render 'viewport';
};

__PACKAGE__->meta->make_immutable;

1;

__END__;

=head1 NAME

Reaction::UI::Widget::Collection::Grid::Member::WithActions - Grid members with actions

=head1 DESCRIPTION

This is a subclass of L<Reaction::UI::Widget::Grid::Member> additionally
providing actions per member.

=head1 FRAGMENTS

=head2 actions

Renders the C<action> fragment with every item in the viewports C<actions>.

=head2 action

Renders the C<viewport> fragment provided by L<Reaction::UI::Widget>, thus
rendering the current viewport stored in the C<_> topic argument provided
by the C<actions> fragment.

=head1 LAYOUT SETS

=head2 base

  share/skin/base/layout/collection/grid/member/with_actions.tt

This layout set extends the C<collection/grid/member> layout set in the parent
skin.

The following layouts are provided:

=over 4

=item field_list

First renders the original C<field_list> fragment, then the C<actions> fragment.

=item action

Simply renders the next C<action> fragment in line.

=back

=head2 default

  share/skin/default/layout/collection/grid/member/with_actions.tt

This layout skin extends the C<collection/grid/member> layout set in the parent
skin.

The following layouts are provided:

=over 4

=item field_list

The same as in the C<base> skin.

=item action

Renders the original C<action> fragment surrounded by a C<td> element.

=back

=head1 SEE ALSO

=over 4

=item * L<Reaction::UI::Widget::Grid::Member>

=item * L<Reaction::UI::Widget::Grid>

=back

=head1 AUTHORS

See L<Reaction::Class> for authors.

=head1 LICENSE

See L<Reaction::Class> for the license.

=cut