/[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 131 by dpavlin, Mon May 26 18:12:15 2008 UTC revision 138 by dpavlin, Fri May 30 21:02:04 2008 UTC
# Line 1  Line 1 
1  package A3C::View::Organization;  package A3C::View::Organization;
2    
3    =head1 NAME
4    
5    A3C::View::Organization
6    
7    =head1 DESCRIPTION
8    
9    Provide search and display form using table
10    
11    =cut
12    
13  use strict;  use strict;
14  use warnings;  use warnings;
15    
# Line 109  private template 'list_items' => sub { Line 119  private template 'list_items' => sub {
119    
120  sub per_page { 10 }  sub per_page { 10 }
121    
 # in Jifty's template, it's included on bottom of list  
122  template 'new' => page {  template 'new' => page {
123          my $self = shift;          my $self = shift;
   
124          title is $self->object_type;          title is $self->object_type;
   
         my $record_class = $self->record_class;  
         my $action = $record_class->as_create_action;  
   
         #warn "action = ",dump( $action );  
   
125          form {          form {
126                  { class is 'crud create item' };                  render_region(
127                  foreach my $field ($self->create_columns($action)) {                          name     => $self->object_type.'-list',
128                          render_param($action, $field) ;                          path     => $self->fragment_base_path.'/new-list'
129                  }                  );
                 form_submit( label => _('Create') );  
130          }          }
131    };
132    
133    # in Jifty's template, it's included on bottom of list
134    template 'new-list' => sub {
135            div {
136                    { class is 'list' };
137            }
138            show( './new_item_region');
139  };  };
140    
141  1;  1;

Legend:
Removed from v.131  
changed lines
  Added in v.138

  ViewVC Help
Powered by ViewVC 1.1.26