13 |
private template 'code_editor' => sub { |
private template 'code_editor' => sub { |
14 |
form { |
form { |
15 |
my $action = new_action( class => 'CreateCode' ); |
my $action = new_action( class => 'CreateCode' ); |
16 |
render_param( $action => 'source', cols => 80, rows => 25 ); |
render_param( $action => 'source', cols => 80, rows => 25, language => 'perl', render_as => 'Jifty::Plugin::CodePress::Textarea' ); |
17 |
#render_action( $action => [ 'source' => { cols => 80, rows => 30 }, ] ); |
#render_action( $action => [ 'source' => { cols => 80, rows => 30 }, ] ); |
18 |
form_submit( |
form_submit( |
19 |
label => _("Save my code"), |
label => _("Save my code"), |
23 |
); |
); |
24 |
} |
} |
25 |
}; |
}; |
26 |
|
|
27 |
|
template '/upload' => page { |
28 |
|
h1 { _("Upload new file") }, |
29 |
|
form { |
30 |
|
my $action = new_action( class => 'Upload' ); |
31 |
|
render_action( $action => [ 'file', 'content' ] ); |
32 |
|
form_submit( |
33 |
|
label => _('Upload'), |
34 |
|
); |
35 |
|
} |
36 |
|
}; |
37 |
|
|
38 |
1; |
1; |