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

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

revision 94 by dpavlin, Fri Jul 11 09:35:32 2008 UTC revision 95 by dpavlin, Fri Jul 11 10:29:31 2008 UTC
# Line 64  sub html { Line 64  sub html {
64                          warn "# new layout = $layout\n";                          warn "# new layout = $layout\n";
65                  }                  }
66    
67                  my $rows_delimiter = '<hr/>';                  my $rows_delimiter = '';
68                  $rows_delimiter = '' if $layout eq 'table';                  $rows_delimiter = '<hr/>' if $layout eq 'div';
69    
70                  my $form = join($rows_delimiter, map {                  my $form = join($rows_delimiter, map {
71                          $_->_layout( $layout );                          $_->_layout( $layout );
# Line 82  sub html { Line 82  sub html {
82    
83                  $form = qq|<table>$form</table>| if $layout eq 'table';                  $form = qq|<table>$form</table>| if $layout eq 'table';
84    
85                    if ( $layout eq 'columns' ) {
86                            # add header to table
87                            my $header = $w[0]->render_iterator( sub {
88                                    my ( $name, $field_name, $label, $val ) = @_;
89                                    return if $name =~ /^_/;
90                                    return qq|<th>$label</th>|;
91                            });
92                            $form = qq|<table><tr>$header</tr>$form</table>|;
93                    }
94    
95                  my $layout_picker = join(' ',                  my $layout_picker = join(' ',
96                          qq|<div class="layout">layout:|,                          qq|<div class="layout">layout:|,
97                          map {                          map {
# Line 90  sub html { Line 100  sub html {
100                                  } else {                                  } else {
101                                          qq|<a href="?layout=$_">$_</a>|;                                          qq|<a href="?layout=$_">$_</a>|;
102                                  }                                  }
103                          } ( 'div', 'table' ),                          } ( 'div', 'table', 'columns' ),
104                          qq|</div>|,                          qq|</div>|,
105                  );                  );
106    

Legend:
Removed from v.94  
changed lines
  Added in v.95

  ViewVC Help
Powered by ViewVC 1.1.26