4 |
name => 'results', |
name => 'results', |
5 |
); |
); |
6 |
|
|
|
Jifty->subs->add( |
|
|
class => 'Result', |
|
|
mode => 'Top', |
|
|
region => 'results', |
|
|
render_with => '/fragments/event/results', |
|
|
); |
|
|
|
|
7 |
my $search = Jifty->web->new_action( |
my $search = Jifty->web->new_action( |
8 |
class => 'Search', |
class => 'Search', |
9 |
moniker => 'search', |
moniker => 'search', |
11 |
sticky_on_success => 1, |
sticky_on_success => 1, |
12 |
); |
); |
13 |
|
|
14 |
my $q = $search->argument_value('content_contains'); |
my $q = $search->argument_value('q'); |
15 |
|
|
16 |
my $feeds = Jifty::Web::PageRegion->new( |
my $feeds = Jifty::Web::PageRegion->new( |
17 |
name => 'feeds', |
name => 'feeds', |
18 |
path => '/fragments/feeds', |
path => '/fragments/feeds', |
19 |
force_arguments => { |
force_arguments => { |
20 |
q => $q, |
q => $q, |
21 |
|
feed => undef, |
22 |
}, |
}, |
23 |
); |
); |
24 |
|
|
40 |
|
|
41 |
<% Jifty->web->form->start %> |
<% Jifty->web->form->start %> |
42 |
|
|
43 |
<% $search->form_field('content_contains', label => 'Search for', q => $q ) %> |
<% $search->form_field('q') %> |
44 |
|
<% $search->form_field('item_fragment') %> |
45 |
|
<% $search->form_field('max') %> |
46 |
|
|
47 |
<% $search->button( label => 'Grep' ) %> |
<% $search->button( label => 'Grep' ) %> |
48 |
|
|
51 |
<% $results->render %> |
<% $results->render %> |
52 |
|
|
53 |
% if ( $q ) { |
% if ( $q ) { |
54 |
<& '/fragments/results', item_fragment => 'long', q => $q &> |
<& '/fragments/results', |
55 |
|
q => $q, |
56 |
|
item_fragment => $search->argument_value('item_fragment'), |
57 |
|
max => $search->argument_value('max'), |
58 |
|
&> |
59 |
% } |
% } |
60 |
|
|
61 |
</div> |
</div> |