added localization to core widgets
[catagits/Reaction.git] / lib / Reaction / UI / Widget / Value / Collection.pm
CommitLineData
e22de101 1package Reaction::UI::Widget::Value::Collection;
2
3use Reaction::UI::WidgetClass;
4
bae75bee 5use namespace::clean -except => [ qw(meta) ];
aa8c0c90 6
aa8c0c90 7
bae75bee 8before fragment widget {
d219104c 9 arg 'label' => localized $_{viewport}->label;
bae75bee 10};
aa8c0c90 11
bae75bee 12implements fragment list {
13 render 'item' => over $_{viewport}->value_names;
14};
aa8c0c90 15
bae75bee 16implements fragment item {
d219104c 17 arg 'name' => localized $_;
e22de101 18};
19
bae75bee 20__PACKAGE__->meta->make_immutable;
21
22
e22de101 231;
24
25__END__;
26
27
28=head1 NAME
29
30Reaction::UI::Widget::Value::Collection
31
32=head1 DESCRIPTION
33
34=head1 FRAGMENTS
35
36=head2 widget
37
38renders C<label> and C<list> passing additional variable "viewport"
39
40=head2 list
41
42renders fragment item over the viewport's C<value_names>
43
44=head2 item
45
46C<content> contains the value of the current item ($_ / $_{_})
47
48=head1 AUTHORS
49
50See L<Reaction::Class> for authors.
51
52=head1 LICENSE
53
54See L<Reaction::Class> for the license.
55
56=cut