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 |
); |
); |
22 |
|
|
23 |
</%init> |
</%init> |
24 |
|
|
25 |
<&| /_elements/wrapper, title => 'Grep - powerfull RSS searcher' &> |
<&| /_elements/wrapper, title => 'Grep - powerful RSS searcher' &> |
|
|
|
|
<a class="bookmarklet" href="javascript:location.href='<% Jifty->web->url( path => '/add' ) %>?uri='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)" title="drag and drop to bookmark toolbar to quickly add feed to grep">+grep</a> |
|
26 |
|
|
27 |
|
<& /fragments/bookmarklet &> |
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') ) { |
<& /fragments/results, result => 'result' &> |
|
% if ( my $items = $result->content('items') ) { |
|
|
% foreach my $i ( @$items ) { |
|
|
|
|
|
<& /fragments/result, item => $i &> |
|
|
|
|
|
% } |
|
|
% } |
|
|
% } |
|
38 |
|
|
39 |
Results: <% $region->render %> |
Results: <% $region->render %> |
40 |
|
|