/[A3C]/lib/A3C/View/Organization.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/A3C/View/Organization.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 126 by dpavlin, Thu May 22 20:51:31 2008 UTC revision 127 by dpavlin, Sun May 25 16:43:36 2008 UTC
# Line 13  sub display_columns { Line 13  sub display_columns {
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 );
# Line 85  private template 'list_items' => sub { Line 92  private template 'list_items' => sub {
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 {
# Line 102  private template 'list_items' => sub { Line 109  private template 'list_items' => sub {
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;

Legend:
Removed from v.126  
changed lines
  Added in v.127

  ViewVC Help
Powered by ViewVC 1.1.26