Mercurial > hg > documentViewer
comparison 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 |
comparison
equal
deleted
inserted
replaced
570:61d53ccbdd70 | 571:f1906951be2a |
---|---|
75 <form class="autosubmit" tal:attributes="action viewerUrl" tal:define="startParam startParam | string:start"> | 75 <form class="autosubmit" tal:attributes="action viewerUrl" tal:define="startParam startParam | string:start"> |
76 <input type="hidden" tal:define="params python:here.getParams(startParam, None)" tal:repeat="param params" | 76 <input type="hidden" tal:define="params python:here.getParams(startParam, None)" tal:repeat="param params" |
77 tal:attributes="name param; value python:params[param]" /> <a tal:condition="batch/prevStart" | 77 tal:attributes="name param; value python:params[param]" /> <a tal:condition="batch/prevStart" |
78 tal:attributes="href python:here.getLink(startParam,batch['prevStart'])"><</a> <span tal:condition="not:batch/prevStart"><</span> | 78 tal:attributes="href python:here.getLink(startParam,batch['prevStart'])"><</a> <span tal:condition="not:batch/prevStart"><</span> |
79 <select class="autosubmit" tal:attributes="name startParam"> | 79 <select class="autosubmit" tal:attributes="name startParam"> |
80 <option tal:repeat="grp batch/batches" tal:attributes="selected python:(start==grp['start']); value grp/start" | 80 <option tal:repeat="grp batch/batches" tal:attributes="selected python:(start>=grp['start'] and start<=grp['end']); value grp/start" |
81 tal:content="string:${grp/start} - ${grp/end}" /> | 81 tal:content="string:${grp/start} - ${grp/end}" /> |
82 <option tal:condition="python:start>batch['last']" selected="selected" value="1">[out of range]</option> | |
82 </select> <input type="submit" value="Go" /> <a tal:condition="batch/nextStart" | 83 </select> <input type="submit" value="Go" /> <a tal:condition="batch/nextStart" |
83 tal:attributes="href python:here.getLink(startParam,batch['nextStart'])">></a> <span tal:condition="not:batch/nextStart">></span> | 84 tal:attributes="href python:here.getLink(startParam,batch['nextStart'])">></a> <span tal:condition="not:batch/nextStart">></span> |
84 </form> | 85 </form> |
85 </metal:block> | 86 </metal:block> |
86 | 87 |
90 <input type="hidden" tal:define="params python:here.getParams('start',None)" tal:repeat="param params" | 91 <input type="hidden" tal:define="params python:here.getParams('start',None)" tal:repeat="param params" |
91 tal:attributes="name param; value python:params[param]" /><span class="ruler-main"><a tal:condition="left" | 92 tal:attributes="name param; value python:params[param]" /><span class="ruler-main"><a tal:condition="left" |
92 tal:attributes="href python:here.getLink('start',left)"><</a> <span tal:condition="not:left"><</span> <select | 93 tal:attributes="href python:here.getLink('start',left)"><</a> <span tal:condition="not:left"><</span> <select |
93 class="autosubmit" name="start" tal:define="ofs python:test(pageinfo['pageZero'],0,1)"> | 94 class="autosubmit" name="start" tal:define="ofs python:test(pageinfo['pageZero'],0,1)"> |
94 <tal:block> | 95 <tal:block> |
95 <option tal:repeat="grp pageBatch/batches" tal:attributes="selected python:start==grp['start']; value grp/start;" | 96 <option tal:repeat="grp pageBatch/batches" tal:attributes="selected python:(start>=grp['start'] and start<=grp['end']); value grp/start;" |
96 tal:content="string:${grp/start} - ${grp/end}" /> | 97 tal:content="string:${grp/start} - ${grp/end}" /> |
98 <option tal:condition="python:start>pageBatch['last']" selected="selected" value="1">[out of range]</option> | |
97 </tal:block> | 99 </tal:block> |
98 </select> <input type="submit" value="Go" /> <a tal:condition="right" tal:attributes="href python:here.getLink('start',right)">></a> | 100 </select> <input type="submit" value="Go" /> <a tal:condition="right" tal:attributes="href python:here.getLink('start',right)">></a> |
99 <span tal:condition="not:right">></span></span> | 101 <span tal:condition="not:right">></span></span> |
100 </form> | 102 </form> |
101 </metal:block> | 103 </metal:block> |