File:  [Repository] / documentViewer / zpt / Attic / thumbs_main.zpt
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Thu Apr 6 17:13:43 2006 UTC (18 years, 3 months ago) by casties
Branches: MAIN
CVS tags: HEAD
preliminary version 0.2
- lots of stuff rewritten
- new template system
- still no access control

<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>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>