comparison zpt/toc_text.zpt @ 482:7ca8ac7db06e elementtree

more new template stuff. more batching methods in documentViewer.
author casties
date Tue, 16 Aug 2011 18:27:08 +0200
parents 0a0f7f570f90
children ec3d848fe9e8
comparison
equal deleted inserted replaced
481:0a0f7f570f90 482:7ca8ac7db06e
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 </head> 6 </head>
7 <body> 7 <body>
8 <!-- block used for main content area --> 8 <!-- block used for main content area -->
9 <div class="col_left" metal:define-macro="main" 9 <div class="col_left" metal:define-macro="main"
10 tal:define="docinfo options/docinfo; pageinfo options/pageinfo; 10 tal:define="start pageinfo/start; tocsize docinfo/tocSize_text; grpsize pageinfo/tocPageSize;
11 pn python:int(pageinfo['tocPN']); tocsize python:int(docinfo['tocSize_text']); grpsize python:int(pageinfo['tocPageSize']); 11 batch python:here.getBatch(start=start,size=grpsize,end=tocsize);">
12 maxpn python:int(tocsize/grpsize);"> 12 <ul class="switcher">
13 <div class="thumbruler"> 13 <li><a
14 <span tal:condition="python:(pn>1)"> 14 tal:attributes="href python:here.getLink('tocMode','thumbs')">Thumbnails</a>
15 <a tal:attributes="href python:here.getLink(param='tocPN',val=pn-1)">&lt;</a> 15 </li>
16 </span> 16 <li class="sel"
17 <span tal:content="string:$pn of $tocsize"/> 17 tal:condition="python:docpath and docinfo.get('numTocEntries', None)">
18 <span> 18 <a tal:attributes="href python:here.getLink('tocMode','text')">Content</a>
19 <a tal:attributes="href python:here.getLink(param='tocPN',val=pn+1)">&gt;</a> 19 </li>
20 </span> 20 <li
21 </div> 21 tal:condition="python:docpath and docinfo.get('numFigureEntries', None)">
22 <div class="content" tal:content="structure python:here.getTocPage(mode='text',pageinfo=pageinfo,docinfo=docinfo)"/> 22 <a
23 </div> <!-- toc --> 23 tal:attributes="href python:here.getLink('tocMode','figures')">Figures</a>
24 </li>
25 <li><a
26 tal:attributes="href python:here.getLink('tocMode','none')">None</a>
27 </li>
28 </ul>
29 <div class="ruler">
30 <form class="autosubmit" tal:attributes="action viewerUrl">
31 <input type="hidden"
32 tal:define="params python:here.getParams('start', None)"
33 tal:repeat="param params"
34 tal:attributes="name param; value python:params[param]" />
35 <a tal:condition="batch/prevStart"
36 tal:attributes="href python:here.getLink('start',batch['prevStart'])">&lt;</a>
37 <span tal:condition="not:batch/prevStart">&lt;</span>
38 <select class="autosubmit" name="start">
39 <option tal:repeat="grp batch/batches"
40 tal:attributes="selected python:(start==grp['start']); value grp/start"
41 tal:content="string:${grp/start} - ${grp/end}" />
42 </select>
43 <input type="submit" value="Go" />
44 <a tal:condition="batch/nextStart"
45 tal:attributes="href python:here.getLink('start',batch['nextStart'])">&gt;</a>
46 <span tal:condition="not:batch/nextStart">&gt;</span>
47 </form>
48 </div>
49 <div class="content"
50 tal:content="structure python:here.getTocPage(mode='text',start=start,pageinfo=pageinfo,docinfo=docinfo)" />
51 </div>
52 <!-- toc -->
24 </body> 53 </body>
25 </html> 54 </html>