/[Grep]/share/web/templates/fragments/results
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/fragments/results

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

revision 43 by dpavlin, Tue Feb 20 16:26:56 2007 UTC revision 44 by dpavlin, Tue Feb 20 21:55:24 2007 UTC
# Line 1  Line 1 
1  <%args>  <%args>
2  $item_fragment => 'long'  $q
3  $max => 10  $max => 10
4    $item_fragment => 'long'
5  $coll => undef  $coll => undef
6  $moniker => 'search'  $result_moniker => 'search'
7  $q  $result => undef
8  </%args>  </%args>
9  <%init>  <%init>
10    
11  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
12    
13  my $results = Jifty->web->response->result( $moniker );  $result ||= Jifty->web->response->result( $result_moniker );
14  if ( $results and $results->content('search') ) {  if ( $result and $result->content('search') ) {
15          $coll = $results->content('search');          $coll = $result->content('search');
16  } elsif (! defined($coll)) {  } elsif (! defined($coll)) {
17          warn "called without results for $moniker";          warn "called without result for $result_moniker";
18  }  }
19    
20    warn "notes: ",dump($result->message, $result->error) if ($result);
21    
22  my $i = 1;  my $i = 1;
23    
24  </%init>  </%init>
25    % if ($result and $result->message) {
26    <div class="grep-note">
27    <div class="message"><% $result->message %></div>
28    </div>
29    % }
30    % if ($result and $result->error) {
31    <div class="grep-note">
32    <div class="error"><% $result->error %></div>
33    </div>
34    % }
35  % if ($coll) {  % if ($coll) {
36  <div class="results">  <div class="results">
37  %       while ( my $i = $coll->next and $i++ <= $max ) {  %       while ( my $i = $coll->next and $i++ <= $max ) {

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

  ViewVC Help
Powered by ViewVC 1.1.26