/[Perly]/lib/Perly/View.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/Perly/View.pm

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

revision 22 by dpavlin, Wed Jun 6 09:17:05 2007 UTC revision 30 by dpavlin, Wed Jun 6 18:48:51 2007 UTC
# Line 24  private template 'code_list' => sub { Line 24  private template 'code_list' => sub {
24                  while ( my $code = $coll->next ) {                  while ( my $code = $coll->next ) {
25                          li {                          li {
26                                  a {                                  a {
27                                          attr { href => '/edit?id=' . $code->id, },                                          attr { href => '/edit/id=' . $code->id, },
28                                          $code->name,                                          $code->name,
29                                  },                                  },
30                                  small { length( $code->source ), ' bytes ', $code->created_on },                                  small { length( $code->source ), ' bytes ', $code->created_on },
31                                  a {                                  a {
32                                          attr { href => '/run?code=' . $code->id, }, 'run'                                          attr { href => '/run/code=' . $code->id, }, 'run'
33                                  },                                  },
34                                  pre { $code->source },                                  pre { $code->source },
35                          }                          }
# Line 56  private template 'code_editor' => sub { Line 56  private template 'code_editor' => sub {
56                                  { beforeclick => "CodePress.beforeSubmit();" },                                  { beforeclick => "CodePress.beforeSubmit();" },
57                          ],                          ],
58                  );                  );
59                    form_next_page( url => '/run/code=' . $action->argument_value('id') );
60          }          }
61  };  };
62    
# Line 71  template '/upload' => page { Line 72  template '/upload' => page {
72  };  };
73    
74  template '/run' => page {  template '/run' => page {
75          my $action = new_action( class => 'Run', arguments => { input => get('input'), code => get('code') } );          my $action = new_action( class => 'Run', arguments => {
76                    input => get('input'),
77                    code => get('code'),
78            } );
79            warn "code = ",get('code'), " input = ", get('input'), dump( $action );
80          h1 { _("Run code on some input") },          h1 { _("Run code on some input") },
81          form {          form {
82                  render_action( $action => [ 'input', 'code' ] );                  render_action( $action => [ 'input', 'code' ] );

Legend:
Removed from v.22  
changed lines
  Added in v.30

  ViewVC Help
Powered by ViewVC 1.1.26