X-Git-Url: https://svn.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/3e0a2c257d49fb162da9c70d2f70194036235166..0e1001b6ac27e549894f82fc2ca68bcf60161d5b:/skins/generic/batch_macros.pt?ds=sidebyside diff --git a/skins/generic/batch_macros.pt b/skins/generic/batch_macros.pt index f5dedc1..b753a16 100644 --- a/skins/generic/batch_macros.pt +++ b/skins/generic/batch_macros.pt @@ -8,28 +8,28 @@ <div class="listingBar" metal:define-macro="navigation" tal:define="request request|here/request|container/request|nothing; - form python:request.form.copy(); + form form|request/form/copy; dummy python:form.has_key('ajax') and form.pop('ajax'); batch batch|nothing; mq python:modules['ZTUtils'].make_query; mpq python:lambda fv,pn=-1 : mq(fv, {batch.b_start_str : pn * (batch.size - batch.overlap) - batch.size}) ; - url python:request.get('URL0'); + url python:options.get('batchBaseUrl', request.get('URL0')); currentpage batch/pagenumber;" tal:attributes="id navBatchBarId|nothing" tal:condition="python: batch.next or batch.previous" i18n:domain="plinn"> <a href="" class="previous" - tal:define="p batch/previous | nothing" - tal:attributes="href python: '%s?%s' % (url , mq( form, {batch.b_start_str:p.first} ))" - tal:condition="p"> - « <span i18n:translate="batch_previous_x_items" tal:omit-tag="">Previous<span i18n:name="number" tal:content="p/length" tal:omit-tag="">n</span></span> + tal:define="p batch/previous | nothing" + tal:attributes="href python: '%s?%s' % (url , mq( form, {batch.b_start_str:p.first} ))" + tal:condition="p"> + « <span i18n:translate="batch_previous_x_items" tal:omit-tag="">previous <span i18n:name="number" tal:content="p/length" tal:omit-tag="">n</span></span> </a> <a href="" class="next" tal:define="n batch/next | nothing" tal:condition="n" tal:attributes="href python: '%s?%s' % (url , mq( form, {batch.b_start_str:n.first} ))"> - <span i18n:translate="batch_next_x_items" tal:omit-tag="">Next<span i18n:name="number" tal:content="n/length">n</span>items</span> » + <span i18n:translate="batch_next_x_items" tal:omit-tag="">next <span i18n:name="number" tal:content="n/length">n</span></span> » </a> <span tal:condition="python: 1 not in batch.navlist">