|
1 <%inherit file="channel.tmpl" /> |
|
2 <%namespace file="inc_paginate.tmpl" import="paginate" /> |
|
3 |
|
4 % if not show_results : |
|
5 <div id="title">${channel.title} :: Search</div> |
|
6 |
|
7 <div id="search"> |
|
8 <form action="${h.build_url(urls.channel_search, channel=channel)}" method="GET"> |
|
9 <fieldset> |
|
10 <p> |
|
11 <label for="q">Message:</label> |
|
12 <input type="text" name="q" class="wide" /> |
|
13 </p> |
|
14 |
|
15 <p> |
|
16 <label for="nick">By nickname:</label> |
|
17 <input type="text" name="nick" /> |
|
18 <span>(optional)</span> |
|
19 </p> |
|
20 |
|
21 <p> |
|
22 <label for="count">Results/page:</label> |
|
23 <select name="count"> |
|
24 ${h.select_options(((cc, cc_label) for cc, cc_label in config.SEARCH_LINE_COUNT_OPTIONS), count)} |
|
25 </select> |
|
26 </p> |
|
27 |
|
28 <input type="submit" value="Search" /> |
|
29 </fieldset> |
|
30 </form> |
|
31 |
|
32 <div id="search-help"> |
|
33 <p>Search powered by <a href="http://hyperestraier.sourceforge.net/">Hyper Estraier</a>:</p> |
|
34 |
|
35 <ul> |
|
36 <li>Group words together using quotes: <tt>"united nations"</tt></li> |
|
37 <li>Searching for multiple words is AND: <tt>internet security</tt></li> |
|
38 <li>To exclude terms, use <strong>!</strong> : <tt>hacker ! cracker</tt></li> |
|
39 <li>Union (i.e. <q>or</q>) using <strong>|</strong> : <tt>proxy | firewall</tt></li> |
|
40 <li>Search is case-insensitive</li> |
|
41 </ul> |
|
42 </div> |
|
43 </div> |
|
44 |
|
45 % else : |
|
46 <div id="title">${channel.title} :: Results\ |
|
47 % if search_query : |
|
48 With '${search_query}'\ |
|
49 % endif |
|
50 % if search_nick : |
|
51 By ${search_nick}\ |
|
52 % endif |
|
53 </div> |
|
54 |
|
55 ${paginate(urls.channel_search, count, page, max, channel=channel, q=search_query, t=search_targets, _more=True, _last=not(bool(lines)))} |
|
56 % if lines : |
|
57 <%include file="lines.tmpl" /> |
|
58 % else : |
|
59 <div id="search-error">No results found</div> |
|
60 % endif |
|
61 ${paginate(urls.channel_search, count, page, max, channel=channel, q=search_query, t=search_targets, _more=True, _last=not(bool(lines)))} |
|
62 % endif |