/[Grep]/share/web/templates/search
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /share/web/templates/search

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.26