templates/channel_search.tmpl
author Tero Marttila <terom@fixme.fi>
Fri, 13 Feb 2009 00:29:47 +0200
changeset 121 86aebc9cb60b
parent 118 f530c158aa07
child 141 65c98c9e1716
permissions -rw-r--r--
some quickfixes to fix deployment errors
<%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" />
        </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>
    </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} :: 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