terom@63: <%inherit file="channel.tmpl" />
terom@63:
terom@75: <%def name="paginate(url, count, page_cur, page_max, _more=None, _last=False, **args)">
terom@75: <%doc>
terom@75: Pagination works using page numbers, with a specific number of maximum pages displayed. If _more is True,
terom@75: then instead of a "Next" button, we have a "More" button, which goes to the max+1'th page, unless _last is
terom@75: True, whereupon it's not displayed
terom@75: %doc>
terom@73:
terom@73:
terom@73: -
terom@75: % if page_cur > 1 :
terom@75: « Prev
terom@73: % else :
terom@73: « Prev
terom@73: %endif
terom@73:
terom@75: % for page in xrange(1, page_max + 1) :
terom@73: -
terom@75: % if page == page_cur :
terom@75: ${page}
terom@73: % else :
terom@75: ${page}
terom@73: % endif
terom@73:
terom@73: % endfor
terom@73: -
terom@75: % if _more and _last :
terom@75: More »
terom@75: % elif _more :
terom@75: More »
terom@75: % elif page_cur == page_max : ## last page
terom@74: Next »
terom@75: % else :
terom@75: Next »
terom@74: % endif
terom@73:
terom@73:
terom@73:
terom@73: %def>
terom@73:
terom@65: % if not search_query :
terom@63: ${channel.title} :: Search
terom@63:
terom@68:
terom@68:
terom@68:
terom@68:
terom@68:
Search powered by Hyper Estraier:
terom@63:
terom@68:
terom@68: - Group words together using quotes: "united nations"
terom@68: - Searching for multiple words is AND: internet security
terom@68: - To exclude terms, use ! : hacker ! cracker
terom@68: - Union (i.e.
or
) using | : proxy | firewall
terom@68: - Search is case-insensitive
terom@68:
terom@68:
terom@68:
terom@63:
terom@63: % else :
terom@65: ${channel.title} :: Search '${search_query}'
terom@63:
terom@75: ${paginate(urls.channel_search, count, page, max, channel=channel, q=search_query, _more=True, _last=not(bool(lines)))}
terom@74: % if lines :
terom@69: <%include file="lines.tmpl" />
terom@74: % else :
terom@74: No results found
terom@63: % endif
terom@75: ${paginate(urls.channel_search, count, page, max, channel=channel, q=search_query, _more=True, _last=not(bool(lines)))}
terom@74: % endif