1 |
dpavlin |
106 |
<%init> |
2 |
|
|
|
3 |
|
|
my $results = Jifty::Web::PageRegion->new( |
4 |
|
|
name => 'results', |
5 |
|
|
); |
6 |
|
|
|
7 |
|
|
my $search = Jifty->web->new_action( |
8 |
|
|
class => 'Search', |
9 |
|
|
moniker => 'search', |
10 |
|
|
arguments => { %ARGS }, |
11 |
|
|
sticky_on_success => 1, |
12 |
|
|
); |
13 |
|
|
|
14 |
|
|
my $q = $search->argument_value('q'); |
15 |
|
|
|
16 |
|
|
my $feeds = Jifty::Web::PageRegion->new( |
17 |
|
|
name => 'feeds', |
18 |
|
|
path => '/fragments/feeds', |
19 |
|
|
force_arguments => { |
20 |
|
|
q => $q, |
21 |
|
|
feed => undef, |
22 |
|
|
}, |
23 |
|
|
); |
24 |
|
|
|
25 |
|
|
use Data::Dump qw/dump/; |
26 |
|
|
|
27 |
|
|
</%init> |
28 |
|
|
|
29 |
|
|
<&| '/_elements/wrapper', title => 'Grep - powerful RSS searcher' &> |
30 |
|
|
|
31 |
|
|
<div class="right"> |
32 |
|
|
% if ( $q ) { |
33 |
|
|
<% $feeds->render %> |
34 |
|
|
<hr/> |
35 |
|
|
% } |
36 |
|
|
</div> |
37 |
|
|
|
38 |
|
|
<div class="left"> |
39 |
|
|
<& '/fragments/bookmarklet' &> |
40 |
|
|
|
41 |
|
|
<% Jifty->web->form->start %> |
42 |
|
|
|
43 |
|
|
<% $search->form_field('q') %> |
44 |
|
|
<% $search->form_field('item_fragment') %> |
45 |
|
|
<% $search->form_field('max') %> |
46 |
|
|
|
47 |
|
|
<% $search->button( label => 'Grep' ) %> |
48 |
|
|
|
49 |
|
|
<% Jifty->web->form->end %> |
50 |
|
|
|
51 |
|
|
<% $results->render %> |
52 |
|
|
|
53 |
|
|
% if ( $q ) { |
54 |
|
|
<& '/fragments/results', |
55 |
|
|
q => $q, |
56 |
|
|
item_fragment => $search->argument_value('item_fragment'), |
57 |
|
|
max => $search->argument_value('max'), |
58 |
|
|
&> |
59 |
|
|
% } |
60 |
|
|
|
61 |
|
|
</div> |
62 |
|
|
|
63 |
|
|
</&> |