Commit | Line | Data |
7adfd53f |
1 | package Reaction::UI::ViewPort::ListView; |
2 | |
3 | use Reaction::Class; |
c8fbb8ad |
4 | use aliased 'Reaction::UI::ViewPort::Collection::Grid::Member::WithActions'; |
7adfd53f |
5 | |
81393881 |
6 | use namespace::clean -except => [ qw(meta) ]; |
7 | extends 'Reaction::UI::ViewPort::Collection::Grid'; |
7adfd53f |
8 | |
81393881 |
9 | with 'Reaction::UI::ViewPort::Collection::Role::Order'; |
10 | with 'Reaction::UI::ViewPort::Collection::Role::Pager'; |
11 | with 'Reaction::UI::ViewPort::Role::Actions'; |
12 | |
13 | #If I decide that object actions and collection actions should be |
14 | #lumped together i oculd move these into the collection action role |
15 | #ooor we could create a third role that does this, but gah, no? |
16 | sub _build_member_class { WithActions }; |
17 | |
18 | #You'se has to goes aways. sorry. |
19 | #if i saved the args as an attribute i could probably get around this.... |
20 | sub object_action_count { |
21 | my $self = shift; |
22 | for ( @{ $self->members } ) { |
23 | #pickup here, and of to the widget for listview |
24 | return scalar @{ $_->action_prototypes }; |
25 | } |
7adfd53f |
26 | }; |
27 | |
81393881 |
28 | __PACKAGE__->meta->make_immutable; |
29 | |
30 | |
7adfd53f |
31 | 1; |