terom@63: <%inherit file="channel.tmpl" />
terom@63:
terom@74: <%def name="paginate(url, count, skip, max, _more=None, **args)">
terom@73: ## update max?
terom@74: % if more :
terom@74: <% max = h.max(max, skip) %>
terom@74: % else :
terom@74: <% max = skip %>
terom@74: % endif
terom@73: ## number of pages
terom@73: <% page_count = max / count + 1 %>
terom@73:
terom@73:
terom@73: -
terom@73: % if skip :
terom@73: « Prev
terom@73: % else :
terom@73: « Prev
terom@73: %endif
terom@73:
terom@73: % for page in xrange(page_count) :
terom@73: -
terom@73: % if page == skip / count :
terom@73: ${page + 1}
terom@73: % else :
terom@73: ${page + 1}
terom@73: % endif
terom@73:
terom@73: % endfor
terom@73: -
terom@74: % if _more :
terom@73: More »
terom@74: % elif False :
terom@74: Next »
terom@74: % else : ## last page
terom@74: 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@74: ${paginate(urls.channel_search, count, skip, max, channel=channel, q=search_query, _more=bool(lines))}
terom@74: % if lines :
terom@69: <%include file="lines.tmpl" />
terom@74: % else :
terom@74: No results found
terom@63: % endif
terom@74: ${paginate(urls.channel_search, count, skip, max, channel=channel, q=search_query, _more=bool(lines))}
terom@74: % endif