8 |
class => 'Result', |
class => 'Result', |
9 |
mode => 'Bottom', |
mode => 'Bottom', |
10 |
region => 'results', |
region => 'results', |
11 |
render_with => '/fragments/result', |
render_with => '/fragments/event/results', |
12 |
); |
); |
13 |
|
|
14 |
my $fetch = Jifty->web->new_action( |
my $search = Jifty->web->new_action( |
15 |
class => 'Fetch', |
class => 'Search', |
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' &> |
26 |
|
|
27 |
<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> |
<div class="right"> |
28 |
|
Remote results: <% $region->render %> |
29 |
|
</div> |
30 |
|
|
31 |
|
<div class="left"> |
32 |
|
<& '/fragments/bookmarklet' &> |
33 |
|
|
34 |
<% Jifty->web->form->start %> |
<% Jifty->web->form->start %> |
35 |
|
|
36 |
<% $fetch->form_field('q') %> |
<% $search->form_field('content_contains', label => 'Search for') %> |
|
<% $fetch->form_field('feed') %> |
|
37 |
|
|
38 |
<% $fetch->button( label => 'Grep' ) %> |
<% $search->button( label => 'Grep' ) %> |
39 |
|
|
40 |
<% Jifty->web->form->end %> |
<% Jifty->web->form->end %> |
41 |
|
|
42 |
% if ( my $result = Jifty->web->response->result('fetch') ) { |
<& '/fragments/results', item_fragment => 'long' &> |
|
% if ( my $items = $result->content('items') ) { |
|
|
% foreach my $i ( @$items ) { |
|
43 |
|
|
44 |
<& /fragments/result, item => $i &> |
</div> |
|
|
|
|
% } |
|
|
% } |
|
|
% } |
|
|
|
|
|
Results: <% $region->render %> |
|
45 |
|
|
46 |
</&> |
</&> |