author Tero Marttila <terom@fixme.fi>
Mon, 16 Feb 2009 00:54:25 +0200
changeset 132 0e857c4a67de
parent 118 f530c158aa07
child 141 65c98c9e1716
permissions -rw-r--r--
cache version across calls to version_mercurial, so as to avoid opening the repo every time
<%inherit file="channel.tmpl" />
<%namespace file="inc_paginate.tmpl" import="paginate" />

% if not search_query :
<div id="title">${channel.title} :: Search</div>

<div id="search">
    <form action="${h.build_url(urls.channel_search, channel=channel)}" method="GET">

        <div id="search-form">    
            <input type="text" name="q" />
            <input type="submit" value="Search" />
        <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)}
        <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>
    <div id="search-help">
        <p>Search powered by <a href="http://hyperestraier.sourceforge.net/">Hyper Estraier</a>:</p>

            <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>

% else :
<div id="title">${channel.title} :: Search '${search_query}'</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