Changeset 480:50a28442f21c in documentViewer for zpt/viewer_text.zpt
- Timestamp:
- Aug 15, 2011, 7:09:08 PM (13 years ago)
- Branch:
- elementtree
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
zpt/viewer_text.zpt
r479 r480 2 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3 3 <html xmlns="http://www.w3.org/1999/xhtml" 4 tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode; tocMode pageinfo/tocMode"> 4 tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode; 5 tocMode pageinfo/tocMode; viewType pageinfo/viewType; viewerUrl docinfo/viewerUrl; 6 numPages docinfo/numPages | nothing;"> 5 7 <head> 6 8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 7 9 <link rel="stylesheet" href="template/docuviewer_css" type="text/css"> 8 10 </head> 9 <body tal:condition="docinfo/numPages"> 10 <div tal:replace="structure python:here.template.head_main(docinfo=docinfo,viewMode=viewMode,pageinfo=pageinfo)"/> 11 <tal:block tal:condition="python:here.isAccessible(docinfo)"> 12 <table border="0" width="100%" height="100%"> 13 <tr> 14 <td width="300px" valign="top"> 15 <tal:block tal:replace="structure python:getattr(here.template, 'toc_%s'%tocMode)(docinfo=docinfo,pageinfo=pageinfo)"/> 16 </td> 17 <td width="100%" valign="top"> 18 <tal:block tal:content="structure python:getattr(here.template, 'page_main_%s'%viewMode)(docinfo=docinfo,pageinfo=pageinfo,mk=options['mk'])"/> 19 </td> 20 </tr> 21 </table> 22 </tal:block> 23 <tal:block tal:condition="not:python:here.isAccessible(docinfo)"> 24 <div class="errortext">Sorry, access to this document is restricted.</div> 25 </tal:block> 11 <body tal:condition="numPages"> 12 <tal:block tal:define="docpath docinfo/textURLPath; 13 pn pageinfo/pn; 14 flowLtr python:pageinfo.get('pageFlow','ltr')!='rtl'; 15 prev python:test(pn>1,pn-1,None); next python:test(pn<numPages,pn+1,None); 16 first python:test(pn>1,1,None); last python:test(pn<numPages,numPages,None); 17 left python:test(flowLtr,prev,next); right python:test(flowLtr,next,prev); 18 leftest python:test(flowLtr,first,last); rightest python:test(flowLtr,last,first); 19 textPage python:here.getTextPage(mode=viewType, pn=pn, docinfo=docinfo, pageinfo=pageinfo);"> 20 <div class="page_head" metal:use-macro="here/template/head_main/macros/main" /> 21 <div class="page_body" tal:condition="python:here.isAccessible(docinfo)"> 22 <!--table of contents--> 23 <div class="toc" 24 metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> 25 <!-- text page --> 26 <div class="text"> 27 <div class="ruler"> 28 <form class="autosubmit pageruler" tal:attributes="action viewerUrl"> 29 <input type="hidden" tal:define="params python:here.getParams('pn', None)" 30 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> 31 page 32 <a tal:condition="leftest" tal:attributes="href python:here.getLink('pn',leftest)">|<</a> 33 <span tal:condition="not:leftest">|<</span> 34 <a tal:condition="left" tal:attributes="href python:here.getLink('pn',left)"><</a> 35 <span tal:condition="not:left"><</span> 36 <input class="autosubmit" size="3" type="text" name="pn" tal:attributes="value pn" /> 37 <tal:block tal:define="originalPage pageinfo/pageNumberOrig | nothing" 38 tal:condition="python:originalPage!=None"> 39 (<span tal:replace="originalPage"/><span tal:define="originalPageNorm pageinfo/pageNumberOrigNorm | nothing" tal:condition="python:originalPageNorm!=None">[<span tal:replace="originalPageNorm"/>]</span>) 40 </tal:block> 41 <input type="submit" value="Go" /> 42 of 43 <span tal:replace="numPages"/> 44 <a tal:condition="right" tal:attributes="href python:here.getLink('pn',right)">></a> 45 <span tal:condition="not:right">></span> 46 <a tal:condition="rightest" tal:attributes="href python:here.getLink('pn',rightest)">>|</a> 47 <span tal:condition="not:rightest">>|</span> 48 </form> 49 </div> 50 <div class="page"> 51 <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle" tal:content="structure pageinfo/pageHeaderTitle"/> 52 <tal:block tal:replace="structure textPage"/> 53 </div> 54 </div> 55 </div> 56 <div class="page_body" tal:condition="python:not here.isAccessible(docinfo)"> 57 <div class="errortext">Sorry, access to this document is restricted.</div> 58 </div> 59 </tal:block> 26 60 </body> 27 <body tal:condition="not: docinfo/numPages">28 <div class="errortext">Sorry, document doesn't exist.</div>61 <body tal:condition="not:numPages"> 62 <div class="errortext">Sorry, document doesn't exist.</div> 29 63 </body> 30 64 </html>
Note: See TracChangeset
for help on using the changeset viewer.