Mercurial > hg > documentViewer
changeset 17:99f6bd1a797f
fist
author | dwinter |
---|---|
date | Sun, 18 Dec 2005 13:35:02 +0100 |
parents | 312446f900da |
children | fb86ce30a997 |
files | zpt/documentViewer_template.zpt zpt/thumbs.zpt |
diffstat | 2 files changed, 32 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/documentViewer_template.zpt Sun Dec 18 13:35:02 2005 +0100 @@ -0,0 +1,14 @@ +<html> +<body> +<table border="0" width="100%"> + <tr> + <td width="30%"> + <tal:x replace="structure python:here.thumbs(options['mode'],options['url'],options['start'])"/> + </td> + <td width="70%"> + <iframe height="100%" width="100%" tal:attributes="src python:here.image(options['mode'],options['url'],options['pn'])"/> + </td> + </tr> + </table> +</body> +</html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/zpt/thumbs.zpt Sun Dec 18 13:35:02 2005 +0100 @@ -0,0 +1,18 @@ +<div tal:define="cols python:3; rows python:10; start python:options['start']; end python:min(start+cols*rows,int(options['pt'])); rowsCorrected python:divmod(end-start,cols);"> +<span tal:replace="structure python:here.thumbruler(cols,rows,start,int(options['pt']))"/> + +<table> + <tr tal:repeat="i python:range(rowsCorrected[0])"> + <td tal:repeat="j python:range(start+i*cols,start+(i+1)*cols)"> + <a tal:attributes="href python:here.imageLink(j+1)"> + <img tal:attributes="src python:options['imageUrl']+'&pn=%i&dw=100&dh=100'%(j+1)"> + </a> + </td> + </tr> + <tr tal:condition="python:rowsCorrected[1]>0"> + <td tal:repeat="j python:range(start+3*rowsCorrected[0],int(options['pt']))"> + <img tal:attributes="src python:options['imageUrl']+'&pn=%i&dw=100&dh=100'%(j+1)"> + </td> + </tr> +</table> +</div>