changeset 504:454a42f4c369 elementtree

viewer_xml works now.
author casties
date Thu, 16 Feb 2012 16:51:17 +0100
parents 030251fe9dbc
children 29f2172db368
files zpt/viewer_xml.zpt
diffstat 1 files changed, 9 insertions(+), 48 deletions(-) [+]
line wrap: on
line diff
--- a/zpt/viewer_xml.zpt	Thu Feb 16 14:30:01 2012 +0100
+++ b/zpt/viewer_xml.zpt	Thu Feb 16 16:51:17 2012 +0100
@@ -2,7 +2,7 @@
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml"
   tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode;
-              tocMode pageinfo/tocMode; viewType pageinfo/viewType; viewerUrl docinfo/viewerUrl;
+              tocMode pageinfo/tocMode; viewerUrl docinfo/viewerUrl;
               rootUrl here/getDocumentViewerURL;
               numPages docinfo/numPages | nothing;">
 <head>
@@ -28,7 +28,7 @@
     tal:define="docpath docinfo/textURLPath;
                                pn pageinfo/pn; 
                                flowLtr python:pageinfo.get('pageFlow','ltr')!='rtl';
-                               textPage python:here.getTextPage(mode=viewType, pn=pn, docinfo=docinfo, pageinfo=pageinfo) or '[no text here]';">
+                               textPage python:here.getTextPage(mode='xml', pn=pn, docinfo=docinfo, pageinfo=pageinfo) or '[no text here]';">
     <!-- header -->
     <div class="page-head">
       <metal:block metal:use-macro="here/template/common_template/macros/head" />
@@ -66,20 +66,13 @@
           <h4>Text display</h4>
           <form tal:attributes="action viewerUrl" class="autosubmit">
             <input type="hidden"
-              tal:define="params python:here.getParams(params={'viewType':None})"
+              tal:define="params python:here.getParams(params={'viewMode':None})"
               tal:repeat="param params"
-              tal:attributes="name param; value python:params[param]" /> <input
-              class="autosubmit" type="radio" name="viewType" value=""
-              tal:attributes="checked python:viewType!='xml'" /> Text<br /> <span
-              class="optionsText" tal:condition="python:viewType!='xml'">
-              &nbsp;&nbsp;<input type="checkbox" class="autosubmit" name="viewType"
-              value="dict" tal:attributes="checked python:viewType=='dict'" /> Dictionary<br />
-            </span> <span class="optionsText"
-              tal:condition="python:viewType!='xml' and docinfo.get('numPlaces',0)">
-              &nbsp;&nbsp;<input type="checkbox" class="autosubmit" name="viewType"
-              value="gis" tal:attributes="checked python:viewType=='gis'" /> Places<br />
-            </span> <input type="radio" class="autosubmit" name="viewType"
-              tal:attributes="value string:xml; checked python:viewType=='xml'" /> XML<br />
+              tal:attributes="name param; value python:params[param]" /> 
+            <input class="autosubmit" type="radio" name="viewMode" value="text"
+              tal:attributes="checked python:viewMode=='text'" /> Text<br /> 
+            <input type="radio" class="autosubmit" name="viewMode" value="text"
+              tal:attributes="checked python:viewMode=='xml'" /> XML<br />
             <input type="submit" value="Go!" />
           </form>
         </div>
@@ -96,17 +89,8 @@
         </div>
         <!--"END TEXT SIZE"-->
 
-        <!--"BEGIN DICTIONARY OVERVIEW"-->
-        <div class="options" tal:condition="python:viewType=='dict'">
-          <h4>Dictionary view</h4>
-          <form name="f3" action="">
-            <input type="radio" name="r3" />Tab<br /> <input type="radio" name="r3" />Window<br />
-          </form>
-        </div>
-        <!--"END DICTIONARY OVERVIEW"-->
-
         <!--"BEGIN TEXT NORMALIZATION"-->
-        <div class="options" tal:condition="python:viewType!='xml'">
+        <div class="options" tal:condition="python:viewMode!='xml'">
           <h4>Text normalization</h4>
           <form tal:attributes="action viewerUrl" class="autosubmit"
             tal:define="norm python:pageinfo.get('characterNormalization','regPlusNorm');">
@@ -125,29 +109,6 @@
         </div>
         <!--"END TEXT NORMALIZATION"-->
 
-        <!--"BEGIN PLACES"-->
-        <div class="options" tal:condition="python:viewType=='gis'">
-          <tal:block
-            tal:define="gisPlaces python:here.getGisPlaces(docinfo=docinfo, pageinfo=pageinfo); gisAllPlaces python:here.getAllGisPlaces(docinfo=docinfo, pageinfo=pageinfo);">
-            <span><b>Places</b></span>
-            <br />(Link to extern:)<br />
-            <span>Page</span>
-            <span style="float: right"> <a
-              tal:attributes="href python:'http://chinagis.mpiwg-berlin.mpg.de/chinagis/REST/db/mpdl/%s?id=%s&format=%s'%(name,gisPlaces,'gis')"
-              target="_blank"> <img src="images/arrow.png" alt="" />
-            </a>
-            </span>
-            <br />
-            <span>Book</span>
-            <span style="float: right"> <a
-              tal:attributes="href python:'http://chinagis.mpiwg-berlin.mpg.de/chinagis/REST/db/mpdl/%s?format=%s'%(name,'gis')"
-              target="_blank"> <img src="images/arrow.png" alt="" />
-            </a>
-            </span>
-            <br />
-          </tal:block>
-        </div>
-        <!--"END PLACES"-->
       </div>
       <!-- /col-right -->