--- a/templates/channel_search.tmpl Tue Feb 10 00:19:56 2009 +0200
+++ b/templates/channel_search.tmpl Tue Feb 10 01:02:26 2009 +0200
@@ -1,43 +1,5 @@
<%inherit file="channel.tmpl" />
-
-<%def name="paginate(url, count, page_cur, page_max, _more=None, _last=False, **args)">
- <%doc>
- Pagination works using page numbers, with a specific number of maximum pages displayed. If _more is True,
- then instead of a "Next" button, we have a "More" button, which goes to the max+1'th page, unless _last is
- True, whereupon it's not displayed
- </%doc>
- <div class="paginate">
- <ul>
- <li>
- % if page_cur > 1 :
- <a href="${h.build_url(url, count=count, page=page_cur-1, max=max, **args)}">« Prev</a>
- % else :
- <span>« Prev</span>
- %endif
- </li>
- % for page in xrange(1, page_max + 1) :
- <li>
- % if page == page_cur :
- <strong>${page}</strong>
- % else :
- <a href="${h.build_url(url, count=count, page=page, max=page_max, **args)}">${page}</a>
- % endif
- </li>
- % endfor
- <li>
- % if _more and _last :
- <span>More »</span>
- % elif _more :
- <a href="${h.build_url(url, count=count, page=page_max+1, **args)}">More »</a>
- % elif page_cur == page_max : ## last page
- <span>Next »</span>
- % else :
- <a href="${h.build_url(url, count=count, page=page+1, **args)}">Next »</a>
- % endif
- </li>
- </ul>
- </div>
-</%def>
+<%namespace file="inc_paginate.tmpl" import="paginate" />
% if not search_query :
<div id="title">${channel.title} :: Search</div>