1 |
|
2 |
|
3 |
[% # This is just an example -- you would want your own "page" for the wrapper %] |
4 |
|
5 |
[% WRAPPER page %] |
6 |
|
7 |
[% PROCESS swish_header %] |
8 |
|
9 |
|
10 |
[% title = PROCESS title %] |
11 |
|
12 |
[% IF ! search.results %] |
13 |
[% PROCESS show_message %] |
14 |
[% PROCESS search_form %] |
15 |
|
16 |
[% ELSE %] |
17 |
[% PROCESS search_form %] |
18 |
[% PROCESS nav_bar %] |
19 |
[% PROCESS results_list %] |
20 |
[% END %] |
21 |
|
22 |
[% PROCESS swish_footer %] |
23 |
|
24 |
[% END %] |
25 |
|
26 |
|
27 |
[% # This is just an example -- you would want your own "page" to wrap around "swish" %] |
28 |
[% BLOCK page %] |
29 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
30 |
<html> |
31 |
<head> |
32 |
<title> |
33 |
[% title || "Welcome" %] |
34 |
</title> |
35 |
<body> |
36 |
[% content %] |
37 |
</body> |
38 |
</html> |
39 |
[% END %] |
40 |
|
41 |
|
42 |
[% BLOCK title %] |
43 |
[% IF ! search.results %] |
44 |
[% search.errstr || search.config('title') || "Search page" %] |
45 |
|
46 |
[% ELSE %] |
47 |
[% search.navigation('hits') %] Results for [[% search.query_simple | html %]] |
48 |
[% END %] |
49 |
[% END %] |
50 |
|
51 |
[% BLOCK swish_header %] |
52 |
|
53 |
<table border="0" cellpadding="0" cellspacing="0"> |
54 |
<tr><td> |
55 |
<a href="http://swish-e.org"> |
56 |
<img border="0" alt="Swish-e home page" src="http://swish-e.org/Images/swish-e.gif"></a> |
57 |
</td><td valign="middle"> |
58 |
<font size="+3">[% search.config('title') || "Search page" %]</font> |
59 |
</td></tr> |
60 |
</table> |
61 |
|
62 |
[% END %] |
63 |
|
64 |
[% BLOCK swish_footer %] |
65 |
<hr> |
66 |
<small>Powered by <em>Swish-e</em> <a href="http://swish-e.org">swish-e.org</a></small> |
67 |
[% IF search.MOD_PERL %] |
68 |
<br><small>Response brought to you by <a href="http://perl.apache.org"><em>mod_perl</em></a></small> |
69 |
[% END %] |
70 |
<p> |
71 |
<a href="http://validator.w3.org/check/referer"><img border="0" |
72 |
src="http://www.w3.org/Icons/valid-html401" |
73 |
alt="Valid HTML 4.01!" height="31" width="88"></a> |
74 |
</p> |
75 |
[% END %] |
76 |
|
77 |
|
78 |
|
79 |
[% BLOCK show_message %] |
80 |
[% IF search.errstr %] |
81 |
<font size="+2" color="red">[% search.errstr | html %]</font> |
82 |
[% END %] |
83 |
[% END %] |
84 |
|
85 |
|
86 |
|
87 |
[% BLOCK search_form %] |
88 |
[% CGI.start_form( '-action' => CGI.script_name, '-method' => 'GET' ) %] |
89 |
[% CGI.textfield( { |
90 |
name => 'query', |
91 |
size => 40, |
92 |
maxlength => 200, |
93 |
} ) %] |
94 |
|
95 |
[% CGI.submit('submit','Search!') %]<br> |
96 |
[% search.get_meta_name_limits %] |
97 |
[% search.get_sort_select_list %] |
98 |
[% search.get_index_select_list %] |
99 |
[% search.get_limit_select %] |
100 |
|
101 |
[% CGI.end_form.join('') %] |
102 |
|
103 |
[% END %] |
104 |
|
105 |
|
106 |
[% BLOCK nav_bar %] |
107 |
[% search.stopwords_removed %] |
108 |
<table cellpadding=0 cellspacing=0 border=0 width="100%"> |
109 |
<tr> |
110 |
<td height=20 bgcolor="#FF9999"> |
111 |
<font size="-1" face="Geneva, Arial, Helvetica, San-Serif"> |
112 |
Results for <b>[% search.query_simple | html %]</b> |
113 |
[% search.navigation('from') %] to [% search.navigation('to') %] of [% search.navigation('hits') %] results. |
114 |
</font> |
115 |
</td> |
116 |
<td align=right bgcolor="#FF9999"> |
117 |
<font size="-2" face="Geneva, Arial, Helvetica, San-Serif"> |
118 |
Run time: [% search.navigation('run_time') %] | |
119 |
Search time: [% search.navigation('search_time') %] |
120 |
</font> |
121 |
</td> |
122 |
</tr> |
123 |
|
124 |
[% IF search.navigation('pages') %] |
125 |
|
126 |
<tr> |
127 |
<td colspan=2 bgcolor="#EEEEEE"> |
128 |
<font size="-1" face="Geneva, Arial, Helvetica, San-Serif"> Page:</font> |
129 |
[% search.navigation('pages') %] |
130 |
|
131 |
[% IF search.navigation('prev_count') %] |
132 |
<a href="[% search.query_href %]&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 %]&start=[% search.navigation('next') %]"> |
138 |
Next [% search.navigation('next_count') %]</a> |
139 |
[% END %] |
140 |
</td> |
141 |
</tr> |
142 |
[% END %] |
143 |
|
144 |
</table> |
145 |
[% END %] |
146 |
|
147 |
|
148 |
[% BLOCK results_list %] |
149 |
[% FOREACH item = search.results %] |
150 |
<dl> |
151 |
<dt> |
152 |
[% item.swishreccount %] |
153 |
<a href="[% item.swishdocpath_href %]"> |
154 |
[% ( item.swishtitle || item.swishdocpath ) %] |
155 |
</a> |
156 |
|
157 |
<small>-- rank: <b>[% item.swishrank %]</b></small> |
158 |
</dt> |
159 |
|
160 |
<dd> |
161 |
[% item.swishdescription %] |
162 |
<br> |
163 |
<small> |
164 |
[% item.swishdocpath %] |
165 |
- [% item.swishdocsize %] bytes |
166 |
- [% item.swishlastmodified %] |
167 |
</small> |
168 |
</dd> |
169 |
</dl> |
170 |
[% END %] |
171 |
[% END %] |
172 |
|
173 |
|
174 |
|
175 |
|