templates/inc_paginate.tmpl
changeset 143 154d2d8ae9c0
parent 142 e163794ccf54
child 144 35c4c56f1376
--- a/templates/inc_paginate.tmpl	Sun Sep 13 18:57:48 2009 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-## special overrides...
-<%def name="paginate_left()">
-
-</%def>
-
-<%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.
-
-        Can be called using <%call>, whereupon caller.left/caller.right can define additional data to display at the
-        left/right of the pagination ul.
-    </%doc>
-    <div class="paginate">
-        <ul>
-        % if caller and caller.right :
-            <li class="paginate-right">
-                ${caller.right()}
-            </li>
-        % endif
-        % if caller and caller.left :
-            <li class="paginate-left">
-                ${caller.left()}
-            </li>
-        % endif
-            <li>
-            % if page_cur > 1 :
-                <a href="${h.build_url(url, count=count, page=page_cur-1, max=max, **args)}">&laquo; Prev</a>
-            % else :
-                <span>&laquo; 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
-        % if _more and not _last :
-            <li>&hellip;</li>
-        % endif
-            <li>
-            % if _more and _last :
-                <span>More &raquo;</span>
-            % elif _more : 
-                <a href="${h.build_url(url, count=count, page=page_max+1, **args)}">More &raquo;</a>
-            % elif page_cur == page_max : ## last page
-                <span>Next &raquo;</span>
-            % else : 
-                <a href="${h.build_url(url, count=count, page=page_cur+1, **args)}">Next &raquo;</a>
-            % endif
-            </li>
-        </ul>
-    </div>
-</%def>
-