Changeset 607:cb5a9c4f5e3a in documentViewer for zpt/viewer
- Timestamp:
- Dec 14, 2012, 10:28:31 PM (12 years ago)
- Branch:
- default
- Location:
- zpt/viewer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
zpt/viewer/common_template.zpt
r594 r607 45 45 <!-- page ruler with previous/next page buttons --> 46 46 <metal:block metal:define-macro="page_ruler" 47 tal:define=" 48 prev python:test(pn> 1,pn-1,None); next python:test(pn<numPages,pn+1,None);49 first python:test(pn> 1,1,None); last python:test(pn<numPages,numPages,None);47 tal:define="minPageNo docinfo/minPageNo; maxPageNo docinfo/maxPageNo; 48 prev python:test(pn>minPageNo,pn-1,None); next python:test(pn<maxPageNo,pn+1,None); 49 first python:test(pn>minPageNo,minPageNo,None); last python:test(pn<maxPageNo,maxPageNo,None); 50 50 left python:test(flowLtr,prev,next); right python:test(flowLtr,next,prev); 51 51 leftest python:test(flowLtr,first,last); rightest python:test(flowLtr,last,first);"> … … 90 90 <form class="autosubmit" tal:attributes="action viewerUrl"> 91 91 <input type="hidden" tal:define="params python:here.getParams('start',None)" tal:repeat="param params" 92 tal:attributes="name param; value python:params[param]" /><span class="ruler-main"><a tal: condition="left"93 tal:attributes="href python:here.getLink('start',left)"><</a> <s pan tal:condition="not:left"><</span> <select92 tal:attributes="name param; value python:params[param]" /><span class="ruler-main"><a tal:omit-tag="not:left" 93 tal:attributes="href python:here.getLink('start',left)"><</a> <select 94 94 class="autosubmit" name="start" tal:define="ofs python:test(pageinfo['pageZero'],0,1)"> 95 95 <tal:block> … … 98 98 <option tal:condition="python:start>pageBatch['last']" selected="selected" value="1">[out of range]</option> 99 99 </tal:block> 100 </select> <input type="submit" value="Go" /> <a tal: condition="right" tal:attributes="href python:here.getLink('start',right)">></a>101 <span tal:condition="not:right">></span></span>100 </select> <input type="submit" value="Go" /> <a tal:omit-tag="not:right" tal:attributes="href python:here.getLink('start',right)">></a> 101 </span> 102 102 </form> 103 103 </metal:block> -
zpt/viewer/toc_thumbs.zpt
r594 r607 11 11 <div class="tocbody thumbs" 12 12 tal:define="start pageinfo/start; 13 minPageNo docinfo/minPageNo; 14 maxPageNo docinfo/maxPageNo; 13 15 grpsize pageinfo/groupsize; 14 16 numgroups pageinfo/numgroups; … … 26 28 <tr tal:repeat="row pageBatch/pages"> 27 29 <td tal:repeat="thumb row" tal:attributes="class python:here.getStyle(thumb['idx'],pn,'thumb')"><a 28 tal:define="idx thumb/idx" tal:condition="idx" tal:attributes="href python:here.getLink('pn',idx)"> <img 30 tal:define="idx thumb/idx" tal:condition="idx" 31 tal:attributes="href python:here.getLink('pn',idx); class python:test(idx<minPageNo or idx>maxPageNo, 'outside')"><img 32 tal:condition="python:docinfo.get('imageURL',None) or exists('template/text.png')" 29 33 tal:attributes="src python:test(docinfo.get('imageURL',None),here.getScalerUrl(pn=idx,dw=100,dh=100,docinfo=docinfo),'template/text.png'); 30 34 alt idx;" /><br /> -
zpt/viewer/viewer_thumbs.zpt
r594 r607 27 27 tal:define="pn pageinfo/pn; 28 28 start pageinfo/start; 29 minPageNo docinfo/minPageNo; 30 maxPageNo docinfo/maxPageNo; 29 31 thumbRows python:int(request.get('thumbRows', 10)); 30 32 thumbCols python:int(request.get('thumbCols', 12)); 31 33 thumbSize python:int(request.get('thumbSize', 100)); 32 34 flowLtr python:docinfo.get('pageFlow','ltr')!='rtl'; 33 pageBatch python:here.getPageBatch(start=start, rows=thumbRows, cols=thumbCols, pageFlowLtr=flowLtr, m axIdx=numPages);35 pageBatch python:here.getPageBatch(start=start, rows=thumbRows, cols=thumbCols, pageFlowLtr=flowLtr, minIdx=minPageNo, maxIdx=maxPageNo); 34 36 pageNumbers docinfo/pageNumbers | nothing; 35 37 left python:test(flowLtr,pageBatch['prevStart'],pageBatch['nextStart']);
Note: See TracChangeset
for help on using the changeset viewer.