]> ruin.nu Git - ndwebbie.git/blob - root/src/wiki/search.tt2
Added wiki search.
[ndwebbie.git] / root / src / wiki / search.tt2
1 [% META title = 'Wiki search' %]
2
3 <form action="[% c.uri_for('search') %]" method="post">
4
5 <fieldset class="forum-post"> <legend>Wiki search</legend>
6         <p><input style="width:98%" type="text" name="search" value="[% search %]"></p>
7
8         <p>Use advanced search: <input type="checkbox" name="advsearch"></p>
9
10         Advanced search has the following syntax:
11         Use | (OR) or &amp; (AND) to separate words. Word:A searches for Word in
12         topic 'Two words' to search for a longer string. Word:D limits the search to just the message body.
13 </fieldset>
14 <p><input type="submit" name="cmd" value="Search"></p>
15 </form>
16
17 [% IF searcherror %]
18 <p> Could not search, because of: </p>
19 <p> [% searcherror | html %] </p>
20 [% END %]
21
22 [% IF searchresults %]
23 <table>
24 <tr>
25         <th>Page</th>
26         <th>Message</th>
27         <th>Rank</th>
28 </tr>
29         [% FOR p IN searchresults %]
30         <tr align="left" class="[% IF loop.count % 2 == 0 %]even[% ELSE %]odd[% END %]">
31                 <td><a href="[% c.uri_for('',p.fullname) %]">&nbsp;[% p.fullname %]&nbsp;</a></td>
32                 <td align="center">[% p.headline %]</td>
33                 <td>[% p.rank %]</td>
34         </tr>
35         [% END %]
36 </table>
37 [% END %]