Commit | Line | Data |
7adfd53f |
1 | package Reaction::UI::ViewPort::ListView; |
2 | |
3 | use Reaction::Class; |
b8faba69 |
4 | use aliased 'Reaction::UI::ViewPort::GridView::Entity::WithActions'; |
7adfd53f |
5 | |
e22de101 |
6 | class ListView is 'Reaction::UI::ViewPort::GridView', which { |
7adfd53f |
7 | |
b8faba69 |
8 | does 'Reaction::UI::ViewPort::GridView::Role::Order'; |
9 | does 'Reaction::UI::ViewPort::GridView::Role::Pager'; |
10 | does 'Reaction::UI::ViewPort::GridView::Role::Actions'; |
11 | |
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? |
89939ff9 |
16 | implements _build_entity_class => as { WithActions }; |
b8faba69 |
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 | implements object_action_count => as { |
21 | my $self = shift; |
22 | for ( @{ $self->entities } ) { |
23 | #pickup here, and of to the widget for listview |
24 | return scalar @{ $_->action_prototypes }; |
25 | } |
26 | }; |
7adfd53f |
27 | |
28 | }; |
29 | |
30 | 1; |