Changeset 480:50a28442f21c in documentViewer for zpt/toc_thumbs.zpt
- Timestamp:
- Aug 15, 2011, 7:09:08 PM (13 years ago)
- Branch:
- elementtree
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
zpt/toc_thumbs.zpt
r122 r480 1 <div tal:define="docinfo options/docinfo; pageinfo options/pageinfo; 2 start pageinfo/start; end pageinfo/end; rows pageinfo/rows; cols pageinfo/cols; 3 current pageinfo/current; grpsize pageinfo/groupsize"> 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 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"> 6 <span tal:condition="python:(start>1)"> 7 <a tal:attributes="href python:here.getLink(param='start',val=max(start-grpsize,1))"><</a> 8 </span> 9 <select tal:attributes="onChange python:'location.href=\''+here.getLink(param='start',val=None)+'&start=\'+this.options[this.selectedIndex].value'"> 10 <option tal:repeat="grp python:range(pageinfo['numgroups'])" 11 tal:attributes="selected python:(start==grp*grpsize+1); value python:(grp*grpsize+1)" 12 tal:content="python:(grp*grpsize+1)"/> 13 </select> 14 <span tal:condition="python:(start+grpsize<int(docinfo['numPages']))"> 15 <a tal:attributes="href python:here.getLink(param='start',val=start+grpsize)">></a> 16 </span> 17 </div> 18 <table> 19 <tr tal:repeat="row python:range(rows)"> 20 <tal:block tal:repeat="idx python:range(start+row*cols,start+(row+1)*cols)"> 21 <td align="center" tal:condition="python:(idx<=end)" 22 tal:attributes="class python:here.getStyle(idx,current,'thumb')"> 23 <a tal:attributes="href python:here.getLink(param='pn',val=idx)"> 24 <img class="thumbimg" border="0" tal:attributes="src string:${docinfo/imageURL}&pn=$idx&dw=100&dh=100"/> 25 <div class="thumbcap" tal:content="idx"/> 26 </a> 27 </td> 28 </tal:block> 29 </tr> 30 </table> 31 </div> 31 <div class="content"> 32 <div class="ruler"> 33 <form class="autosubmit" tal:attributes="action viewerUrl"> 34 <input type="hidden" tal:define="params python:here.getParams('start',None)" 35 tal:repeat="param params" 36 tal:attributes="name param; value python:params[param]" /> 37 <a tal:condition="left" tal:attributes="href python:here.getLink('start',left)"><</a> 38 <span tal:condition="not:left"><</span> 39 <select class="autosubmit" name="start" 40 tal:define="ofs python:test(pageinfo['pageZero'],0,1)"> 41 <tal:block tal:repeat="grp python:range(numgroups)"> 42 <option tal:define="idx python:max(grp*grpsize+ofs,1)" 43 tal:attributes="selected python:start==idx; value idx;" 44 tal:content="python:'%s - %s'%(idx,min((grp+1)*grpsize+ofs-1,numPages))" /> 45 </tal:block> 46 </select> 47 <input type="submit" value="Go" /> 48 <a tal:condition="right" tal:attributes="href python:here.getLink('start',right)">></a> 49 <span tal:condition="not:right">></span> 50 </form> 51 </div> 52 53 <table class="thumbs"> 54 <tr tal:repeat="row pageBatch/pages"> 55 <td tal:repeat="thumb row" 56 tal:attributes="class python:here.getStyle(thumb['idx'],pn,'thumb')"> 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>
Note: See TracChangeset
for help on using the changeset viewer.