use MooseX::Types::Common and MooseX::Types::DateTime
[catagits/Reaction.git] / lib / Reaction / UI / ViewPort / Collection / Grid / Member.pm
1 package Reaction::UI::ViewPort::Collection::Grid::Member;
2
3 use Reaction::Class;
4
5 use namespace::clean -except => [ qw(meta) ];
6 extends 'Reaction::UI::ViewPort::Object';
7
8 around _build_fields_for_type_Num => sub {
9   $_[0]->(@_[1,2], { layout => 'value/number', %{ $_[3] || {}} })
10 };
11
12 around _build_fields_for_type_Int => sub {
13   $_[0]->(@_[1,2], { layout => 'value/number', %{ $_[3] || {} } })
14 };
15
16 around _build_fields_for_type_Bool => sub {
17   $_[0]->(@_[1,2], { layout => 'value/boolean', %{ $_[3] || {} } })
18 };
19
20 around _build_fields_for_type_Enum => sub {
21   $_[0]->(@_[1,2], { layout => 'value/string', %{ $_[3] || {} } })
22 };
23
24 around _build_fields_for_type_Str => sub {
25   $_[0]->(@_[1,2], { layout => 'value/string', %{ $_[3] || {} } })
26 };
27
28 around _build_fields_for_type_Reaction_Types_Core_SimpleStr => sub {
29   $_[0]->(@_[1,2], { layout => 'value/string', %{ $_[3] || {} } })
30 };
31
32 around _build_fields_for_type_Reaction_InterfaceModel_Object => sub {
33   $_[0]->(@_[1,2], { layout => 'value/related_object', %{ $_[3] || {} } })
34 };
35
36 around _build_fields_for_type_Reaction_Types_DateTime_DateTime => sub {
37   $_[0]->(@_[1,2], { layout => 'value/date_time', %{ $_[3] || {} } })
38 };
39
40 around _build_fields_for_type_Reaction_Types_Core_Password => sub { return };
41 around _build_fields_for_type_ArrayRef => sub { return };
42 around _build_fields_for_type_Reaction_InterfaceModel_Collection => sub { return };
43
44 #The types we'll be using going forward ...
45 around _build_fields_for_type_MooseX_Types_Common_String_Password => sub { return };
46 around _build_fields_for_type_MooseX_Types_Common_String_SimpleStr => sub {
47   $_[0]->(@_[1,2], { layout => 'value/string', %{ $_[3] || {} } })
48 };
49 around _build_fields_for_type_MooseX_Types_DateTime_DateTime => sub {
50   $_[0]->(@_[1,2], { layout => 'value/date_time', %{ $_[3] || {} } })
51 };
52 around _build_fields_for_type_DateTime => sub {
53   $_[0]->(@_[1,2], { layout => 'value/date_time', %{ $_[3] || {} } })
54 };
55
56
57 __PACKAGE__->meta->make_immutable;
58
59
60 1;