--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/qmsk/irclogs/templates/channel_search.tmpl Sun Sep 13 20:08:16 2009 +0300
@@ -0,0 +1,62 @@
+<%inherit file="channel.tmpl" />
+<%namespace file="inc_paginate.tmpl" import="paginate" />
+
+% if not show_results :
+<div id="title">${channel.title} :: Search</div>
+
+<div id="search">
+ <form action="${h.build_url(urls.channel_search, channel=channel)}" method="GET">
+ <fieldset>
+ <p>
+ <label for="q">Message:</label>
+ <input type="text" name="q" class="wide" />
+ </p>
+
+ <p>
+ <label for="nick">By nickname:</label>
+ <input type="text" name="nick" />
+ <span>(optional)</span>
+ </p>
+
+ <p>
+ <label for="count">Results/page:</label>
+ <select name="count">
+ ${h.select_options(((cc, cc_label) for cc, cc_label in config.SEARCH_LINE_COUNT_OPTIONS), count)}
+ </select>
+ </p>
+
+ <input type="submit" value="Search" />
+ </fieldset>
+ </form>
+
+ <div id="search-help">
+ <p>Search powered by <a href="http://hyperestraier.sourceforge.net/">Hyper Estraier</a>:</p>
+
+ <ul>
+ <li>Group words together using quotes: <tt>"united nations"</tt></li>
+ <li>Searching for multiple words is AND: <tt>internet security</tt></li>
+ <li>To exclude terms, use <strong>!</strong> : <tt>hacker ! cracker</tt></li>
+ <li>Union (i.e. <q>or</q>) using <strong>|</strong> : <tt>proxy | firewall</tt></li>
+ <li>Search is case-insensitive</li>
+ </ul>
+ </div>
+</div>
+
+% else :
+<div id="title">${channel.title} :: Results\
+% if search_query :
+ With '${search_query}'\
+% endif
+% if search_nick :
+ By ${search_nick}\
+% endif
+</div>
+
+${paginate(urls.channel_search, count, page, max, channel=channel, q=search_query, t=search_targets, _more=True, _last=not(bool(lines)))}
+% if lines :
+<%include file="lines.tmpl" />
+% else :
+<div id="search-error">No results found</div>
+% endif
+${paginate(urls.channel_search, count, page, max, channel=channel, q=search_query, t=search_targets, _more=True, _last=not(bool(lines)))}
+% endif