13 |
'o', |
'o', |
14 |
'cn', |
'cn', |
15 |
'hrEduOrgUniqueNumber', |
'hrEduOrgUniqueNumber', |
16 |
'hrEduOrgType', |
# 'hrEduOrgType', |
17 |
'postalAddress', |
'postalAddress', |
18 |
'l', |
'l', |
19 |
); |
); |
20 |
} |
} |
21 |
|
|
22 |
|
sub create_columns { |
23 |
|
my $self = shift; |
24 |
|
my $action = shift; |
25 |
|
return $action->argument_names; |
26 |
|
#return grep { !( m/_confirm/ || $action->arguments->{$_}{unreadable} ) } $action->argument_names; |
27 |
|
} |
28 |
|
|
29 |
template 'search' => sub { |
template 'search' => sub { |
30 |
my $self = shift; |
my $self = shift; |
31 |
my ($object_type) = ( $self->object_type ); |
my ($object_type) = ( $self->object_type ); |
92 |
} $o->columns; |
} $o->columns; |
93 |
#warn "# name2label = ",dump( $name2label ); |
#warn "# name2label = ",dump( $name2label ); |
94 |
|
|
95 |
div { _('Found %1 results', $collection->pager->total_entries ) } |
div { class is 'note message'; _('Found %1 results', $collection->pager->total_entries ) } |
96 |
table { |
table { |
97 |
{ class is 'list' }; |
{ class is 'list' }; |
98 |
row { |
row { |
109 |
|
|
110 |
sub per_page { 10 } |
sub per_page { 10 } |
111 |
|
|
112 |
|
# in Jifty's template, it's included on bottom of list |
113 |
|
template 'new' => page { |
114 |
|
my $self = shift; |
115 |
|
|
116 |
|
title is $self->object_type; |
117 |
|
|
118 |
|
my $record_class = $self->record_class; |
119 |
|
my $action = $record_class->as_create_action; |
120 |
|
|
121 |
|
warn "action = ",dump( $action ); |
122 |
|
|
123 |
|
form { |
124 |
|
{ class is 'crud create item' }; |
125 |
|
foreach my $field ($self->create_columns($action)) { |
126 |
|
render_param($action, $field) ; |
127 |
|
} |
128 |
|
form_submit( label => _('Create') ); |
129 |
|
} |
130 |
|
|
131 |
|
}; |
132 |
|
|
133 |
1; |
1; |