--- a/templates/channel_search.tmpl Sun Sep 13 01:15:56 2009 +0300
+++ b/templates/channel_search.tmpl Sun Sep 13 18:47:00 2009 +0300
@@ -1,26 +1,32 @@
<%inherit file="channel.tmpl" />
<%namespace file="inc_paginate.tmpl" import="paginate" />
-% if not search_query :
+% 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>
- <div id="search-form">
- <input type="text" name="q" />
+ <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" />
- </div>
-
-<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>
- <label for="t">Search in:</label><br/>
- <div class="indent"><input type="radio" name="t" value="msg" checked="checked" /> Messages</div>
- <div class="indent"><input type="radio" name="t" value="nick" /> Nicknames</div>
+ </fieldset>
</form>
<div id="search-help">
@@ -37,7 +43,14 @@
</div>
% else :
-<div id="title">${channel.title} :: Search '${search_query}'</div>
+<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 :