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

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

revision 20 by dpavlin, Sun Dec 3 18:03:30 2006 UTC revision 21 by dpavlin, Sun Dec 3 19:47:39 2006 UTC
# Line 1  Line 1 
1  <%args>  <%args>
2  $sth => undef  $sth => undef
3    
4  $sql_query  $sql_query => undef
5  $name  $name => undef
6  $database  $database => undef
7    
8  </%args>  </%args>
9  <%init>  <%init>
# Line 24  $sth = $result->content('sth') if $resul Line 24  $sth = $result->content('sth') if $resul
24          default_value => $sql_query,          default_value => $sql_query,
25  ) %>  ) %>
26  <% $action->form_field('database',  <% $action->form_field('database',
27          default_value => $database->id,          default_value => $database,
28  ) %>  ) %>
29  <div class="submit_button">  <div class="submit_button">
30  <% $action->button( label => 'Try it!' ) %>  <% $action->button( label => 'Try it!' ) %>
31  </div>  
32    
33  % if ( defined($sth) ) {  % if ( defined($sth) ) {
34    
35  <%perl>  <% Jifty->web->link(
36  my $save = Jifty->web->new_action(          label => 'Save',
37          class => 'CreateQuery',          onclick => {
38          arguments => {                  region => 'save_query',
39                  sql_query => $action->form_field('sql_query'),                  prepend => '/save',
40                  on_database => $action->form_field('database'),                  args => {
41          }                          sql_query => $action->argument_value('sql_query'),
42  );                          database => $action->argument_value('database'),
43                    },
44                    refresh_self => 1,
45                    toggle => 1,
46            },
47    #       as_button => 1,
48    ) %>
49    
50  </%perl>  </div>
51    <% Jifty->web->form->end() %>
52    
53    <% Jifty->web->region(
54            name => 'save_query',
55    ) %>
56    
 <% $save->form_field('name') %>  
 <div class="submit_button">  
 <% $save->button( label => 'Save' ) %>  
57  </div>  </div>
58    
59  <table cellpadding="3" cellspacing="0" border="1">  <table cellpadding="3" cellspacing="0" border="1">
# Line 66  my $save = Jifty->web->new_action( Line 74  my $save = Jifty->web->new_action(
74    
75  </table>  </table>
76    
77    % } else {
78    
79    </div><!-- submit_button -->
80    <% Jifty->web->form->end() %>
81    
82  % }  % }
83    
84  <% Jifty->web->return( label => "Go back" ) %>  <% Jifty->web->return( label => "Go back" ) %>
85    
 <% Jifty->web->form->end() %>  
86  </&>  </&>
87    

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

  ViewVC Help
Powered by ViewVC 1.1.26