1 | <html xmlns:tal="http://xml.zope.org/namespaces/tal" |
---|
2 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
---|
3 | i18n:domain="plone"> |
---|
4 | <body> |
---|
5 | <div class="listingBar" |
---|
6 | metal:define-macro="navigation" |
---|
7 | tal:define="url string:${here/absolute_url}; |
---|
8 | nav python:results[2]; |
---|
9 | first_item python:len(nav)>0 and nav[0] or []; |
---|
10 | last_item python:len(nav)>1 and nav[1] or []; |
---|
11 | batch python:len(nav)>2 and nav[2] or [];" |
---|
12 | tal:omit-tag="not:nav"> |
---|
13 | |
---|
14 | <span class="previous" |
---|
15 | tal:condition="python:int(b_start)>0"> |
---|
16 | <a href="" |
---|
17 | tal:attributes="href python: '%s?b_start=%s' % (url, int(b_start)-displayItems)"> |
---|
18 | « |
---|
19 | <span i18n:translate="batch_previous_items" tal:omit-tag=""> |
---|
20 | Previous items |
---|
21 | </span> |
---|
22 | </a> |
---|
23 | </span> |
---|
24 | |
---|
25 | <span class="next" tal:condition="not:last"> |
---|
26 | <a href="" |
---|
27 | tal:attributes="href python: '%s?b_start=%s' % (url, int(b_start)+displayItems)"> |
---|
28 | <span i18n:translate="batch_next_items" tal:omit-tag=""> |
---|
29 | Next items |
---|
30 | </span> |
---|
31 | » |
---|
32 | </a> |
---|
33 | </span> |
---|
34 | |
---|
35 | <!-- Link to first --> |
---|
36 | <span tal:condition="first_item"> |
---|
37 | <a href="" |
---|
38 | tal:define="query python:first_item[1];" |
---|
39 | tal:attributes="href python: '%s?%s' % (url, query);">1</a> |
---|
40 | ... |
---|
41 | </span> |
---|
42 | |
---|
43 | <!-- Pagelist with links to previous pages for quick navigation --> |
---|
44 | <span tal:condition="batch" |
---|
45 | tal:repeat="linklist batch" |
---|
46 | tal:omit-tag="" > |
---|
47 | <a href="" |
---|
48 | tal:define="page python:linklist[0]; |
---|
49 | query python:linklist[1];" |
---|
50 | tal:content="python:test(query,page,'[%s]'%page)" |
---|
51 | tal:attributes="href python: '%s?%s' % (url,query)" |
---|
52 | tal:omit-tag="not:query" > |
---|
53 | </a> |
---|
54 | </span> |
---|
55 | |
---|
56 | <!-- Link to last --> |
---|
57 | <span tal:condition="last_item"> |
---|
58 | ... |
---|
59 | <a href="" |
---|
60 | tal:define="page python:last_item[0]; |
---|
61 | query python:last_item[1];" |
---|
62 | tal:attributes="href python: '%s?%s' % (url,query);" |
---|
63 | tal:content="page">3457</a> |
---|
64 | </span> |
---|
65 | |
---|
66 | </div> |
---|
67 | |
---|
68 | </body> |
---|
69 | </html> |
---|