File:  [Repository] / documentViewer / zpt / Attic / thumbs_main.zpt
Revision 1.4: download - view: text, annotated - select for diffs - revision graph
Wed Apr 12 17:47:53 2006 UTC (18 years, 2 months ago) by casties
Branches: MAIN
CVS tags: roc_1, Root_roc_1, HEAD
version 0.2.4
* minor improvements
* tries more than one time to read info from digilib

    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">
    4: <div class="thumbruler">
    5:   <span tal:condition="python:(start>1)">
    6:     <a tal:attributes="href python:here.getLink(param='start',val=max(start-grpsize,1))">&lt;</a>
    7:   </span>
    8:   <select tal:attributes="onChange python:'location.href=\''+here.getLink(param='start',val=None)+'&start=\'+this.options[this.selectedIndex].value'">
    9:     <option tal:repeat="grp python:range(pageinfo['numgroups'])" 
   10:       tal:attributes="selected python:(start==grp*grpsize+1); value python:(grp*grpsize+1)"
   11:       tal:content="python:(grp*grpsize+1)"/>
   12:   </select>
   13:   <span tal:condition="python:(start+grpsize<int(docinfo['numPages']))">
   14:     <a tal:attributes="href python:here.getLink(param='start',val=start+grpsize)">&gt;</a>
   15:   </span>
   16: </div>
   17: <table>
   18:   <tr tal:repeat="row python:range(rows)">
   19:     <tal:block tal:repeat="idx python:range(start+row*cols,start+(row+1)*cols)">
   20:       <td align="center" tal:condition="python:(idx<=end)"
   21: 		  	tal:attributes="class python:here.getStyle(idx,current,'thumb')">
   22: 		<a tal:attributes="href python:here.getLink(param='pn',val=idx)">
   23: 		  <img class="thumbimg" border="0" tal:attributes="src string:${docinfo/imageURL}&pn=$idx&dw=100&dh=100"/>
   24: 		  <div class="thumbcap" tal:content="idx"/>
   25: 		</a>
   26: 	  </td>
   27:     </tal:block>
   28:   </tr>
   29: </table>
   30: </div>

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