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

Annotation of /share/web/templates/fetch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 25 - (hide annotations)
Sun Feb 18 20:45:59 2007 UTC (17 years, 3 months ago) by dpavlin
File size: 799 byte(s)
implement item_fragment selection in UI, better error message,
warn on empty ATOM feeds instead of die
1 dpavlin 22 <%init>
2    
3     my $fetch = Jifty->web->new_action(
4     class => 'Fetch',
5     moniker => 'fetch',
6     arguments => { %ARGS },
7     sticky_on_success => 1,
8     );
9    
10     </%init>
11    
12     <&| /_elements/wrapper, title => 'Fetch new results' &>
13    
14 dpavlin 24 % if ( my $q = $fetch->argument_value('q') ) {
15     <& /fragments/local_results, q => $q &>
16     % }
17    
18     <div class="left">
19 dpavlin 22 <& /fragments/bookmarklet &>
20    
21     <% Jifty->web->form->start %>
22    
23     <% $fetch->form_field('q') %>
24     <% $fetch->form_field('feed') %>
25 dpavlin 25 <% $fetch->form_field('item_fragment') %>
26 dpavlin 22
27     <% $fetch->button( label => 'Grep' ) %>
28    
29     <% Jifty->web->form->end %>
30    
31     % if ( my $result = Jifty->web->response->result('fetch') ) {
32     % if ( my $items = $result->content('items') ) {
33     % foreach my $i ( @$items ) {
34 dpavlin 25 <& '/fragments/' . $fetch->argument_value('item_fragment'), item => $i &>
35 dpavlin 22 % }
36     % }
37     % }
38    
39 dpavlin 24 </div>
40 dpavlin 22 </&>

  ViewVC Help
Powered by ViewVC 1.1.26