source: documentViewer/zpt/viewer_text.zpt @ 526:3f375a048402

Last change on this file since 526:3f375a048402 was 526:3f375a048402, checked in by casties, 12 years ago

moved search and dict into separate layers.
removed search_template.
added tocMode=concordance.
fixed bug with paging tocs.

File size: 7.3 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<script type="text/javascript" tal:attributes="src string:$rootUrl/template/jquery_js"></script>
15<script type="text/javascript">
16    // <!--
17    $(document).ready(function() {
18        // autosubmit forms
19        $('form.autosubmit').find('.autosubmit').change(function() {
20            this.form.submit();
21        });
22        $('form.autosubmit input[type="submit"]').hide();
23    });
24// -->
25</script>
26<!--  layer headers (rendered always) -->
27<tal:block tal:repeat="layer availableLayers">
28  <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/html_head"
29    tal:condition="python:exists(mpath)">
30    <metal:block metal:use-macro="python:path(mpath)" />
31  </tal:block>
32</tal:block>
33
34</head>
35<body tal:condition="numPages">
36  <tal:block
37    tal:define="docpath docinfo/textURLPath;
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) or '[no text here]';">
41    <!-- header -->
42    <div class="page-head">
43      <metal:block metal:use-macro="here/template/common_template/macros/head" />
44    </div>
45    <div class="page-body" tal:condition="python:here.isAccessible(docinfo)">
46      <!--table of contents-->
47      <div class="col toc">
48        <metal:block
49          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">
55          <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" />
56        </div>
57        <ul class="switcher">
58          <li>
59            <a tal:attributes="href python:here.getLink('viewMode','images')">Image</a>
60          </li>
61          <li class="sel">Text</li>
62        </ul>
63        <div class="content">
64          <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle"
65            tal:content="structure pageinfo/pageHeaderTitle" />
66          <tal:block tal:replace="structure textPage" />
67        </div>
68      </div>
69      <!-- end of col-main -->
70
71      <!--  layer columns (rendered always) -->
72      <tal:block tal:repeat="layer availableLayers">
73        <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/extra_column"
74          tal:condition="python:exists(mpath)">
75          <metal:block metal:use-macro="python:path(mpath)" />
76        </tal:block>
77      </tal:block>
78
79      <!-- right-side options -->
80      <div class="col buttons">
81        <!--"BEGIN TEXT DISPLAY"  -->
82        <div class="options">
83          <h4>Text display</h4>
84          <form tal:attributes="action viewerUrl" class="autosubmit">
85            <input type="hidden"
86              tal:define="params python:here.getParams(params={'viewLayer':None,'viewMode':None})"
87              tal:repeat="param params"
88              tal:attributes="name param; value python:params[param]" />
89            <ul>
90              <li>
91                <input class="autosubmit" type="radio" name="viewMode" value="text"
92                  tal:attributes="checked python:viewMode=='text'" /> Text
93                <ul>
94                  <!-- text layer select buttons (rendered always) -->
95                  <tal:block tal:repeat="layer availableLayers">
96                    <tal:block
97                      tal:define="mpath string:here/template/layer_text_${layer}/macros/layer_select_li"
98                      tal:condition="python:exists(mpath)">
99                      <li metal:use-macro="python:path(mpath)" />
100                    </tal:block>
101                  </tal:block>
102                </ul>
103              </li>
104              <li>
105                <input type="radio" class="autosubmit" name="viewMode" value="xml"
106                  tal:attributes="checked python:viewMode=='xml'" /> XML<br /> <input
107                  type="submit" value="Go!" />
108              </li>
109            </ul>
110          </form>
111        </div>
112        <!--"END TEXT DISPLAY"-->
113
114        <!--"BEGIN TEXT SIZE"-->
115        <div class="options">
116          <h4>Text size</h4>
117          <ul class="fsizer">
118            <li>
119              <a href="javascript:fontSize(12);" class="fs_sml">S</a>
120            </li>
121            <li>
122              <a href="javascript:fontSize(14);" class="fs_med">M</a>
123            </li>
124            <li>
125              <a href="javascript:fontSize(16);" class="fs_lrg">L</a>
126            </li>
127          </ul>
128        </div>
129        <!--"END TEXT SIZE"-->
130
131        <!--"BEGIN TEXT NORMALIZATION"-->
132        <div class="options">
133          <h4>Text normalization</h4>
134          <form tal:attributes="action viewerUrl" class="autosubmit"
135            tal:define="norm python:pageinfo.get('characterNormalization','regPlusNorm');">
136            <input type="hidden"
137              tal:define="params python:here.getParams(params={'characterNormalization':None, 'viewLayer':viewLayer})"
138              tal:repeat="param params"
139              tal:attributes="name param; value python:params[param]" />
140            <ul>
141              <li>
142                <input type="radio" class="autosubmit" name="characterNormalization"
143                  value="orig" tal:attributes="checked python:norm=='orig'" /> Original
144              </li>
145              <li>
146                <input type="radio" class="autosubmit" name="characterNormalization"
147                  value="reg" tal:attributes="checked python:norm=='reg'" /> Regularized
148              </li>
149              <li>
150                <input type="radio" class="autosubmit" name="characterNormalization"
151                  value="regPlusNorm" tal:attributes="checked python:norm=='regPlusNorm'" />
152                Normalized
153              </li>
154            </ul>
155            <input type="submit" value="Go!" />
156          </form>
157        </div>
158        <!--"END TEXT NORMALIZATION"-->
159
160        <!--  layer option boxes (rendered if active) -->
161        <tal:block tal:repeat="layer availableLayers">
162          <tal:block
163            tal:define="mpath string:here/template/layer_text_${layer}/macros/options_box"
164            tal:condition="python:exists(mpath)">
165            <metal:block metal:use-macro="python:path(mpath)" />
166          </tal:block>
167        </tal:block>
168      </div>
169      <!-- /col-right -->
170
171    </div>
172    <!-- /page-body -->
173
174    <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)">
175      <div class="errortext">Sorry, access to this document is restricted.</div>
176    </div>
177
178  </tal:block>
179</body>
180<body tal:condition="not:numPages">
181  <div class="errortext">Sorry, document doesn't exist.</div>
182</body>
183</html>
Note: See TracBrowser for help on using the repository browser.