aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ComponentUI/Controller/TestModel/Foo.pm
blob: b5dfe5b3878bbfa74f8949699b125d3726d23c85 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package ComponentUI::Controller::TestModel::Foo;

use base 'Reaction::UI::Controller::Collection::CRUD';
use Reaction::Class;

__PACKAGE__->config(
  model_name => 'TestModel',
  collection_name => 'Foo',
  action => {
    base => { Chained => '/base', PathPart => 'testmodel/foo' },
    list => {
      ViewPort => {
        excluded_fields => [qw/id/],
      },
    },
    view => {
      ViewPort => {
        excluded_fields => [qw/id/],
      },
    },
  },
);

for my $action (qw/view create update/){
  __PACKAGE__->config(
    action => {
      $action => {
        ViewPort => {
          container_layouts => [
            { name => 'primary', fields => [qw/first_name last_name/]},
            {
              name => 'secondary',
              label => 'Optional Label',
              fields => [qw/bars bazes/],
            },
          ],
        },
      },
    }
  );
}

1;