Mercurial > hg > documentViewer
view zpt/thumbs_main.zpt @ 22:b139f9937e97
preliminary version 0.2
- lots of stuff rewritten
- new template system
- still no access control
author | casties |
---|---|
date | Thu, 06 Apr 2006 19:13:43 +0200 |
parents | |
children | e93fb8cadd3a |
line wrap: on
line source
<div tal:define="cols python:2; rows python:10; docinfo python:options['docinfo']; pageinfo python:options['pageinfo']; start python:pageinfo['start']; end python:min(start+cols*rows,int(docinfo['numberOfPages'])); current pageinfo/current; rowsCorrected python:divmod(end-start,cols);"> <span tal:replace="structure python:here.thumbruler(cols,rows,start,int(docinfo['numberOfPages']))"/> <table> <tr tal:repeat="i python:range(rowsCorrected[0])"> <td align="center" tal:repeat="j python:range(start+i*cols,start+(i+1)*cols)" tal:attributes="class python:here.getStyle(str(j+1),current,'thumb')"> <a tal:attributes="href python:here.imageLink(j+1)"> <img class="thumbimg" border="0" tal:attributes="src python:docinfo['imageURL']+'&pn=%i&dw=100&dh=100'%(j+1)"/> <div class="thumbcap" tal:content="python:(j+1)"/> </a> </td> </tr> <tr tal:condition="python:rowsCorrected[1]>0"> <td align="center" tal:repeat="j python:range(start+cols*rowsCorrected[0],int(docinfo['numberOfPages']))" tal:attributes="class python:here.getStyle(str(j+1),current,'thumb')"> <a tal:attributes="href python:here.imageLink(j+1)"> <img class="thumbimg" border="0" tal:attributes="src python:docinfo['imageURL']+'&pn=%i&dw=100&dh=100'%(j+1)"/> <div class="thumbcap" tal:content="python:(j+1)"/> </a> </td> </tr> </table> </div>