use base 'Reaction::UI::Controller';
use Reaction::Class;
-use aliased 'Reaction::UI::ViewPort::ListView';
+use aliased 'Reaction::UI::ViewPort::Collection::Grid';
use aliased 'Reaction::UI::ViewPort::Object';
has 'model_name' => (isa => 'Str', is => 'rw', required => 1);
sub _build_action_viewport_map {
return {
- list => ListView,
+ list => Grid,
view => Object,
};
}
use Reaction::Class;
use aliased 'Reaction::UI::ViewPort::Action';
+use aliased 'Reaction::UI::ViewPort::ListView';
sub _build_action_viewport_map {
my $map = shift->next::method(@_);
+ $map->{list} = ListView;
$map->{$_} = Action for qw/create update delete delete_all/;
return $map;
}
arg pager_obj => $_{viewport}->pager;
};
+ implements fragment pager_fragment {
+ my $pager = $_{pager_obj};
+ if( $pager->last_page > $pager->first_page ) {
+ render 'pager';
+ }
+ };
+
implements fragment actions {
render action => over $_{viewport}->actions;
};
=for layout widget
-[% pager %]
+[% pager_fragment %]
[% call_next %]
-[% pager %]
+[% pager_fragment %]
[% actions %]