/[Frey]/trunk/lib/Frey/Web/Row.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 /trunk/lib/Frey/Web/Row.pm

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

revision 98 by dpavlin, Fri Jul 11 17:53:08 2008 UTC revision 101 by dpavlin, Fri Jul 11 22:54:42 2008 UTC
# Line 15  has render_as => ( is => 'rw', isa => 'R Line 15  has render_as => ( is => 'rw', isa => 'R
15    
16  has fey => (  has fey => (
17          is => 'rw',          is => 'rw',
         label => 'Fey object',  
18          isa => 'Object',        # FIXME Strix::User?          isa => 'Object',        # FIXME Strix::User?
19  #       required => 1,          # XXX if we require it we can't have Add form  #       required => 1,          # XXX if we require it we can't have Add form
20  );  );
21    
22    has fey_class => (
23            is => 'rw',
24            isa => 'Str',
25            required => 1,
26    );
27    
28  enum 'Layouts' => qw( div table columns );  enum 'Layouts' => qw( div table columns );
29  has layout => (  has layout => (
30          is => 'rw',          is => 'rw',
# Line 116  sub main { Line 121  sub main {
121                          my $hash = $self->set_from_hash($f);                          my $hash = $self->set_from_hash($f);
122                          warn "## Add hash ", $self->uuid, " => ",dump( $hash, $f );                          warn "## Add hash ", $self->uuid, " => ",dump( $hash, $f );
123                          delete( $hash->{id} );  # FIXME clear primary key                          delete( $hash->{id} );  # FIXME clear primary key
124                          my $u = Strix::User->insert( %$hash );                          my $u = $self->fey_class->insert( %$hash );
125                          warn "Inserted ",$u->id;                          warn "Inserted ",$u->id;
126                          # XXX store object for later                          # XXX store object for later
127                          $self->fey( $u );                          $self->fey( $u );
# Line 217  sub render_wrapper_class { Line 222  sub render_wrapper_class {
222          return qq|<div class="$class">| . $out . $self->render_buttons . qq|</div>|;          return qq|<div class="$class">| . $out . $self->render_buttons . qq|</div>|;
223  }  }
224    
 use Strix::User;  
   
225  sub _build_display_columns {  sub _build_display_columns {
226          my $self = shift;          my $self = shift;
227    
228          my $m = Strix::User->meta;          my $m = $self->fey_class->meta;
229    
230          my @cols;          my @cols;
231    

Legend:
Removed from v.98  
changed lines
  Added in v.101

  ViewVC Help
Powered by ViewVC 1.1.26