Changeset 25:e93fb8cadd3a in documentViewer for zpt
- Timestamp:
- Apr 7, 2006, 6:45:48 PM (18 years ago)
- Branch:
- default
- Location:
- zpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
zpt/changeDocumentViewer.zpt
r24 r25 12 12 <p class="form-text">This information can be automatically detected if the image viewer above is a Zogilib instance.<br/> 13 13 You must clear this field when you change the image viewer URL above.</p> 14 <p class="form-optional">Thumbnail rows</p> 15 <p class="form-element"><input size="3" tal:attributes="value here/thumbrows | default" name="thumbrows"></p> 16 <p class="form-optional">Thumbnail columns</p> 17 <p class="form-element"><input size="3" tal:attributes="value here/thumbcols | default" name="thumbcols"></p> 14 18 15 19 <p><input type="submit" value="change"></p> -
zpt/thumbs_main.zpt
r22 r25 1 <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);"> 2 <span tal:replace="structure python:here.thumbruler(cols,rows,start,int(docinfo['numberOfPages']))"/> 3 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))"><</a> 7 </span> 8 <select tal:attributes="onChange python:'location.href=\'%s&start=\'+this.options[this.selectedIndex].value'%here.getLink(param='start',val=None)"> 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<docinfo['numPages'])"> 14 <a tal:attributes="href python:here.getLink(param='start',val=start+grpsize)">></a> 15 </span> 16 </div> 4 17 <table> 5 <tr tal:repeat="i python:range(rowsCorrected[0])"> 6 <td align="center" tal:repeat="j python:range(start+i*cols,start+(i+1)*cols)" 7 tal:attributes="class python:here.getStyle(str(j+1),current,'thumb')"> 8 <a tal:attributes="href python:here.imageLink(j+1)"> 9 <img class="thumbimg" border="0" tal:attributes="src python:docinfo['imageURL']+'&pn=%i&dw=100&dh=100'%(j+1)"/> 10 <div class="thumbcap" tal:content="python:(j+1)"/> 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 python:'%s&pn=%d&dw=100&dh=100'%(docinfo['imageURL'],idx)"/> 24 <div class="thumbcap" tal:content="idx"/> 11 25 </a> 12 </td> 13 </tr> 14 <tr tal:condition="python:rowsCorrected[1]>0"> 15 <td align="center" tal:repeat="j python:range(start+cols*rowsCorrected[0],int(docinfo['numberOfPages']))" 16 tal:attributes="class python:here.getStyle(str(j+1),current,'thumb')"> 17 <a tal:attributes="href python:here.imageLink(j+1)"> 18 <img class="thumbimg" border="0" tal:attributes="src python:docinfo['imageURL']+'&pn=%i&dw=100&dh=100'%(j+1)"/> 19 <div class="thumbcap" tal:content="python:(j+1)"/> 20 </a> 21 </td> 22 </tr> 26 </td> 27 </tal:block> 28 </tr> 23 29 </table> 24 30 </div>
Note: See TracChangeset
for help on using the changeset viewer.