|
<%init> |
|
|
|
|
|
my $results = Jifty::Web::PageRegion->new( |
|
|
name => 'results', |
|
|
); |
|
|
|
|
|
my $search = Jifty->web->new_action( |
|
|
class => 'Search', |
|
|
moniker => 'search', |
|
|
arguments => { %ARGS }, |
|
|
sticky_on_success => 1, |
|
|
); |
|
|
|
|
|
my $q = $search->argument_value('q'); |
|
|
|
|
|
my $feeds = Jifty::Web::PageRegion->new( |
|
|
name => 'feeds', |
|
|
path => '/fragments/feeds', |
|
|
force_arguments => { |
|
|
q => $q, |
|
|
feed => undef, |
|
|
}, |
|
|
); |
|
|
|
|
|
use Data::Dump qw/dump/; |
|
|
|
|
|
</%init> |
|
|
|
|
1 |
<&| '/_elements/wrapper', title => 'Grep - powerful RSS searcher' &> |
<&| '/_elements/wrapper', title => 'Grep - powerful RSS searcher' &> |
2 |
|
|
3 |
<div class="right"> |
This application needs to know which user is using it. So, you need ether to |
4 |
% if ( $q ) { |
<% Jifty->web->link( label => 'signup for your account', url => '/signup' ) %> |
5 |
<% $feeds->render %> |
or |
6 |
<hr/> |
<% Jifty->web->link( label => 'login with existing account', url => '/login' ) %> |
7 |
% } |
to use it. |
|
</div> |
|
|
|
|
|
<div class="left"> |
|
|
<& '/fragments/bookmarklet' &> |
|
|
|
|
|
<% Jifty->web->form->start %> |
|
|
|
|
|
<% $search->form_field('q') %> |
|
|
<% $search->form_field('item_fragment') %> |
|
|
<% $search->form_field('max') %> |
|
|
|
|
|
<% $search->button( label => 'Grep' ) %> |
|
|
|
|
|
<% Jifty->web->form->end %> |
|
|
|
|
|
<% $results->render %> |
|
|
|
|
|
% if ( $q ) { |
|
|
<& '/fragments/results', |
|
|
q => $q, |
|
|
item_fragment => $search->argument_value('item_fragment'), |
|
|
max => $search->argument_value('max'), |
|
|
&> |
|
|
% } |
|
|
|
|
|
</div> |
|
8 |
|
|
9 |
</&> |
</&> |