source: documentViewer/zpt/viewer_text.zpt @ 562:60f5a636bc57

Last change on this file since 562:60f5a636bc57 was 559:eabfbad6aeb4, checked in by casties, 12 years ago

"extended" layer for index view and some bugfixes.

File size: 7.0 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" tal:condition="availableLayers">
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})"
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            <input type="submit" value="Go!" />
92          </form>
93        </div>
94        <!--"END TEXT DISPLAY"-->
95
96        <!--"BEGIN TEXT SIZE"-->
97        <!--  <div class="options">
98          <h4>Text size</h4>
99          <ul class="fsizer">
100            <li><a href="javascript:fontSize(12);" class="fs_sml">S</a></li>
101            <li><a href="javascript:fontSize(14);" class="fs_med">M</a></li>
102            <li><a href="javascript:fontSize(16);" class="fs_lrg">L</a></li>
103          </ul>
104        </div> -->
105        <!--"END TEXT SIZE"-->
106
107        <!--"BEGIN TEXT NORMALIZATION"-->
108        <div class="options">
109          <h4>Text normalization</h4>
110          <form tal:attributes="action viewerUrl" class="autosubmit"
111            tal:define="norm python:pageinfo.get('characterNormalization','regPlusNorm');">
112            <input type="hidden"
113              tal:define="params python:here.getParams(params={'characterNormalization':None, 'viewLayer':viewLayer})"
114              tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
115            <ul>
116              <li><input type="radio" class="autosubmit" name="characterNormalization" value="orig"
117                tal:attributes="checked python:norm=='orig'" /> Original</li>
118              <li><input type="radio" class="autosubmit" name="characterNormalization" value="reg"
119                tal:attributes="checked python:norm=='reg'" /> Regularized</li>
120              <li><input type="radio" class="autosubmit" name="characterNormalization" value="regPlusNorm"
121                tal:attributes="checked python:norm=='regPlusNorm'" /> Normalized</li>
122            </ul>
123            <input type="submit" value="Go!" />
124          </form>
125        </div>
126        <!--"END TEXT NORMALIZATION"-->
127
128        <!--  layer option boxes (rendered if active) -->
129        <tal:block tal:repeat="layer availableLayers">
130          <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/options_box"
131            tal:condition="python:exists(mpath)">
132            <metal:block metal:use-macro="python:path(mpath)" />
133          </tal:block>
134        </tal:block>
135      </div>
136      <!-- /col-right -->
137
138    </div>
139    <!-- /page-body -->
140
141    <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)">
142      <div class="errortext">Sorry, access to this document is restricted.</div>
143    </div>
144   
145    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
146      <!-- footer -->
147      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
148    </tal:block>
149  </tal:block>
150</body>
151<body tal:condition="not:numPages">
152  <div class="errortext">Sorry, document doesn't exist.</div>
153    <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
154      <!-- footer -->
155      <metal:block metal:use-macro="here/template/site_template.pt/macros/footer"/>
156    </tal:block>
157</body>
158</html>
Note: See TracBrowser for help on using the repository browser.