/[Grep]/share/web/templates/index.html
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/index.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 43 - (show annotations)
Tue Feb 20 16:26:56 2007 UTC (17 years, 3 months ago) by dpavlin
File MIME type: text/html
File size: 1262 byte(s)
small refactoring for better debugging messages while exploring Jifty::Event
way of match(ing) events (while my use is more filter-like) and de-crufting code
in places
1 <%init>
2
3 my $results = Jifty::Web::PageRegion->new(
4 name => 'results',
5 );
6
7 if ( my $user_id = Jifty->web->current_user->id ) {
8
9 warn "adding subscription for user $user_id on this page\n";
10
11 Jifty->subs->add(
12 window_id => "results $user_id",
13 class => 'Result',
14 queries => [{ user_id => $user_id }],
15 mode => 'Top',
16 region => 'results',
17 render_with => '/fragments/event/results',
18 );
19
20 }
21
22 my $search = Jifty->web->new_action(
23 class => 'Search',
24 moniker => 'search',
25 arguments => { %ARGS },
26 sticky_on_success => 1,
27 );
28
29 my $q = $search->argument_value('content_contains');
30
31 my $feeds = Jifty::Web::PageRegion->new(
32 name => 'feeds',
33 path => '/fragments/feeds',
34 force_arguments => {
35 q => $q,
36 feed => undef,
37 },
38 );
39
40 use Data::Dump qw/dump/;
41
42 </%init>
43
44 <&| '/_elements/wrapper', title => 'Grep - powerful RSS searcher' &>
45
46 <div class="right">
47 % if ( $q ) {
48 <% $feeds->render %>
49 <hr/>
50 % }
51 </div>
52
53 <div class="left">
54 <& '/fragments/bookmarklet' &>
55
56 <% Jifty->web->form->start %>
57
58 <% $search->form_field('content_contains', label => 'Search for', q => $q ) %>
59
60 <% $search->button( label => 'Grep' ) %>
61
62 <% Jifty->web->form->end %>
63
64 <% $results->render %>
65
66 % if ( $q ) {
67 <& '/fragments/results', item_fragment => 'long', q => $q &>
68 % }
69
70 </div>
71
72 </&>

  ViewVC Help
Powered by ViewVC 1.1.26