Mercurial > hg > documentViewer
diff zpt/viewer_text.zpt @ 503:030251fe9dbc elementtree
more cleanup.
made viewType into viewLayer and viewType=xml into viewMode=xml.
author | casties |
---|---|
date | Thu, 16 Feb 2012 14:30:01 +0100 |
parents | daf36d0fcfee |
children | 67014399894d |
line wrap: on
line diff
--- a/zpt/viewer_text.zpt Thu Feb 16 13:53:27 2012 +0100 +++ b/zpt/viewer_text.zpt Thu Feb 16 14:30:01 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; viewLayer pageinfo/viewLayer; 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=viewLayer, 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,21 @@ <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={'viewLayer':None,'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'"> - <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)"> - <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 /> + <span class="optionsText"> + <input type="checkbox" class="autosubmit" name="viewLayer" + value="dict" tal:attributes="checked python:viewLayer=='dict'" /> Dictionary<br /> + </span> + <span class="optionsText" tal:condition="python:docinfo.get('numPlaces',0)"> + <input type="checkbox" class="autosubmit" name="viewLayer" + value="gis" tal:attributes="checked python:viewLayer=='gis'" /> Places<br /> + </span> + <input type="radio" class="autosubmit" name="viewMode" value="xml" + tal:attributes="checked python:viewMode=='xml'" /> XML<br /> <input type="submit" value="Go!" /> </form> </div> @@ -97,7 +98,7 @@ <!--"END TEXT SIZE"--> <!--"BEGIN DICTIONARY OVERVIEW"--> - <div class="options" tal:condition="python:viewType=='dict'"> + <div class="options" tal:condition="python:viewLayer=='dict'"> <h4>Dictionary view</h4> <form name="f3" action=""> <input type="radio" name="r3" />Tab<br /> <input type="radio" name="r3" />Window<br /> @@ -106,7 +107,7 @@ <!--"END DICTIONARY OVERVIEW"--> <!--"BEGIN TEXT NORMALIZATION"--> - <div class="options" tal:condition="python:viewType!='xml'"> + <div class="options" tal:condition="python:viewLayer!='xml'"> <h4>Text normalization</h4> <form tal:attributes="action viewerUrl" class="autosubmit" tal:define="norm python:pageinfo.get('characterNormalization','regPlusNorm');"> @@ -126,7 +127,7 @@ <!--"END TEXT NORMALIZATION"--> <!--"BEGIN PLACES"--> - <div class="options" tal:condition="python:viewType=='gis'"> + <div class="options" tal:condition="python:viewLayer=='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>