/[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 93 by dpavlin, Fri Jul 11 09:25:02 2008 UTC revision 94 by dpavlin, Fri Jul 11 09:35:32 2008 UTC
# 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                    my $layout_picker = join(' ',
86                            qq|<div class="layout">layout:|,
87                            map {
88                                    if ( $layout eq $_ ) {
89                                            qq|<em>$_</em>|;
90                                    } else {
91                                            qq|<a href="?layout=$_">$_</a>|;
92                                    }
93                            } ( 'div', 'table' ),
94                            qq|</div>|,
95                    );
96    
97              my $doc = Continuity::Widget::DomNode->create(              my $doc = Continuity::Widget::DomNode->create(
98                          html => [                          html => [
# Line 90  sub html { Line 101  sub html {
101                                  ],                                  ],
102                                  body => [                                  body => [
103                                          h1 => [ 'Strix::User' ],                                          h1 => [ 'Strix::User' ],
104                                          $layout eq 'table' ?                                          $layout_picker,
                                                 # gen_link doesn't work since Widngets have it's own scope of layout  
 #                                               gen_link( 'div layout', sub { $layout = 'div' } ) :  
 #                                               gen_link( 'table layout', sub { $layout = 'table' } ),  
                                                 qq|<a href="?layout=div">div layout</a>| :  
                                                 qq|<a href="?layout=table">table layout</a>|,  
105                                          form => { method=>'post' } => [                                          form => { method=>'post' } => [
106                                                  $form,                                                  $form,
107                                          ],                                          ],

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

  ViewVC Help
Powered by ViewVC 1.1.26