source: documentViewer/zpt/viewer_text.zpt @ 543:6cdc31e9ed8e

Last change on this file since 543:6cdc31e9ed8e was 543:6cdc31e9ed8e, checked in by casties, 12 years ago

fixed problem with dict-mode in default view.
added configurable footer and logo in site_template.pt

File size: 6.9 KB
Line 
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; viewLayer pageinfo/viewLayer; viewLayers pageinfo/viewLayers;
6              availableLayers python:here.getAvailableLayers().get('text', None);
7              viewerUrl docinfo/viewerUrl;
8              rootUrl here/getDocumentViewerURL;
9              numPages docinfo/numPages | nothing;">
10<head>
11<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
12<title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" />
13<link rel="stylesheet" href="template/docuviewer_css" type="text/css" />
14<!--[if IE]><link rel="stylesheet" href="template/docuviewer_ie_css" type="text/css" /><![endif]-->
15<script type="text/javascript" tal:attributes="src string:$rootUrl/template/jquery_js"></script>
16<script type="text/javascript">
17// <!--
18        $(document).ready(function() {
19                // autosubmit forms
20                $('form.autosubmit').find('.autosubmit').change(function() {
21                        this.form.submit();
22                });
23                $('form.autosubmit input[type="submit"]').hide();
24        });
25// -->
26</script>
27<!--  layer headers (rendered always) -->
28<tal:block tal:repeat="layer availableLayers">
29  <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/html_head" tal:condition="python:exists(mpath)">
30    <metal:block metal:use-macro="python:path(mpath)" />
31  </tal:block>
32</tal:block>
33</head>
34<!-- body -->
35<body tal:condition="numPages">
36  <tal:block
37    tal:define="docpath docinfo/textURLPath | nothing;
38                pn pageinfo/pn;
39                flowLtr python:docinfo.get('pageFlow','ltr')!='rtl';
40                textPage python:here.getTextPage(mode=viewLayer, pn=pn, docinfo=docinfo, pageinfo=pageinfo);">
41    <!-- header -->
42    <div class="page-head">
43      <metal:block metal:use-macro="here/template/common_template/macros/head" />
44    </div>
45
46    <div class="page-body" tal:condition="python:here.isAccessible(docinfo)">
47      <!--table of contents-->
48      <div class="col toc">
49        <metal:block metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" />
50      </div>
51
52      <!-- text page -->
53      <div class="col main">
54        <div class="ruler top">
55          <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" />
56        </div>
57        <div class="content text" tal:condition="textPage">
58          <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle"
59            tal:content="structure pageinfo/pageHeaderTitle" />
60          <tal:block tal:condition="textPage" tal:replace="structure textPage"/>
61          <div class="emptyPage" tal:condition="not:textPage">[Empty page]</div>
62        </div>
63      </div>
64      <!-- end of col-main -->
65
66      <!--  layer columns (rendered always) -->
67      <tal:block tal:repeat="layer availableLayers">
68        <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/extra_column"
69          tal:condition="python:exists(mpath)">
70          <metal:block metal:use-macro="python:path(mpath)" />
71        </tal:block>
72      </tal:block>
73
74      <!-- right-side options -->
75      <div class="col buttons">
76        <!--"BEGIN TEXT DISPLAY"  -->
77        <div class="options">
78          <h4>Text layer</h4>
79          <form tal:attributes="action viewerUrl" class="autosubmit">
80            <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None,'viewMode':None})"
81              tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
82            <ul>
83              <!-- text layer select buttons (rendered always) -->
84              <tal:block tal:repeat="layer availableLayers">
85                <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/layer_select_li"
86                  tal:condition="python:exists(mpath)">
87                  <li metal:use-macro="python:path(mpath)" />
88                </tal:block>
89              </tal:block>
90            </ul>
91          </form>
92        </div>
93        <!--"END TEXT DISPLAY"-->
94
95        <!--"BEGIN TEXT SIZE"-->
96        <!--  <div class="options">
97          <h4>Text size</h4>
98          <ul class="fsizer">
99            <li><a href="javascript:fontSize(12);" class="fs_sml">S</a></li>
100            <li><a href="javascript:fontSize(14);" class="fs_med">M</a></li>
101            <li><a href="javascript:fontSize(16);" class="fs_lrg">L</a></li>
102          </ul>
103        </div> -->
104        <!--"END TEXT SIZE"-->
105
106        <!--"BEGIN TEXT NORMALIZATION"-->
107        <div class="options">
108          <h4>Text normalization</h4>
109          <form tal:attributes="action viewerUrl" class="autosubmit"
110            tal:define="norm python:pageinfo.get('characterNormalization','regPlusNorm');">
111            <input type="hidden"
112              tal:define="params python:here.getParams(params={'characterNormalization':None, 'viewLayer':viewLayer})"
113              tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
114            <ul>
115              <li><input type="radio" class="autosubmit" name="characterNormalization" value="orig"
116                tal:attributes="checked python:norm=='orig'" /> Original</li>
117              <li><input type="radio" class="autosubmit" name="characterNormalization" value="reg"
118                tal:attributes="checked python:norm=='reg'" /> Regularized</li>
119              <li><input type="radio" class="autosubmit" name="characterNormalization" value="regPlusNorm"
120                tal:attributes="checked python:norm=='regPlusNorm'" /> Normalized</li>
121            </ul>
122            <input type="submit" value="Go!" />
123          </form>
124        </div>
125        <!--"END TEXT NORMALIZATION"-->
126
127        <!--  layer option boxes (rendered if active) -->
128        <tal:block tal:repeat="layer availableLayers">
129          <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/options_box"
130            tal:condition="python:exists(mpath)">
131            <metal:block metal:use-macro="python:path(mpath)" />
132          </tal:block>
133        </tal:block>
134      </div>
135      <!-- /col-right -->
136
137    </div>
138    <!-- /page-body -->
139
140    <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)">
141      <div class="errortext">Sorry, access to this document is restricted.</div>
142    </div>
143   
144    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
145      <!-- footer -->
146      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
147    </tal:block>
148  </tal:block>
149</body>
150<body tal:condition="not:numPages">
151  <div class="errortext">Sorry, document doesn't exist.</div>
152    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
153      <!-- footer -->
154      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
155    </tal:block>
156</body>
157</html>
Note: See TracBrowser for help on using the repository browser.