annotate zpt/viewer_text.zpt @ 480:50a28442f21c elementtree

more new template stuff
author casties
date Mon, 15 Aug 2011 21:09:08 +0200
parents fe5b0e4ac5f2
children 0a0f7f570f90
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
479
fe5b0e4ac5f2 starting new templates in product
casties
parents:
diff changeset
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
fe5b0e4ac5f2 starting new templates in product
casties
parents:
diff changeset
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
fe5b0e4ac5f2 starting new templates in product
casties
parents:
diff changeset
3 <html xmlns="http://www.w3.org/1999/xhtml"
480
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
4 tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode;
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
5 tocMode pageinfo/tocMode; viewType pageinfo/viewType; viewerUrl docinfo/viewerUrl;
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
6 numPages docinfo/numPages | nothing;">
479
fe5b0e4ac5f2 starting new templates in product
casties
parents:
diff changeset
7 <head>
fe5b0e4ac5f2 starting new templates in product
casties
parents:
diff changeset
8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
fe5b0e4ac5f2 starting new templates in product
casties
parents:
diff changeset
9 <link rel="stylesheet" href="template/docuviewer_css" type="text/css">
fe5b0e4ac5f2 starting new templates in product
casties
parents:
diff changeset
10 </head>
480
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
11 <body tal:condition="numPages">
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
12 <tal:block tal:define="docpath docinfo/textURLPath;
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
13 pn pageinfo/pn;
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
14 flowLtr python:pageinfo.get('pageFlow','ltr')!='rtl';
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
15 prev python:test(pn>1,pn-1,None); next python:test(pn<numPages,pn+1,None);
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
16 first python:test(pn>1,1,None); last python:test(pn<numPages,numPages,None);
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
17 left python:test(flowLtr,prev,next); right python:test(flowLtr,next,prev);
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
18 leftest python:test(flowLtr,first,last); rightest python:test(flowLtr,last,first);
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
19 textPage python:here.getTextPage(mode=viewType, pn=pn, docinfo=docinfo, pageinfo=pageinfo);">
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
20 <div class="page_head" metal:use-macro="here/template/head_main/macros/main" />
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
21 <div class="page_body" tal:condition="python:here.isAccessible(docinfo)">
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
22 <!--table of contents-->
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
23 <div class="toc"
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
24 metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" />
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
25 <!-- text page -->
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
26 <div class="text">
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
27 <div class="ruler">
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
28 <form class="autosubmit pageruler" tal:attributes="action viewerUrl">
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
29 <input type="hidden" tal:define="params python:here.getParams('pn', None)"
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
30 tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
31 page
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
32 <a tal:condition="leftest" tal:attributes="href python:here.getLink('pn',leftest)">|&lt;</a>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
33 <span tal:condition="not:leftest">|&lt;</span>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
34 <a tal:condition="left" tal:attributes="href python:here.getLink('pn',left)">&lt;</a>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
35 <span tal:condition="not:left">&lt;</span>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
36 <input class="autosubmit" size="3" type="text" name="pn" tal:attributes="value pn" />
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
37 <tal:block tal:define="originalPage pageinfo/pageNumberOrig | nothing"
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
38 tal:condition="python:originalPage!=None">
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
39 (<span tal:replace="originalPage"/><span tal:define="originalPageNorm pageinfo/pageNumberOrigNorm | nothing" tal:condition="python:originalPageNorm!=None">[<span tal:replace="originalPageNorm"/>]</span>)
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
40 </tal:block>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
41 <input type="submit" value="Go" />
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
42 of
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
43 <span tal:replace="numPages"/>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
44 <a tal:condition="right" tal:attributes="href python:here.getLink('pn',right)">&gt;</a>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
45 <span tal:condition="not:right">&gt;</span>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
46 <a tal:condition="rightest" tal:attributes="href python:here.getLink('pn',rightest)">&gt;|</a>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
47 <span tal:condition="not:rightest">&gt;|</span>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
48 </form>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
49 </div>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
50 <div class="page">
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
51 <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle" tal:content="structure pageinfo/pageHeaderTitle"/>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
52 <tal:block tal:replace="structure textPage"/>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
53 </div>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
54 </div>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
55 </div>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
56 <div class="page_body" tal:condition="python:not here.isAccessible(docinfo)">
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
57 <div class="errortext">Sorry, access to this document is restricted.</div>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
58 </div>
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
59 </tal:block>
479
fe5b0e4ac5f2 starting new templates in product
casties
parents:
diff changeset
60 </body>
480
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
61 <body tal:condition="not:numPages">
50a28442f21c more new template stuff
casties
parents: 479
diff changeset
62 <div class="errortext">Sorry, document doesn't exist.</div>
479
fe5b0e4ac5f2 starting new templates in product
casties
parents:
diff changeset
63 </body>
fe5b0e4ac5f2 starting new templates in product
casties
parents:
diff changeset
64 </html>