Mercurial > hg > documentViewer
comparison zpt/toc_thumbs.zpt @ 480:50a28442f21c elementtree
more new template stuff
author | casties |
---|---|
date | Mon, 15 Aug 2011 21:09:08 +0200 |
parents | 027134cca83e |
children | 0a0f7f570f90 |
comparison
equal
deleted
inserted
replaced
479:fe5b0e4ac5f2 | 480:50a28442f21c |
---|---|
1 <div tal:define="docinfo options/docinfo; pageinfo options/pageinfo; | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
2 start pageinfo/start; end pageinfo/end; rows pageinfo/rows; cols pageinfo/cols; | 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
3 current pageinfo/current; grpsize pageinfo/groupsize"> | 3 <html xmlns="http://www.w3.org/1999/xhtml"> |
4 <head> | |
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
6 </head> | |
7 <body> | |
8 <!-- block used for main content area --> | |
9 <div class="toc" metal:define-macro="main" | |
10 tal:define="start pageinfo/start; | |
11 grpsize pageinfo/groupsize; | |
12 numgroups pageinfo/numgroups; | |
13 pageBatch pageinfo/pageBatch; pageZero pageinfo/pageZero; | |
14 left python:test(flowLtr,pageBatch['prevStart'],pageBatch['nextStart']); | |
15 right python:test(flowLtr,pageBatch['nextStart'],pageBatch['prevStart']);"> | |
16 <ul class="toctype"> | |
17 <li class="sel"> | |
18 <a tal:attributes="href python:here.getLink('tocMode','thumbs')">Thumbnails</a> | |
19 </li> | |
20 <li tal:condition="python:docinfo.get('numTocEntries', None)"> | |
21 <a tal:attributes="href python:here.getLink('tocMode','text')">Content</a> | |
22 </li> | |
23 <li tal:condition="python:docinfo.get('numFigureEntries', None)"> | |
24 <a tal:attributes="href python:here.getLink('tocMode','figures')">Figures</a> | |
25 </li> | |
26 <li> | |
27 <a tal:attributes="href python:here.getLink('tocMode','none')">None</a> | |
28 </li> | |
29 </ul> | |
4 | 30 |
5 <div class="thumbruler"> | 31 <div class="content"> |
6 <span tal:condition="python:(start>1)"> | 32 <div class="ruler"> |
7 <a tal:attributes="href python:here.getLink(param='start',val=max(start-grpsize,1))"><</a> | 33 <form class="autosubmit" tal:attributes="action viewerUrl"> |
8 </span> | 34 <input type="hidden" tal:define="params python:here.getParams('start',None)" |
9 <select tal:attributes="onChange python:'location.href=\''+here.getLink(param='start',val=None)+'&start=\'+this.options[this.selectedIndex].value'"> | 35 tal:repeat="param params" |
10 <option tal:repeat="grp python:range(pageinfo['numgroups'])" | 36 tal:attributes="name param; value python:params[param]" /> |
11 tal:attributes="selected python:(start==grp*grpsize+1); value python:(grp*grpsize+1)" | 37 <a tal:condition="left" tal:attributes="href python:here.getLink('start',left)"><</a> |
12 tal:content="python:(grp*grpsize+1)"/> | 38 <span tal:condition="not:left"><</span> |
13 </select> | 39 <select class="autosubmit" name="start" |
14 <span tal:condition="python:(start+grpsize<int(docinfo['numPages']))"> | 40 tal:define="ofs python:test(pageinfo['pageZero'],0,1)"> |
15 <a tal:attributes="href python:here.getLink(param='start',val=start+grpsize)">></a> | 41 <tal:block tal:repeat="grp python:range(numgroups)"> |
16 </span> | 42 <option tal:define="idx python:max(grp*grpsize+ofs,1)" |
17 </div> | 43 tal:attributes="selected python:start==idx; value idx;" |
18 <table> | 44 tal:content="python:'%s - %s'%(idx,min((grp+1)*grpsize+ofs-1,numPages))" /> |
19 <tr tal:repeat="row python:range(rows)"> | 45 </tal:block> |
20 <tal:block tal:repeat="idx python:range(start+row*cols,start+(row+1)*cols)"> | 46 </select> |
21 <td align="center" tal:condition="python:(idx<=end)" | 47 <input type="submit" value="Go" /> |
22 tal:attributes="class python:here.getStyle(idx,current,'thumb')"> | 48 <a tal:condition="right" tal:attributes="href python:here.getLink('start',right)">></a> |
23 <a tal:attributes="href python:here.getLink(param='pn',val=idx)"> | 49 <span tal:condition="not:right">></span> |
24 <img class="thumbimg" border="0" tal:attributes="src string:${docinfo/imageURL}&pn=$idx&dw=100&dh=100"/> | 50 </form> |
25 <div class="thumbcap" tal:content="idx"/> | 51 </div> |
26 </a> | 52 |
27 </td> | 53 <table class="thumbs"> |
28 </tal:block> | 54 <tr tal:repeat="row pageBatch/pages"> |
29 </tr> | 55 <td tal:repeat="thumb row" |
30 </table> | 56 tal:attributes="class python:here.getStyle(thumb['idx'],pn,'thumb')"> |
31 </div> | 57 <a tal:define="idx thumb/idx" tal:condition="idx" |
58 tal:attributes="href python:here.getLink('pn',idx)"> | |
59 <img | |
60 tal:attributes="src python:test(docinfo['imageURL'],here.getScalerUrl(pn=idx,dw=100,dh=100,docinfo=docinfo),'images/pic'); | |
61 alt idx" /><br/> | |
62 <span tal:content="idx" /> | |
63 </a> | |
64 </td> | |
65 </tr> | |
66 </table> | |
67 </div> <!-- content --> | |
68 </div> <!-- toc --> | |
69 </body> | |
70 </html> |