Changeset 501:29c6d09a506c in documentViewer
- Timestamp:
- Feb 15, 2012, 4:57:02 PM (13 years ago)
- Branch:
- elementtree
- Files:
-
- 2 added
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
MpdlXmlTextServer.py
r482 r501 393 393 return serialize(pagediv) 394 394 395 return "no text here"395 return None 396 396 397 397 # TODO: should be getWordInfo -
documentViewer.py
r499 r501 122 122 toc_figures = PageTemplateFile('zpt/toc_figures', globals()) 123 123 toc_none = PageTemplateFile('zpt/toc_none', globals()) 124 head_main = PageTemplateFile('zpt/head_main', globals())124 common_template = PageTemplateFile('zpt/common_template', globals()) 125 125 info_xml = PageTemplateFile('zpt/info_xml', globals()) 126 126 docuviewer_css = ImageFile('css/docuviewer.css',globals()) 127 127 # make ImageFile better for development 128 128 docuviewer_css.index_html = refreshingImageFileIndexHtml 129 jquery_js = ImageFile('js/jquery.js',globals()) 129 130 130 131 -
zpt/toc_figures.zpt
r489 r501 28 28 </ul> 29 29 <div class="ruler"> 30 <form class="autosubmit" tal:attributes="action viewerUrl"> 31 <input type="hidden" 32 tal:define="params python:here.getParams('start', None)" 33 tal:repeat="param params" 34 tal:attributes="name param; value python:params[param]" /> 35 <a tal:condition="batch/prevStart" 36 tal:attributes="href python:here.getLink('start',batch['prevStart'])"><</a> 37 <span tal:condition="not:batch/prevStart"><</span> 38 <select class="autosubmit" name="start"> 39 <option tal:repeat="grp batch/batches" 40 tal:attributes="selected python:(start==grp['start']); value grp/start" 41 tal:content="string:${grp/start} - ${grp/end}" /> 42 </select> 43 <input type="submit" value="Go" /> 44 <a tal:condition="batch/nextStart" 45 tal:attributes="href python:here.getLink('start',batch['nextStart'])">></a> 46 <span tal:condition="not:batch/nextStart">></span> 47 </form> 30 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler"/> 48 31 </div> 49 32 <div class="content" -
zpt/toc_text.zpt
r489 r501 28 28 </ul> 29 29 <div class="ruler"> 30 <form class="autosubmit" tal:attributes="action viewerUrl"> 31 <input type="hidden" 32 tal:define="params python:here.getParams('start', None)" 33 tal:repeat="param params" 34 tal:attributes="name param; value python:params[param]" /> 35 <a tal:condition="batch/prevStart" 36 tal:attributes="href python:here.getLink('start',batch['prevStart'])"><</a> 37 <span tal:condition="not:batch/prevStart"><</span> 38 <select class="autosubmit" name="start"> 39 <option tal:repeat="grp batch/batches" 40 tal:attributes="selected python:(start==grp['start']); value grp/start" 41 tal:content="string:${grp/start} - ${grp/end}" /> 42 </select> 43 <input type="submit" value="Go" /> 44 <a tal:condition="batch/nextStart" 45 tal:attributes="href python:here.getLink('start',batch['nextStart'])">></a> 46 <span tal:condition="not:batch/nextStart">></span> 47 </form> 30 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler"/> 48 31 </div> 49 32 <div class="content" -
zpt/viewer_images.zpt
r500 r501 6 6 numPages docinfo/numPages | nothing; dlBaseUrl docinfo/digilibBaseUrl | nothing;"> 7 7 <head> 8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 9 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" /> 8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 9 <title 10 tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" /> 10 11 <link rel="stylesheet" href="template/docuviewer_css" type="text/css" /> 11 12 <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.js"></script> 12 <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.cookie.js"></script> 13 <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.js"></script> 14 <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.geometry.js"></script> 15 <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.arrows.js"></script> 16 <script type="text/javascript" tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.marks.js"></script> 17 <link rel="stylesheet" type="text/css" tal:attributes="href string:$dlBaseUrl/jquery/jquery.digilib.css" /> 13 <script type="text/javascript" 14 tal:attributes="src string:$dlBaseUrl/jquery/jquery.cookie.js"></script> 15 <script type="text/javascript" 16 tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.js"></script> 17 <script type="text/javascript" 18 tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.geometry.js"></script> 19 <script type="text/javascript" 20 tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.arrows.js"></script> 21 <script type="text/javascript" 22 tal:attributes="src string:$dlBaseUrl/jquery/jquery.digilib.marks.js"></script> 23 <link rel="stylesheet" type="text/css" 24 tal:attributes="href string:$dlBaseUrl/jquery/jquery.digilib.css" /> 18 25 19 <script type="text/javascript"20 tal:content="string:26 <script type="text/javascript" 27 tal:content="string: 21 28 var dlOpts = { 22 29 'interactionMode' : 'fullscreen', … … 28 35 };"></script> 29 36 30 <script type="text/javascript">31 // <!--32 $(document).ready(function() {33 // autosubmit forms34 $('form.autosubmit').find('.autosubmit').change(function() {35 this.form.submit();36 });37 $('form.autosubmit input[type="submit"]').hide();38 // get digilib div39 $digilib = $('div#scaler');40 // configure digilib41 $digilib.digilib(dlOpts);42 });43 // -->44 </script>37 <script type="text/javascript"> 38 // <!-- 39 $(document).ready(function() { 40 // autosubmit forms 41 $('form.autosubmit').find('.autosubmit').change(function() { 42 this.form.submit(); 43 }); 44 $('form.autosubmit input[type="submit"]').hide(); 45 // get digilib div 46 $digilib = $('div#scaler'); 47 // configure digilib 48 $digilib.digilib(dlOpts); 49 }); 50 // --> 51 </script> 45 52 </head> 46 53 <body tal:condition="numPages"> … … 48 55 tal:define="docpath docinfo/textURLPath | nothing; 49 56 pn pageinfo/pn; 50 flowLtr python:pageinfo.get('pageFlow','ltr')!='rtl'; 51 prev python:test(pn>1,pn-1,None); next python:test(pn<numPages,pn+1,None); 52 first python:test(pn>1,1,None); last python:test(pn<numPages,numPages,None); 53 left python:test(flowLtr,prev,next); right python:test(flowLtr,next,prev); 54 leftest python:test(flowLtr,first,last); rightest python:test(flowLtr,last,first);"> 57 flowLtr python:pageinfo.get('pageFlow','ltr')!='rtl';"> 55 58 <div class="page-head"> 56 <metal:block metal:use-macro="here/template/ head_main/macros/main" />59 <metal:block metal:use-macro="here/template/common_template/macros/head" /> 57 60 </div> 58 61 <div class="page-body" tal:condition="python:here.isAccessible(docinfo)"> 59 <!-- table of contents-->62 <!-- table of contents --> 60 63 <div class="col-left"> 61 <metal:block metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> 64 <metal:block 65 metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> 62 66 </div> 63 67 <!-- col-main: text page --> 64 68 <div class="col-main"> 65 69 <div class="ruler"> 66 <form class="autosubmit" tal:attributes="action viewerUrl"> 67 <input type="hidden" tal:define="params python:here.getParams('pn', None)" tal:repeat="param params" 68 tal:attributes="name param; value python:params[param]" /> page <a tal:condition="leftest" 69 tal:attributes="href python:here.getLink('pn',leftest)">|<</a> <span tal:condition="not:leftest">|<</span> <a 70 tal:condition="left" tal:attributes="href python:here.getLink('pn',left)"><</a> <span tal:condition="not:left"><</span> 71 <input class="autosubmit" size="3" type="text" name="pn" tal:attributes="value pn" /> 72 <tal:block tal:define="originalPage pageinfo/pageNumberOrig | nothing" tal:condition="python:originalPage!=None"> 73 (<span tal:replace="originalPage" /> 74 <span tal:define="originalPageNorm pageinfo/pageNumberOrigNorm | nothing" 75 tal:condition="python:originalPageNorm!=None">[<span tal:replace="originalPageNorm" />]</span>) 76 </tal:block> 77 <input type="submit" value="Go" /> 78 of <span tal:replace="numPages" /> <a tal:condition="right" 79 tal:attributes="href python:here.getLink('pn',right)">></a> <span tal:condition="not:right">></span> <a 80 tal:condition="rightest" tal:attributes="href python:here.getLink('pn',rightest)">>|</a> <span 81 tal:condition="not:rightest">>|</span> 82 </form> 83 </div><!-- ruler --> 70 <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> 71 </div> 84 72 <ul class="switcher"> 85 73 <li class="sel">Image</li> 86 <li><a tal:condition="docpath" tal:attributes="href python:here.getLink('viewMode','text')">Text</a></li> 74 <li tal:condition="docpath"> 75 <a tal:attributes="href python:here.getLink('viewMode','text')">Text</a> 76 </li> 87 77 </ul> 78 <!-- /switcher --> 88 79 <div class="content"> 89 80 <div id="scaler"> 90 <img tal:attributes="src string:${docinfo/imageURL}&pn=${pageinfo/pn}&dw=500&dh=500" /> 81 <img 82 tal:attributes="src string:${docinfo/imageURL}&pn=${pageinfo/pn}&dw=500&dh=500" /> 91 83 </div> 92 </div> <!-- content --> 93 </div> <!-- col-main --> 84 </div> 85 <!-- /content --> 86 </div> 87 <!-- /col-main --> 94 88 <div class="col-right"> 95 <div class="digilib-buttons"> 96 <div><a href="javascript:$digilib.digilib('zoomBy', 1.4)">zoom in</a></div> 97 <div><a href="javascript:$digilib.digilib('zoomBy', 0.7)">zoom out</a></div> 98 <div><a href="javascript:$digilib.digilib('zoomArea')">zoom area</a></div> 99 <div><a href="javascript:$digilib.digilib('zoomFull')">full page</a></div> 100 <div><a href="javascript:$digilib.digilib('zoomFull', 'width')">page width</a></div> 101 <div><a href="javascript:$digilib.digilib('setMark')">set mark</a></div> 102 <div><a href="javascript:$digilib.digilib('removeMark')">remove mark</a></div> 103 <div><a href="javascript:$digilib.digilib('reference')">get reference</a></div> 104 <div><a href="javascript:$digilib.digilib('digilibUrl', 'open_new')">digilib</a></div> 89 <div class="digilib-buttons"> 90 <div> 91 <a href="javascript:$digilib.digilib('zoomBy', 1.4)">zoom in</a> 105 92 </div> 93 <div> 94 <a href="javascript:$digilib.digilib('zoomBy', 0.7)">zoom out</a> 95 </div> 96 <div> 97 <a href="javascript:$digilib.digilib('zoomArea')">zoom area</a> 98 </div> 99 <div> 100 <a href="javascript:$digilib.digilib('zoomFull')">full page</a> 101 </div> 102 <div> 103 <a href="javascript:$digilib.digilib('zoomFull', 'width')">page width</a> 104 </div> 105 <div> 106 <a href="javascript:$digilib.digilib('setMark')">set mark</a> 107 </div> 108 <div> 109 <a href="javascript:$digilib.digilib('removeMark')">remove mark</a> 110 </div> 111 <div> 112 <a href="javascript:$digilib.digilib('reference')">get reference</a> 113 </div> 114 <div> 115 <a href="javascript:$digilib.digilib('digilibUrl', 'open_new')">digilib</a> 116 </div> 117 </div> 106 118 </div> 107 </div> <!-- page-body --> 119 </div> 120 <!-- page-body --> 108 121 <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)"> 109 122 <div class="errortext">Sorry, access to this document is restricted.</div> -
zpt/viewer_index.zpt
r499 r501 4 4 tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode; 5 5 tocMode pageinfo/tocMode; viewType pageinfo/viewType; viewerUrl docinfo/viewerUrl; 6 docpath docinfo/textURLPath | nothing; 7 query nothing; 6 8 numPages docinfo/numPages | nothing;"> 7 9 <head> … … 11 13 </head> 12 14 <body tal:condition="numPages"> 13 <tal:block 14 tal:define="docpath docinfo/textURLPath; 15 query nothing;"> 16 <table width="98%"> 17 <tr> 18 <td valign="top"> 19 <a href="http://echo.mpiwg-berlin.mpg.de/content"> 20 <img border="0" src="images/logo.png" align="top" alt=""/> 21 </a> 22 </td> 23 <td valign="top" align="right"> 24 <!--<b><span>home</span> <span>contact</span> <span>help</span></b>--> 25 </td> 26 <td valign="top" align="right"> 27 <!--BEGIN search --> 28 <form tal:condition="docpath" tal:attributes="action python:here.getLink()"> 29 <input type="hidden" tal:define="params python:here.getParams('viewMode', None)" tal:repeat="param params" tal:attributes="name param; value python:params[param]"/> 30 <input class="textMain" name="query" onfocus="this.select();" type="text" tal:attributes="value query"/> 31 <input type="submit" class="buttonMain" value="Search in Book"/> 32 </form> 33 <!-- END search--> 34 </td> 35 </tr> 36 </table> 37 <table border="0"> 38 <tr> 39 <td valign="top"> 40 <a tal:define="tp docinfo/titlePage | nothing" tal:attributes="href python:context.getLink('viewMode','auto')"> 41 <img tal:condition="tp" border="0" tal:attributes="src string:${docinfo/imageURL}&pn=$tp&dw=300&dh=500"/> 42 <img tal:condition="not:tp" border="0" src="images/oldbook.png"/> 43 </a> 44 </td> 45 <td valign="top"> 46 <table border=0 id="bibinfo" tal:define="formattedData python:here.metadata.getFormattedMetaDataExtended(bibdata=docinfo.get('bib', None))"> 47 <!-- wenn es bibinfo in docinfo gibt --> 15 <h1>Document information</h1> 48 16 49 <tal:x condition="python:formattedData"> 50 <div tal:replace="structure python:formattedData"/> 51 <!-- <div><a href="javascript:showExtendedMetadata(1)">extended</a></div> --> 52 <div tal:condition="exists:docinfo/attribution" tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=docinfo['attribution'])"/> 53 <div tal:condition="exists:docinfo/copyright" tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=docinfo['copyright'])"/> 54 </tal:x> 17 <div class="index-image"> 18 <!-- image --> 19 <a tal:define="tp docinfo/titlePage | nothing" 20 tal:attributes="href python:context.getLink('viewMode','auto')"><img 21 tal:condition="tp" border="0" 22 tal:attributes="src string:${docinfo/imageURL}&pn=$tp&dw=300&dh=500" /><img 23 tal:condition="not:tp" border="0" src="images/oldbook.png" /></a> 24 </div> 55 25 56 <!-- kein template fuer die daten --> 57 <tal:x condition="python:formattedData==None"> 58 <tal:x condition="exists:docinfo/bib"> 59 <tr tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo"> 60 <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'"/> 61 <td class="content" tal:content="bibinfo/bib"/> 62 </tr> 63 </tal:x> 64 65 <!-- wenn es keine bibinfo gibt (archimedes-texte) --> 66 <tal:y condition="not:exists:docinfo/bib"> 67 <tr> 68 <td class="type">Author:</td> 69 <td class="content" tal:content="python:docinfo['creator']"/> 70 </tr> 71 <tr> 72 <td class="type">Title:</td> 73 <td class="content" tal:content="python:docinfo['title']"/> 74 </tr> 75 <tr> 76 <td class="type">Year:</td> 77 <td class="content" tal:content="python:docinfo['date']"/> 78 </tr> 79 </tal:y> 80 </tal:x> <!-- ende kein template fuer die daten --> 81 </table> 26 <div class="index-info"> 27 <table border="0" 28 tal:define="formattedData python:here.metadata.getBibFormattedMetaDataExtended(bibdata=docinfo.get('bib', None))"> 29 <tal:x condition="python:formattedData"> 30 <!-- wenn es bibinfo in docinfo gibt --> 31 <tr tal:replace="structure python:formattedData" /> 32 </tal:x> 82 33 83 <br/><br/><br/><br/><br/><br/> 84 <table border="0" width="100%"> 85 <tr> 86 <td> 87 <a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">Access Book</a> 88 </td> 89 </tr> 90 91 <tr tal:condition="docpath"> 92 <td class="openbutton1">Download: 93 <a tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s.html'%(docpath.replace('.xml','.html'))" target="_blank">html</a> 94 / 95 <a tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)" target="_blank">xml</a> 96 </td> 97 </tr> 98 </table> 99 </td> 100 </tr> 34 <tal:x condition="python:formattedData==None"> 35 <!-- kein template fuer die daten --> 36 <tal:x condition="exists:docinfo/bib"> 37 <tr tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo"> 38 <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'" /> 39 <td class="content" tal:content="bibinfo/bib" /> 40 </tr> 41 </tal:x> 42 43 <tal:y condition="not:exists:docinfo/bib"> 44 <!-- wenn es kein bibinfo gibt (archimedes-texte) --> 45 <tr> 46 <td class="type">Author:</td> 47 <td class="content" tal:content="docinfo/creator" /> 48 </tr> 49 <tr> 50 <td class="type">Title:</td> 51 <td class="content" tal:content="docinfo/title" /> 52 </tr> 53 <tr> 54 <td class="type">Date:</td> 55 <td class="content" tal:content="docinfo/date" /> 56 </tr> 57 </tal:y> 58 </tal:x> 59 <!-- ende kein template fuer die daten --> 101 60 </table> 102 61 103 </tal:block> 62 <table border="0"> 63 <!-- attribution --> 64 <tr tal:condition="exists:docinfo/attribution" 65 tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=docinfo['attribution'])" /> 66 <!-- copyright --> 67 <tr tal:condition="exists:docinfo/copyright" 68 tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=docinfo['copyright'])" /> 69 </table> 70 </div> 71 72 <div> 73 <div> 74 <a class="openbutton" 75 tal:attributes="href python:context.getLink('viewMode','auto')">Access Book</a> 76 </div> 77 <div tal:condition="docpath"> 78 Download: <a 79 tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath.replace('.xml','.html'))" 80 target="_blank">html</a> / <a 81 tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)" 82 target="_blank">xml</a> 83 </div> 84 <div> 85 <!--BEGIN search --> 86 <form tal:condition="docpath" tal:attributes="action python:here.getLink()"> 87 <input type="hidden" tal:define="params python:here.getParams('viewMode', None)" 88 tal:repeat="param params" 89 tal:attributes="name param; value python:params[param]" /> <input 90 class="textMain" name="query" onfocus="this.select();" type="text" 91 tal:attributes="value query" /> <input type="submit" class="buttonMain" 92 value="Search in Book" /> 93 </form> 94 <!-- END search--> 95 </div> 96 </div> 97 <!-- DEBUG --> 98 <!-- <p tal:content="python:repr(docinfo)" /> --> 104 99 </body> 105 100 <body tal:condition="not:numPages"> -
zpt/viewer_text.zpt
r490 r501 2 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3 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; viewType pageinfo/viewType; viewerUrl docinfo/viewerUrl; 6 numPages docinfo/numPages | nothing;"> 7 <head> 8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 9 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')"/> 10 <link rel="stylesheet" href="template/docuviewer_css" type="text/css"> 11 </head> 12 <body tal:condition="numPages"> 13 <tal:block tal:define="docpath docinfo/textURLPath; 4 tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode; 5 tocMode pageinfo/tocMode; viewType pageinfo/viewType; 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; 14 29 pn pageinfo/pn; 15 30 flowLtr python:pageinfo.get('pageFlow','ltr')!='rtl'; 16 prev python:test(pn>1,pn-1,None); next python:test(pn<numPages,pn+1,None); 17 first python:test(pn>1,1,None); last python:test(pn<numPages,numPages,None); 18 left python:test(flowLtr,prev,next); right python:test(flowLtr,next,prev); 19 leftest python:test(flowLtr,first,last); rightest python:test(flowLtr,last,first); 20 textPage python:here.getTextPage(mode=viewType, pn=pn, docinfo=docinfo, pageinfo=pageinfo);"> 21 <div class="page-head"> 22 <metal:block metal:use-macro="here/template/head_main/macros/main" /> 31 textPage python:here.getTextPage(mode=viewType, pn=pn, docinfo=docinfo, pageinfo=pageinfo) or '[no text here]';"> 32 <div class="page-head"> 33 <metal:block metal:use-macro="here/template/common_template/macros/head" /> 34 </div> 35 <div class="page-body" tal:condition="python:here.isAccessible(docinfo)"> 36 <!--table of contents--> 37 <div class="col-left"> 38 <metal:block 39 metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> 40 </div> 41 42 <!-- text page --> 43 <div class="col-main"> 44 <div class="ruler"> 45 <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> 46 </div> 47 <ul class="switcher"> 48 <li> 49 <a tal:attributes="href python:here.getLink('viewMode','images')">Image</a> 50 </li> 51 <li class="sel">Text</li> 52 </ul> 53 <div class="content"> 54 <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle" 55 tal:content="structure pageinfo/pageHeaderTitle" /> 56 <tal:block tal:replace="structure textPage" /> 57 </div> 58 </div> 59 <!-- col-main --> 60 61 <!-- right-side options --> 62 <div class="col-right"> 63 <!--"BEGIN TEXT DISPLAY" --> 64 <div class="options"> 65 <h4>Text display</h4> 66 <form tal:attributes="action viewerUrl" class="autosubmit"> 67 <input type="hidden" 68 tal:define="params python:here.getParams(params={'viewType':None})" 69 tal:repeat="param params" 70 tal:attributes="name param; value python:params[param]" /> <input 71 class="autosubmit" type="radio" name="viewType" value="" 72 tal:attributes="checked python:viewType!='xml'" /> Text<br /> <span 73 class="optionsText" tal:condition="python:viewType!='xml'"> 74 <input type="checkbox" class="autosubmit" name="viewType" 75 value="dict" tal:attributes="checked python:viewType=='dict'" /> Dictionary<br /> 76 </span> <span class="optionsText" 77 tal:condition="python:viewType!='xml' and docinfo.get('numPlaces',0)"> 78 <input type="checkbox" class="autosubmit" name="viewType" 79 value="gis" tal:attributes="checked python:viewType=='gis'" /> Places<br /> 80 </span> <input type="radio" class="autosubmit" name="viewType" 81 tal:attributes="value string:xml; checked python:viewType=='xml'" /> XML<br /> 82 <input 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 <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> 23 94 </div> 24 <div class="page-body" tal:condition="python:here.isAccessible(docinfo)"> 25 <!--table of contents--> 26 <div class="col-left"> 27 <metal:block metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> 28 </div> 95 </div> 96 <!--"END TEXT SIZE"--> 29 97 30 <!-- text page --> 31 <div class="col-main"> 32 <div class="ruler"> 33 <form class="autosubmit" tal:attributes="action viewerUrl"> 34 <input type="hidden" tal:define="params python:here.getParams('pn', None)" 35 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> 36 page 37 <a tal:condition="leftest" tal:attributes="href python:here.getLink('pn',leftest)">|<</a> 38 <span tal:condition="not:leftest">|<</span> 39 <a tal:condition="left" tal:attributes="href python:here.getLink('pn',left)"><</a> 40 <span tal:condition="not:left"><</span> 41 <input class="autosubmit" size="3" type="text" name="pn" tal:attributes="value pn" /> 42 <tal:block tal:define="originalPage pageinfo/pageNumberOrig | nothing" 43 tal:condition="python:originalPage!=None"> 44 (<span tal:replace="originalPage"/><span tal:define="originalPageNorm pageinfo/pageNumberOrigNorm | nothing" tal:condition="python:originalPageNorm!=None"> 45 [<span tal:replace="originalPageNorm"/>]</span>) 46 </tal:block> 47 <input type="submit" value="Go" /> 48 of 49 <span tal:replace="numPages"/> 50 <a tal:condition="right" tal:attributes="href python:here.getLink('pn',right)">></a> 51 <span tal:condition="not:right">></span> 52 <a tal:condition="rightest" tal:attributes="href python:here.getLink('pn',rightest)">>|</a> 53 <span tal:condition="not:rightest">>|</span> 54 </form> 55 </div> <!-- ruler --> 56 <ul class="switcher"> 57 <li> 58 <a tal:attributes="href python:here.getLink('viewMode','images')">Image</a> 59 </li> 60 <li class="sel">Text</li> 61 </ul> 62 <div class="content"> 63 <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle" tal:content="structure pageinfo/pageHeaderTitle"/> 64 <tal:block tal:replace="structure textPage"/> 65 </div> 66 </div> <!-- col-main --> 67 68 <!-- right-side options --> 69 <div class="col-right"> 70 <!--"BEGIN TEXT DISPLAY" --> 71 <div class="options"> 72 <h4>Text display</h4> 73 <form tal:attributes="action viewerUrl" class="autosubmit"> 74 <input type="hidden" tal:define="params python:here.getParams(params={'viewType':None})" tal:repeat="param params" tal:attributes="name param; value python:params[param]"/> 75 <input class="autosubmit" type="radio" name="viewType" value="" tal:attributes="checked python:viewType!='xml'"/> Text<br/> 76 <span class="optionsText" tal:condition="python:viewType!='xml'"> 77 <input type="checkbox" class="autosubmit" name="viewType" value="dict" tal:attributes="checked python:viewType=='dict'"/> Dictionary<br/> 78 </span> 79 <span class="optionsText" tal:condition="python:viewType!='xml' and docinfo.get('numPlaces',0)"> 80 <input type="checkbox" class="autosubmit" name="viewType" value="gis" tal:attributes="checked python:viewType=='gis'"/> Places<br/> 81 </span> <input type="radio" class="autosubmit" name="viewType" tal:attributes="value string:xml; checked python:viewType=='xml'"/> XML<br/> 82 <input 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 92 <a href="javascript:fontSize(12);" class="fs_sml">S</a> 93 <a href="javascript:fontSize(14);" class="fs_med">M</a> 94 <a href="javascript:fontSize(16);" class="fs_lrg">L</a> 95 </div> 96 </div> 97 <!--"END TEXT SIZE"--> 98 99 <!--"BEGIN DICTIONARY OVERVIEW"--> 100 <div class="options" tal:condition="python:viewType=='dict'"> 101 <h4>Dictionary view</h4> 102 <form name="f3" action=""> 103 <input type="radio" name="r3"/>Tab<br/> 104 <input type="radio" name="r3"/>Window<br/> 105 </form> 106 </div> 107 <!--"END DICTIONARY OVERVIEW"--> 108 109 <!--"BEGIN TEXT NORMALIZATION"--> 110 <div class="options" tal:condition="python:viewType!='xml'"> 111 <h4>Text normalization</h4> 112 <form tal:attributes="action viewerUrl" class="autosubmit" 113 tal:define="norm python:pageinfo.get('characterNormalization','regPlusNorm');"> 114 <input type="hidden" tal:define="params python:here.getParams('characterNormalization',None)" tal:repeat="param params" tal:attributes="name param; value python:params[param]"/> 115 <input type="radio" class="autosubmit" name="characterNormalization" value="orig" tal:attributes="checked python:norm=='orig'"/> Original<br/> 116 <input type="radio" class="autosubmit" name="characterNormalization" value="reg" tal:attributes="checked python:norm=='reg'"/> Regularized<br/> 117 <input type="radio" class="autosubmit" name="characterNormalization" value="regPlusNorm" tal:attributes="checked python:norm=='regPlusNorm'"/> Normalized<br/> 118 <input type="submit" value="Go!"/> 119 </form> 120 </div> 121 <!--"END TEXT NORMALIZATION"--> 122 123 <!--"BEGIN PLACES"--> 124 <div class="options" tal:condition="python:viewType=='gis'"> 125 <tal:block tal:define="gisPlaces python:here.getGisPlaces(docinfo=docinfo, pageinfo=pageinfo); gisAllPlaces python:here.getAllGisPlaces(docinfo=docinfo, pageinfo=pageinfo);"> 126 <span><b>Places</b></span><br/>(Link to extern:)<br/> 127 <span>Page</span> 128 <span style="float:right"> 129 <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"> 130 <img src="images/arrow.png" alt=""/> 131 </a> 132 </span><br/> 133 <span>Book</span> 134 <span style="float:right"> 135 <a tal:attributes="href python:'http://chinagis.mpiwg-berlin.mpg.de/chinagis/REST/db/mpdl/%s?format=%s'%(name,'gis')" target="_blank"> 136 <img src="images/arrow.png" alt=""/> 137 </a> 138 </span><br/> 139 </tal:block> 140 </div> 141 <!--"END PLACES"--> 142 </div> <!-- col-right --> 143 144 </div> <!-- page-body --> 145 <div class="page_body" tal:condition="python:not here.isAccessible(docinfo)"> 146 <div class="errortext">Sorry, access to this document is restricted.</div> 147 </div> 148 </tal:block> 149 </body> 150 <body tal:condition="not:numPages"> 151 <div class="errortext">Sorry, document doesn't exist.</div> 152 </body> 153 </html> 98 <!--"BEGIN DICTIONARY OVERVIEW"--> 99 <div class="options" tal:condition="python:viewType=='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:viewType!='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:viewType=='gis'"> 129 <tal:block 130 tal:define="gisPlaces python:here.getGisPlaces(docinfo=docinfo, pageinfo=pageinfo); gisAllPlaces python:here.getAllGisPlaces(docinfo=docinfo, pageinfo=pageinfo);"> 131 <span><b>Places</b></span> 132 <br />(Link to extern:)<br /> 133 <span>Page</span> 134 <span style="float: right"> <a 135 tal:attributes="href python:'http://chinagis.mpiwg-berlin.mpg.de/chinagis/REST/db/mpdl/%s?id=%s&format=%s'%(name,gisPlaces,'gis')" 136 target="_blank"> <img src="images/arrow.png" alt="" /> 137 </a> 138 </span> 139 <br /> 140 <span>Book</span> 141 <span style="float: right"> <a 142 tal:attributes="href python:'http://chinagis.mpiwg-berlin.mpg.de/chinagis/REST/db/mpdl/%s?format=%s'%(name,'gis')" 143 target="_blank"> <img src="images/arrow.png" alt="" /> 144 </a> 145 </span> 146 <br /> 147 </tal:block> 148 </div> 149 <!--"END PLACES"--> 150 </div> 151 <!-- /col-right --> 152 153 </div> 154 <!-- /page-body --> 155 156 <div class="page-body" tal:condition="python:not here.isAccessible(docinfo)"> 157 <div class="errortext">Sorry, access to this document is restricted.</div> 158 </div> 159 160 </tal:block> 161 </body> 162 <body tal:condition="not:numPages"> 163 <div class="errortext">Sorry, document doesn't exist.</div> 164 </body> 165 </html>
Note: See TracChangeset
for help on using the changeset viewer.