/[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

Annotation of /lib/Perly/View.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8 - (hide annotations)
Tue Jun 5 11:32:42 2007 UTC (16 years, 11 months ago) by dpavlin
File size: 831 byte(s)
added upload action
1 dpavlin 3 package Perly::View;
2    
3     use strict;
4     use warnings;
5    
6     use Jifty::View::Declare -base;
7    
8     template '/' => page {
9     h1 { _("Enter your code") }
10     div { show 'code_editor' }
11     };
12    
13     private template 'code_editor' => sub {
14     form {
15     my $action = new_action( class => 'CreateCode' );
16 dpavlin 6 render_param( $action => 'source', cols => 80, rows => 25, language => 'perl', render_as => 'Jifty::Plugin::CodePress::Textarea' );
17 dpavlin 3 #render_action( $action => [ 'source' => { cols => 80, rows => 30 }, ] );
18 dpavlin 4 form_submit(
19     label => _("Save my code"),
20     onclick => [
21     { beforeclick => "CodePress.beforeSubmit();" },
22     ],
23     );
24 dpavlin 3 }
25     };
26    
27 dpavlin 8 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 dpavlin 3 1;

  ViewVC Help
Powered by ViewVC 1.1.26