source: documentViewer/zpt/viewer_text.zpt @ 506:67014399894d

elementtree
Last change on this file since 506:67014399894d was 506:67014399894d, checked in by casties, 12 years ago

cleaned out all 4suite code and weird methods.
fixed GIS places.

File size: 7.1 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; 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:pageinfo.get('pageFlow','ltr')!='rtl';
31                textPage python:here.getTextPage(mode=viewLayer, 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-left">
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-right">
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={'viewLayer':None,'viewMode':None})"
70              tal:repeat="param params"
71              tal:attributes="name param; value python:params[param]" /> <input
72              class="autosubmit" type="radio" name="viewMode" value="text"
73              tal:attributes="checked python:viewMode=='text'" /> Text<br /> <span
74              class="optionsText"> &nbsp;&nbsp;<input type="checkbox"
75              class="autosubmit" name="viewLayer" value="dict"
76              tal:attributes="checked python:viewLayer=='dict'" /> Dictionary<br />
77            </span> <span class="optionsText" tal:condition="python:docinfo.get('numPlaces',0)">
78              &nbsp;&nbsp;<input type="checkbox" class="autosubmit" name="viewLayer"
79              value="gis" tal:attributes="checked python:viewLayer=='gis'" /> Places<br />
80            </span> <input type="radio" class="autosubmit" name="viewMode" value="xml"
81              tal:attributes="checked python:viewMode=='xml'" /> XML<br /> <input
82              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          <div class="fsizer">
91            &nbsp; <a href="javascript:fontSize(12);" class="fs_sml">S</a> <a
92              href="javascript:fontSize(14);" class="fs_med">M</a> <a
93              href="javascript:fontSize(16);" class="fs_lrg">L</a>
94          </div>
95        </div>
96        <!--"END TEXT SIZE"-->
97
98        <!--"BEGIN DICTIONARY OVERVIEW"-->
99        <div class="options" tal:condition="python:viewLayer=='dict'">
100          <h4>Dictionary view</h4>
101          <form name="f3" action="">
102            <input type="radio" name="r3" />Tab<br /> <input type="radio" name="r3" />Window<br />
103          </form>
104        </div>
105        <!--"END DICTIONARY OVERVIEW"-->
106
107        <!--"BEGIN TEXT NORMALIZATION"-->
108        <div class="options" tal:condition="python:viewLayer!='xml'">
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('characterNormalization',None)"
114              tal:repeat="param params"
115              tal:attributes="name param; value python:params[param]" /> <input
116              type="radio" class="autosubmit" name="characterNormalization" value="orig"
117              tal:attributes="checked python:norm=='orig'" /> Original<br /> <input
118              type="radio" class="autosubmit" name="characterNormalization" value="reg"
119              tal:attributes="checked python:norm=='reg'" /> Regularized<br /> <input
120              type="radio" class="autosubmit" name="characterNormalization"
121              value="regPlusNorm" tal:attributes="checked python:norm=='regPlusNorm'" />
122            Normalized<br /> <input type="submit" value="Go!" />
123          </form>
124        </div>
125        <!--"END TEXT NORMALIZATION"-->
126
127        <!--"BEGIN PLACES"-->
128        <div class="options" tal:condition="python:viewLayer=='gis'">
129          <tal:block tal:define="
130            name docinfo/documentName;
131            places python:here.getPlacesOnPage(docinfo=docinfo, pn=pn);
132            pidlist python:','.join([p['id'] for p in places]);">
133            <h4>Places</h4>
134            <ul>
135            <li><a
136              tal:attributes="href python:'http://mappit.mpiwg-berlin.mpg.de/db/RESTdb/db/mpdl/%s?id=%s&format=gis'%(name,pidlist)"
137              target="_blank">on this page</a>
138            </li>
139            <li>
140              <a
141              tal:attributes="href python:'http://mappit.mpiwg-berlin.mpg.de/db/RESTdb/db/mpdl/%s?format=gis'%(name)"
142              target="_blank">in whole document</a>
143            </li>
144            </ul>
145          </tal:block>
146        </div>
147        <!--"END PLACES"-->
148      </div>
149      <!-- /col-right -->
150
151    </div>
152    <!-- /page-body -->
153
154    <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)">
155      <div class="errortext">Sorry, access to this document is restricted.</div>
156    </div>
157
158  </tal:block>
159</body>
160<body tal:condition="not:numPages">
161  <div class="errortext">Sorry, document doesn't exist.</div>
162</body>
163</html>
Note: See TracBrowser for help on using the repository browser.