Mercurial > hg > documentViewer
diff zpt/common_template.zpt @ 571:f1906951be2a
nicer batching of tocs
author | casties |
---|---|
date | Fri, 12 Oct 2012 17:02:40 +0200 |
parents | 6cdc31e9ed8e |
children | 9251719154a3 |
line wrap: on
line diff
--- a/zpt/common_template.zpt Fri Oct 12 16:01:41 2012 +0200 +++ b/zpt/common_template.zpt Fri Oct 12 17:02:40 2012 +0200 @@ -77,8 +77,9 @@ tal:attributes="name param; value python:params[param]" /> <a tal:condition="batch/prevStart" tal:attributes="href python:here.getLink(startParam,batch['prevStart'])"><</a> <span tal:condition="not:batch/prevStart"><</span> <select class="autosubmit" tal:attributes="name startParam"> - <option tal:repeat="grp batch/batches" tal:attributes="selected python:(start==grp['start']); value grp/start" + <option tal:repeat="grp batch/batches" tal:attributes="selected python:(start>=grp['start'] and start<=grp['end']); value grp/start" tal:content="string:${grp/start} - ${grp/end}" /> + <option tal:condition="python:start>batch['last']" selected="selected" value="1">[out of range]</option> </select> <input type="submit" value="Go" /> <a tal:condition="batch/nextStart" tal:attributes="href python:here.getLink(startParam,batch['nextStart'])">></a> <span tal:condition="not:batch/nextStart">></span> </form> @@ -92,8 +93,9 @@ tal:attributes="href python:here.getLink('start',left)"><</a> <span tal:condition="not:left"><</span> <select class="autosubmit" name="start" tal:define="ofs python:test(pageinfo['pageZero'],0,1)"> <tal:block> - <option tal:repeat="grp pageBatch/batches" tal:attributes="selected python:start==grp['start']; value grp/start;" + <option tal:repeat="grp pageBatch/batches" tal:attributes="selected python:(start>=grp['start'] and start<=grp['end']); value grp/start;" tal:content="string:${grp/start} - ${grp/end}" /> + <option tal:condition="python:start>pageBatch['last']" selected="selected" value="1">[out of range]</option> </tal:block> </select> <input type="submit" value="Go" /> <a tal:condition="right" tal:attributes="href python:here.getLink('start',right)">></a> <span tal:condition="not:right">></span></span>