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

Contents of /share/web/templates/fragments/results

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 size: 681 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 <%args>
2 $item_fragment => 'long'
3 $max => 10
4 $coll => undef
5 $moniker => 'search'
6 $q
7 </%args>
8 <%init>
9
10 use Data::Dump qw/dump/;
11
12 my $results = Jifty->web->response->result( $moniker );
13 if ( $results and $results->content('search') ) {
14 $coll = $results->content('search');
15 } elsif (! defined($coll)) {
16 warn "called without results for $moniker";
17 }
18
19 my $i = 1;
20
21 </%init>
22 % if ($coll) {
23 <div class="results">
24 % while ( my $i = $coll->next and $i++ <= $max ) {
25 <& "/fragments/item/$item_fragment", item => $i &>
26 % }
27 </div>
28 % if ($i > $max) {
29 <div class="grep-note">
30 <div class="message">
31 Found more than <% $max %> results for '<% $q %>', refine search query....
32 </div>
33 </div>
34 % }
35 % }

  ViewVC Help
Powered by ViewVC 1.1.26