package Reaction::UI::Widget::Collection::Grid; use Reaction::UI::WidgetClass; use namespace::clean -except => [ qw(meta) ]; extends 'Reaction::UI::Widget::Collection'; implements fragment header_cells { arg 'labels' => $_{viewport}->field_labels; render header_cell => over $_{viewport}->computed_field_order; if ($_{viewport}->member_action_count) { render 'header_action_cell'; } }; implements fragment header_cell { arg label => localized $_{labels}->{$_}; }; implements fragment header_action_cell { arg col_count => $_{viewport}->member_action_count; }; __PACKAGE__->meta->make_immutable; 1; __END__; =head1 NAME Reaction::UI::Widget::Collection::Grid - A collection with header and footer =head1 DESCRIPTION This widget is a subclass of L. Additionally to its superclass, it provides abstract means of a header and a footer. =head1 FRAGMENTS =head2 header_cells Will set the C argument to the viewport's C attribute value. Afterwards, the C fragment will be rendered once for every entry in the viewport's C. Additionally, the C will be rendered when the current viewport's C is larger than 0. =head2 header_cell Populates the C