comparison zpt/viewer_xml.zpt @ 513:67095296c95a

Merge from elementtree branch 92a6443a6f16ff25674d43814ec0d6c0a43a5e1a
author casties
date Tue, 28 Feb 2012 19:10:08 +0100
parents 92a6443a6f16
children 0b8bed1223ad
comparison
equal deleted inserted replaced
497:73fb73577961 513:67095296c95a
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml"
4 tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode;
5 tocMode pageinfo/tocMode; viewerUrl docinfo/viewerUrl;
6 rootUrl here/getDocumentViewerURL;
7 numPages docinfo/numPages | nothing;">
8 <head>
9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
10 <title
11 tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" />
12 <link rel="stylesheet" href="template/docuviewer_css" type="text/css" />
13 <script type="text/javascript" tal:attributes="src string:$rootUrl/template/jquery_js"></script>
14 <script type="text/javascript">
15 // <!--
16 $(document).ready(function() {
17 // autosubmit forms
18 $('form.autosubmit').find('.autosubmit').change(function() {
19 this.form.submit();
20 });
21 $('form.autosubmit input[type="submit"]').hide();
22 });
23 // -->
24 </script>
25 </head>
26 <body tal:condition="numPages">
27 <tal:block
28 tal:define="docpath docinfo/textURLPath;
29 pn pageinfo/pn;
30 flowLtr python:docinfo.get('pageFlow','ltr')!='rtl';
31 textPage python:here.getTextPage(mode='xml', pn=pn, docinfo=docinfo, pageinfo=pageinfo) or '[no text here]';">
32 <!-- header -->
33 <div class="page-head">
34 <metal:block metal:use-macro="here/template/common_template/macros/head" />
35 </div>
36 <div class="page-body" tal:condition="python:here.isAccessible(docinfo)">
37 <!--table of contents-->
38 <div class="col toc">
39 <metal:block
40 metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" />
41 </div>
42
43 <!-- text page -->
44 <div class="col main">
45 <div class="ruler">
46 <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" />
47 </div>
48 <ul class="switcher">
49 <li>
50 <a tal:attributes="href python:here.getLink('viewMode','images')">Image</a>
51 </li>
52 <li class="sel">Text</li>
53 </ul>
54 <div class="content">
55 <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle"
56 tal:content="structure pageinfo/pageHeaderTitle" />
57 <tal:block tal:replace="structure textPage" />
58 </div>
59 </div>
60 <!-- col-main -->
61
62 <!-- right-side options -->
63 <div class="col buttons">
64 <!--"BEGIN TEXT DISPLAY" -->
65 <div class="options">
66 <h4>Text display</h4>
67 <form tal:attributes="action viewerUrl" class="autosubmit">
68 <input type="hidden"
69 tal:define="params python:here.getParams(params={'viewMode':None})"
70 tal:repeat="param params"
71 tal:attributes="name param; value python:params[param]" />
72 <ul>
73 <li>
74 <input class="autosubmit" type="radio" name="viewMode" value="text"
75 tal:attributes="checked python:viewMode=='text'" /> Text
76 </li>
77 <li>
78 <input type="radio" class="autosubmit" name="viewMode" value="text"
79 tal:attributes="checked python:viewMode=='xml'" /> XML
80 </li>
81 </ul>
82 <input type="submit" value="Go!" />
83 </form>
84 </div>
85 <!--"END TEXT DISPLAY"-->
86
87 <!--"BEGIN TEXT SIZE"-->
88 <div class="options">
89 <h4>Text size</h4>
90 <ul class="fsizer">
91 <li>
92 <a href="javascript:fontSize(12);" class="fs_sml">S</a>
93 </li>
94 <li>
95 <a href="javascript:fontSize(14);" class="fs_med">M</a>
96 </li>
97 <li>
98 <a href="javascript:fontSize(16);" class="fs_lrg">L</a>
99 </li>
100 </ul>
101 </div>
102 <!--"END TEXT SIZE"-->
103
104 </div>
105 <!-- /col-right -->
106
107 </div>
108 <!-- /page-body -->
109
110 <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)">
111 <div class="errortext">Sorry, access to this document is restricted.</div>
112 </div>
113
114 </tal:block>
115 </body>
116 <body tal:condition="not:numPages">
117 <div class="errortext">Sorry, document doesn't exist.</div>
118 </body>
119 </html>