sites/irclogs.qmsk.net/templates/channel.tmpl
author Tero Marttila <terom@fixme.fi>
Sun, 08 Feb 2009 02:29:23 +0200
branchsites
changeset 42 5a72c00c4ae4
parent 41 9585441a4bfb
child 43 fc11c4e86a82
permissions -rw-r--r--
more fiddling around with the irclogs layout/css, add query args to URL
<%inherit file="layout.tmpl" />

<%def name="menu()">
<ul>
    <li><a href="${urls.index.build(req)}">Home</a></li>

    <li>
        <form action="${urls.channel_select.build(req)}" method="GET">
            <label for="channel">Channel:</label>

            <select name="channel">
            % for ch in channel_list :
                <option value="${ch.id}"${' selected="selected"' if ch == channel else ''}>${ch.title}</option>
            % endfor
            </select><input type="submit" value="Go &raquo;" />
        </form>
    </li>

    <li>
        <form action="#" method="GET">
            View last

            <select name="count">
            % for count in (10, 20, 50, 100, 'all') :
                <option>${count}</option>
            % endfor
            </select>

            lines: <input type="submit" value="Go &raquo;" />
        </form>
    </li>

    <li><a href="#">Browse by Date</a></li>

    <li><a href="#">Search</a></li>

    <li><a href="#">[RSS]</a></li>
</ul>
</%def>

<h1>${channel.title} &raquo; Last 10 lines</h1>

<pre>
% for line in channel.source.get_latest(10) :
${line}
% endfor
</pre>