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 | |
c8fbb8ad |
6 | class ListView is 'Reaction::UI::ViewPort::Collection::Grid', which { |
7adfd53f |
7 | |
c8fbb8ad |
8 | does 'Reaction::UI::ViewPort::Collection::Role::Order'; |
9 | does 'Reaction::UI::ViewPort::Collection::Role::Pager'; |
10 | does 'Reaction::UI::ViewPort::Role::Actions'; |
b8faba69 |
11 | |
b8faba69 |
12 | #If I decide that object actions and collection actions should be |
13 | #lumped together i oculd move these into the collection action role |
14 | #ooor we could create a third role that does this, but gah, no? |
c8fbb8ad |
15 | implements _build_member_class => as { WithActions }; |
b8faba69 |
16 | |
17 | #You'se has to goes aways. sorry. |
18 | #if i saved the args as an attribute i could probably get around this.... |
19 | implements object_action_count => as { |
20 | my $self = shift; |
c8fbb8ad |
21 | for ( @{ $self->members } ) { |
b8faba69 |
22 | #pickup here, and of to the widget for listview |
23 | return scalar @{ $_->action_prototypes }; |
24 | } |
25 | }; |
7adfd53f |
26 | |
27 | }; |
28 | |
29 | 1; |