/[swish]/trunk/mailman/search.tt
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 /trunk/mailman/search.tt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 78 - (hide annotations)
Sun Apr 18 08:11:22 2004 UTC (20 years, 2 months ago) by dpavlin
File size: 5377 byte(s)
modified configuration to include frameset which will have search on
top and normal mailman or search results on bottom

1 dpavlin 78 [% WRAPPER page %]
2    
3     [% PROCESS swish_header %]
4    
5    
6     [% title = PROCESS title %]
7    
8     [% IF search.errstr %]
9    
10     [% PROCESS show_message %]
11     [% PROCESS swish_footer %]
12    
13     [% ELSIF ! search.results %]
14    
15     [% PROCESS show_message %]
16     [% PROCESS search_form %]
17    
18     [% ELSE %]
19     [% PROCESS nav_bar %]
20     [% PROCESS results_list %]
21     [% PROCESS swish_footer %]
22     [% END %]
23    
24    
25     [% END %]
26    
27    
28     [% # This is just an example -- you would want your own "page" to wrap around "swish" %]
29     [% BLOCK page %]
30     <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
31     <html>
32     <head>
33     <title>
34     [% title || "Welcome" %]
35     </title>
36     <body>
37     [% content %]
38     </body>
39     </html>
40     [% END %]
41    
42    
43     [% BLOCK title %]
44     [% IF ! search.results %]
45     [% search.errstr || search.config('title') || "Search page" %]
46    
47     [% ELSE %]
48     [% search.navigation('hits') %] Results for [[% search.query_simple | html %]]
49     [% END %]
50     [% END %]
51    
52     [% BLOCK swish_header %]
53    
54     [% END %]
55    
56     [% BLOCK swish_footer %]
57    
58     [% PROCESS nav_bar_pages2 %]
59     <hr>
60     <small>Powered by <em>Swish-e</em> <a href="http://swish-e.org">swish-e.org</a></small>
61     [% END %]
62    
63    
64    
65     [% BLOCK show_message %]
66     [% IF search.errstr %]
67     <font size="+2" color="red">[% search.errstr | html %]</font>
68     [% END %]
69     [% END %]
70    
71    
72    
73     [% BLOCK search_form %]
74     [% CGI.start_form( '-action' => CGI.script_name, '-method' => 'GET', '-target' => 'bottom' ) %]
75     [% CGI.textfield( {
76     name => 'query',
77     size => 40,
78     maxlength => 200,
79     } ) %]
80    
81     [% CGI.submit('submit','Search!') %]
82     Show <a href="/cgi-bin/mailman/listinfo" target="bottom">all lists</a>
83     <br>
84    
85     [% search.get_meta_name_limits %]
86     [% search.get_sort_select_list %]
87     [% search.get_index_select_list %]
88     [% search.get_limit_select %]
89     [% search.get_date_ranges %]
90    
91     [% CGI.end_form.join('') %]
92    
93     [% END %]
94    
95    
96     [% BLOCK nav_bar %]
97     [% search.stopwords_removed %]
98     <table cellpadding=0 cellspacing=0 border=0 width="100%">
99     <tr>
100     <td height=20 bgcolor="#FF9999">
101     <font size="-1" face="Geneva, Arial, Helvetica, San-Serif">
102     &nbsp;Results for <b>[% search.query_simple | html %]</b>
103     &nbsp; [% search.navigation('from') %] to [% search.navigation('to') %] of [% search.navigation('hits') %] results.
104     </font>
105     </td>
106     <td align=right bgcolor="#FF9999">
107     <font size="-2" face="Geneva, Arial, Helvetica, San-Serif">
108     Run time: [% search.navigation('run_time') %] |
109     Search time: [% search.navigation('search_time') %] &nbsp; &nbsp;
110     </font>
111     </td>
112     </tr>
113    
114     [% IF search.navigation('pages') %]
115    
116     <tr>
117     <td colspan=2 bgcolor="#EEEEEE">
118     [%# PROCESS nav_bar_pages %]
119     [% PROCESS nav_bar_pages2 %]
120     </td>
121     </tr>
122     [% END %]
123    
124     </table>
125     [% END %]
126    
127     [% BLOCK nav_bar_pages %]
128     <font size="-1" face="Geneva, Arial, Helvetica, San-Serif">&nbsp;Page:</font>
129     [% search.navigation('pages') %]
130    
131     [% IF search.navigation('prev_count') %]
132     <a href="[% search.query_href %]&amp;start=[% search.navigation('prev') %]">
133     Previous [% search.navigation('prev_count') %]</a>
134     [% END %]
135    
136     [% IF search.navigation('next_count') %]
137     <a href="[% search.query_href %]&amp;start=[% search.navigation('next') %]">
138     Next [% search.navigation('next_count') %]</a>
139     [% END %]
140     [% END %]
141    
142     [%#
143     Insead of pre-formatted numeric page links as above, you can use this
144     example to generate the pages individually.
145     For example, allows using images for page numbers.
146     %]
147    
148     [% BLOCK nav_bar_pages2 %]
149     &nbsp;
150    
151     [% IF search.navigation('prev_count') %]
152     <a style="text-decoration:none" href="[% search.query_href %]&amp;start=[% search.navigation('prev') %]">&lt;&lt;</a>
153     [% END %]
154    
155    
156     [% FOR page = search.navigation('page_array') %]
157     [% IF page.cur_page %]
158     [[% page.page_number %]]
159     [% ELSE %]
160     <a style="text-decoration:none" href="[% search.query_href %];start=[% page.page_start %]">[% page.page_number %]</a>
161     [% END %]
162     [% END %]
163    
164     [% IF search.navigation('next_count') %]
165     <a style="text-decoration:none" href="[% search.query_href %]&amp;start=[% search.navigation('next') %]">&gt;&gt;</a>
166     [% END %]
167     [% END %]
168    
169    
170    
171    
172     [% BLOCK results_list %]
173     [% FOREACH item = search.results %]
174     <dl>
175     <dt>
176     [% item.swishreccount %]
177     <a href="[% item.swishdocpath_href %]">
178     [% ( item.swishtitle || item.swishdocpath ) %]
179     </a>
180    
181     <small>-- rank: <b>[% item.swishrank %]</b></small>
182     </dt>
183    
184     <dd>
185     [% item.swishdescription %]
186     <br>
187     <small>
188     <font color="#808080">
189     <!-- [% item.swishdocpath %] -->
190     Sent by
191     [% item.name %] &lt;[% item.email %]&gt;
192     on [% item.sent %]
193     ([% item.swishdocsize %] bytes)
194     </font>
195     </small>
196     </dd>
197     </dl>
198     [% END %]
199     [% END %]
200    
201    
202    
203    

  ViewVC Help
Powered by ViewVC 1.1.26