aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/UI/Widget/Collection
diff options
context:
space:
mode:
authorphaylon <phaylon@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-02-16 02:40:11 +0000
committerphaylon <phaylon@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-02-16 02:40:11 +0000
commitf9b32c83550e273bec97c9be5b63079addd4846b (patch)
treec7bdd746379aa8bb3ffd1e2500d86daf32d3b8e0 /lib/Reaction/UI/Widget/Collection
parent63bb30b44346800078dc638dcc484828d89c2ad4 (diff)
downloadreaction-f9b32c83550e273bec97c9be5b63079addd4846b.tar.gz
reaction-f9b32c83550e273bec97c9be5b63079addd4846b.zip
widget documentation
Diffstat (limited to 'lib/Reaction/UI/Widget/Collection')
-rw-r--r--lib/Reaction/UI/Widget/Collection/Grid.pm120
-rw-r--r--lib/Reaction/UI/Widget/Collection/Grid/Member.pm60
-rw-r--r--lib/Reaction/UI/Widget/Collection/Grid/Member/WithActions.pm69
3 files changed, 246 insertions, 3 deletions
diff --git a/lib/Reaction/UI/Widget/Collection/Grid.pm b/lib/Reaction/UI/Widget/Collection/Grid.pm
index 823afc6..2856793 100644
--- a/lib/Reaction/UI/Widget/Collection/Grid.pm
+++ b/lib/Reaction/UI/Widget/Collection/Grid.pm
@@ -29,12 +29,130 @@ __END__;
=head1 NAME
-Reaction::UI::Widget::Grid
+Reaction::UI::Widget::Grid - A collection with header and footer
=head1 DESCRIPTION
+This widget is a subclass of L<Reaction::UI::Widget::Collection>. Additionally
+to its superclass, it provides abstract means of a header and a footer.
+
=head1 FRAGMENTS
+=head2 header_cells
+
+Will set the C<labels> argument to the viewport's C<field_labels> attribute
+value.
+
+Afterwards, the C<header_cell> fragment will be rendered once for every entry
+in the viewport's C<computed_field_order>.
+
+Additionally, the C<header_action_cell> will be rendered when the current
+viewport's C<member_action_count> is larger than 0.
+
+=head2 header_cell
+
+Populates the C<label> argument with a localised value of the C<labels>
+hash reference argument. The used key is extracted from the C<_> topic
+argument.
+
+=head2 header_action_cell
+
+Populates the C<col_count> argument with the viewports C<member_action_count>
+attribute value.
+
+=head1 LAYOUT SETS
+
+=head2 base
+
+ share/skin/base/layout/collection/grid.tt
+
+The base grid layout set does not provide an markup, just abstract layouting.
+
+The following layouts are provided:
+
+=over 4
+
+=item widget
+
+Renders, in sequence, the C<header>, C<body> and C<footer> fragments.
+
+=item header
+
+Renders the C<header_row> fragment.
+
+=item header_row
+
+Renders the C<header_cells> fragment.
+
+=item header_cell
+
+Renders the C<header_cell_contents> fragment.
+
+=item header_cell_contents
+
+Renders the value of the C<label> argument.
+
+=item header_action_cell
+
+Renders the string C<Actions>.
+
+=item body
+
+Renders the C<members> fragment implemented in L<Reaction::UI::Widget::Collection>.
+
+=back
+
+=head2 default
+
+ share/skin/default/layout/collection/grid.tt
+
+This layout set extends the C<NEXT> in the skin inheritance hierarchy.
+
+It is meant to extend upon the layout set with the same name in the C<base> skin and
+provides the same abstract structure but with a table based markup.
+
+The following layouts are provided:
+
+=over 4
+
+=item widget
+
+Renders the next skin's C<widget> fragment surrounded by a C<table> element with the
+class attribute C<grid>.
+
+=item header
+
+Renders the next skin's C<header> fragment surrounded by a C<thead> element.
+
+=item header_row
+
+Wrap's the next skin's C<header_row> fragment in a C<tr> element.
+
+=item header_cell
+
+Wrap's the next skin's C<header_cell> fragment in a C<th> element.
+
+=item header_action_cell
+
+Wrap's the next skin's C<header_action_cell> fragment in a C<th> element with a C<colspan>
+attribute set to the number of actions found in the C<col_count> attribute
+
+=item body
+
+Wrap's the next skin's C<body> fragment in a C<tbody> element.
+
+=back
+
+=head1 SEE ALSO
+
+=over 4
+
+=item * L<Reaction::UI::Widget::Collection>
+
+=item * L<Reaction::UI::Widget::Collection::Grid::Member>
+
+=back
+
=head1 AUTHORS
See L<Reaction::Class> for authors.
diff --git a/lib/Reaction/UI/Widget/Collection/Grid/Member.pm b/lib/Reaction/UI/Widget/Collection/Grid/Member.pm
index 19c355a..24168a6 100644
--- a/lib/Reaction/UI/Widget/Collection/Grid/Member.pm
+++ b/lib/Reaction/UI/Widget/Collection/Grid/Member.pm
@@ -13,12 +13,70 @@ __END__;
=head1 NAME
-Reaction::UI::Widget::Collection::Grid::Member
+Reaction::UI::Widget::Collection::Grid::Member - A member widget of the Grid widget
=head1 DESCRIPTION
+A pure subclass of L<Reaction::UI::Widget::Object> representing a member
+in a L<Reaction::UI::Widget::Collection::Grid>.
+
=head1 FRAGMENTS
+This widget defines no additional fragments.
+
+=head1 LAYOUT SETS
+
+=head2 base
+
+ share/skin/base/layout/collection/grid/member.tt
+
+The following layouts are provided:
+
+=over 4
+
+=item widget
+
+Renders the C<field_list> fragment provided initially by L<Reaction::UI::Widget::Object>.
+
+=item field
+
+Renders the next C<field> fragment in the inheritance hierarchy.
+
+=back
+
+=head2 default
+
+ share/skin/default/layout/collection/grid/member.tt
+
+This layout set extends the C<NEXT> skin in the inheritance hierarchy.
+
+Like with L<Reaction::UI::Widget::Collection::Grid>, the C<default> layout set provides
+a table based markup for the abstract view logic defined in the C<base> skin.
+
+The following layouts are provided:
+
+=over 4
+
+=item widget
+
+Renders the next C<widget> fragment surrounded by a C<tr> element.
+
+=item field
+
+Renders the next C<field> fragment surrounded by a C<td> element.
+
+=back
+
+=head1 SEE ALSO
+
+=over 4
+
+=item * L<Reaction::UI::Widget::Collection::Grid>
+
+=item * L<Reaction::UI::Widget::Collection::Grid::Member::WithActions>
+
+=back
+
=head1 AUTHORS
See L<Reaction::Class> for authors.
diff --git a/lib/Reaction/UI/Widget/Collection/Grid/Member/WithActions.pm b/lib/Reaction/UI/Widget/Collection/Grid/Member/WithActions.pm
index 156f216..f3b4454 100644
--- a/lib/Reaction/UI/Widget/Collection/Grid/Member/WithActions.pm
+++ b/lib/Reaction/UI/Widget/Collection/Grid/Member/WithActions.pm
@@ -21,12 +21,79 @@ __END__;
=head1 NAME
-Reaction::UI::Widget::Grid::Member::WithActions
+Reaction::UI::Widget::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.