/[SQLSession]/trunk/share/web/templates/sql
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/share/web/templates/sql

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

revision 15 by dpavlin, Sun Dec 3 14:01:53 2006 UTC revision 20 by dpavlin, Sun Dec 3 18:03:30 2006 UTC
# Line 1  Line 1 
1  <%args>  <%args>
2  $sth => undef  $sth => undef
3    
4    $sql_query
5    $name
6    $database
7    
8  </%args>  </%args>
9  <%init>  <%init>
10    
# Line 15  $sth = $result->content('sth') if $resul Line 20  $sth = $result->content('sth') if $resul
20    
21  <&| /_elements/wrapper, title => "Try out SQL query" &>  <&| /_elements/wrapper, title => "Try out SQL query" &>
22  <% Jifty->web->form->start() %>  <% Jifty->web->form->start() %>
23  <% $action->form_field('sql_query') %>  <% $action->form_field('sql_query',
24  <% $action->form_field('database') %>          default_value => $sql_query,
25  <% Jifty->web->form->submit( label => 'Try it!' ) %>  ) %>
26    <% $action->form_field('database',
27            default_value => $database->id,
28    ) %>
29    <div class="submit_button">
30    <% $action->button( label => 'Try it!' ) %>
31    </div>
32    
33  % if ( defined($sth) ) {  % if ( defined($sth) ) {
34    
35    <%perl>
36    my $save = Jifty->web->new_action(
37            class => 'CreateQuery',
38            arguments => {
39                    sql_query => $action->form_field('sql_query'),
40                    on_database => $action->form_field('database'),
41            }
42    );
43    
44    </%perl>
45    
46    <% $save->form_field('name') %>
47    <div class="submit_button">
48    <% $save->button( label => 'Save' ) %>
49    </div>
50    
51  <table cellpadding="3" cellspacing="0" border="1">  <table cellpadding="3" cellspacing="0" border="1">
52    
53  <tr>  <tr>
# Line 39  $sth = $result->content('sth') if $resul Line 66  $sth = $result->content('sth') if $resul
66    
67  </table>  </table>
68    
 <%perl>  
 my $save = Jifty->web->new_action(  
         class => 'CreateQuery',  
         arguments => {  
                 sql_query => $action->form_field('sql_query'),  
                 on_database => $action->form_field('database'),  
         }  
 );  
   
 </%perl>  
   
 <% $save->form_field('name') %>  
 <% $save->button( label => 'Save' ) %>  
   
69  % }  % }
70    
71    <% Jifty->web->return( label => "Go back" ) %>
72    
73  <% Jifty->web->form->end() %>  <% Jifty->web->form->end() %>
74  </&>  </&>
75    

Legend:
Removed from v.15  
changed lines
  Added in v.20

  ViewVC Help
Powered by ViewVC 1.1.26