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

Annotation of /share/web/templates/index.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 23 - (hide annotations)
Sun Feb 18 16:15:25 2007 UTC (17 years, 4 months ago) by dpavlin
File MIME type: text/html
File size: 918 byte(s)
added search of local storage (finally, this is the whole point :-)
1 dpavlin 9 <%init>
2    
3     my $region = Jifty::Web::PageRegion->new(
4     name => 'results',
5     );
6    
7     Jifty->subs->add(
8     class => 'Result',
9     mode => 'Bottom',
10     region => 'results',
11     render_with => '/fragments/result',
12     );
13    
14 dpavlin 23 my $search = Jifty->web->new_action(
15     class => 'SearchItem',
16     moniker => 'search',
17 dpavlin 9 arguments => { %ARGS },
18     sticky_on_success => 1,
19     );
20    
21     use Data::Dump qw/dump/;
22    
23     </%init>
24    
25 dpavlin 18 <&| /_elements/wrapper, title => 'Grep - powerful RSS searcher' &>
26 dpavlin 9
27 dpavlin 22 <& /fragments/bookmarklet &>
28 dpavlin 10
29 dpavlin 9 <% Jifty->web->form->start %>
30    
31 dpavlin 23 <% $search->form_field('content_contains') %>
32 dpavlin 9
33 dpavlin 23 <% $search->button( label => 'Grep' ) %>
34 dpavlin 9
35     <% Jifty->web->form->end %>
36    
37 dpavlin 23 % my $results = Jifty->web->response->result('search');
38     % warn "result = ",dump( $results );
39     % if ( $results and $results->content('search') ) {
40     % my $coll = $results->content('search');
41     % while ( my $i = $coll->next ) {
42     <& /fragments/result, item => $i &>
43 dpavlin 9 % }
44     % }
45    
46     Results: <% $region->render %>
47    
48     </&>

  ViewVC Help
Powered by ViewVC 1.1.26