/[Grep]/share/web/templates/index.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 /share/web/templates/index.html

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

revision 22 by dpavlin, Sun Feb 18 15:44:29 2007 UTC revision 23 by dpavlin, Sun Feb 18 16:15:25 2007 UTC
# Line 11  Jifty->subs->add( Line 11  Jifty->subs->add(
11          render_with => '/fragments/result',          render_with => '/fragments/result',
12  );  );
13    
14  my $fetch = Jifty->web->new_action(  my $search = Jifty->web->new_action(
15          class => 'Fetch',          class => 'SearchItem',
16          moniker => 'fetch',          moniker => 'search',
17          arguments => { %ARGS },          arguments => { %ARGS },
18          sticky_on_success => 1,          sticky_on_success => 1,
19  );  );
# Line 28  use Data::Dump qw/dump/; Line 28  use Data::Dump qw/dump/;
28    
29  <% Jifty->web->form->start %>  <% Jifty->web->form->start %>
30    
31  <% $fetch->form_field('q') %>  <% $search->form_field('content_contains') %>
 <% $fetch->form_field('feed') %>  
32    
33  <% $fetch->button( label => 'Grep' ) %>  <% $search->button( label => 'Grep' ) %>
34    
35  <% Jifty->web->form->end %>  <% Jifty->web->form->end %>
36    
37  % if ( my $result = Jifty->web->response->result('fetch') ) {  % my $results = Jifty->web->response->result('search');
38  %       if ( my $items = $result->content('items') ) {  % warn "result = ",dump( $results );
39  %               foreach my $i ( @$items ) {  % if ( $results and $results->content('search') ) {
40    %       my $coll = $results->content('search');
41          <& /fragments/result, item => $i &>  %       while ( my $i = $coll->next ) {
42    <& /fragments/result, item => $i &>
 %               }  
43  %       }  %       }
44  % }  % }
45    

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

  ViewVC Help
Powered by ViewVC 1.1.26