/[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

Diff of /share/web/templates/index.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 43 by dpavlin, Tue Feb 20 16:26:56 2007 UTC revision 106 by dpavlin, Tue Mar 6 16:17:19 2007 UTC
# Line 1  Line 1 
 <%init>  
   
 my $results = Jifty::Web::PageRegion->new(  
         name => 'results',  
 );  
   
 if ( my $user_id = Jifty->web->current_user->id ) {  
   
         warn "adding subscription for user $user_id on this page\n";  
   
         Jifty->subs->add(  
                 window_id => "results $user_id",  
                 class => 'Result',  
                 queries => [{ user_id => $user_id }],  
                 mode => 'Top',  
                 region => 'results',  
                 render_with => '/fragments/event/results',  
         );  
   
 }  
   
 my $search = Jifty->web->new_action(  
         class => 'Search',  
         moniker => 'search',  
         arguments => { %ARGS },  
         sticky_on_success => 1,  
 );  
   
 my $q = $search->argument_value('content_contains');  
   
 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('content_contains', label => 'Search for', q => $q ) %>  
   
 <% $search->button( label => 'Grep' ) %>  
   
 <% Jifty->web->form->end %>  
   
 <% $results->render %>  
   
 % if ( $q ) {  
 <& '/fragments/results', item_fragment => 'long', q => $q &>  
 % }  
   
 </div>  
8    
9  </&>  </&>

Legend:
Removed from v.43  
changed lines
  Added in v.106

  ViewVC Help
Powered by ViewVC 1.1.26