Changeset 532:0b8bed1223ad in documentViewer for zpt
- Timestamp:
- Jul 25, 2012, 7:28:31 PM (12 years ago)
- Branch:
- default
- Location:
- zpt
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
zpt/common_template.zpt
r528 r532 12 12 bib docinfo/bib | nothing; bibType docinfo/bibType | nothing; 13 13 formattedLabel python:here.metadataService.getBibFormattedLabel(bibdata=bib);"> 14 <div tal:condition="not:formattedLabel"> 14 <div class="logo" tal:condition="exists:here/template/logo.png"> 15 <img tal:attributes="src here/template/logo.png/absolute_url"/> 16 </div> 17 <div class="title-block"> 18 <div class="title" tal:condition="not:formattedLabel"> 15 19 <tal:block tal:condition="python:docinfo['creator'] or docinfo['title']"> 16 20 <i tal:content="docinfo/creator" />, … … 20 24 tal:content="string:[no bibliographical information for this document (type ${bibType})]" /> 21 25 </div> 22 <div tal:condition="formattedLabel" tal:content="structure formattedLabel" /> 23 <div class="doclinks"> 24 <a tal:condition="python:viewMode!='index'" tal:attributes="href python:here.getLink('viewMode','index')">Bibliographical 25 information</a> 26 <a tal:condition="python:viewMode!='text'" tal:attributes="href python:here.getLink('viewMode','text')">Page view</a> 27 <a tal:condition="python:viewMode!='thumbs'" tal:attributes="href python:here.getLink('viewMode','thumbs')">Thumbnail overview</a> 26 <div class="title" tal:condition="formattedLabel" tal:content="structure formattedLabel" /> 27 <ul class="view-switcher"> 28 <li tal:attributes="class python:here.getStyle(viewMode, 'text')"><a tal:omit-tag="python:viewMode=='text'" 29 tal:attributes="href python:here.getLink('viewMode','text')">Text</a></li> 30 <li tal:attributes="class python:here.getStyle(viewMode, 'images')"><a tal:omit-tag="python:viewMode=='images'" 31 tal:attributes="href python:here.getLink('viewMode','images')">Image</a></li> 32 <li tal:attributes="class python:here.getStyle(viewMode, 'xml')"><a tal:omit-tag="python:viewMode=='xml'" 33 tal:attributes="href python:here.getLink('viewMode','xml')">XML</a></li> 34 <li tal:attributes="class python:here.getStyle(viewMode, 'thumbs')"><a tal:omit-tag="python:viewMode=='thumbs'" 35 tal:attributes="href python:here.getLink('viewMode','thumbs')">Thumbnail overview</a></li> 36 <li tal:attributes="class python:here.getStyle(viewMode, 'index')"><a tal:omit-tag="python:viewMode=='index'" 37 tal:attributes="href python:here.getLink('viewMode','index')">Document information</a></li> 38 </ul> 28 39 </div> 29 40 </metal:block> 30 41 <!-- /head --> 42 31 43 32 44 <!-- page ruler with previous/next page buttons --> … … 38 50 leftest python:test(flowLtr,first,last); rightest python:test(flowLtr,last,first);"> 39 51 <form class="autosubmit" tal:attributes="action viewerUrl"> 40 <input type="hidden" tal:define="params python:here.getParams('pn', None)" 41 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> 42 page <a tal:condition="leftest" 43 tal:attributes="href python:here.getLink('pn',leftest)">|<</a> <span 44 tal:condition="not:leftest">|<</span> <a tal:condition="left" 45 tal:attributes="href python:here.getLink('pn',left)"><</a> <span 46 tal:condition="not:left"><</span> <input class="autosubmit" size="3" 47 type="text" name="pn" tal:attributes="value pn" /> <span class="originalPage" 48 title="Original page number" 49 tal:define="originalPage pageinfo/pageNumberOrig | nothing" 50 tal:condition="python:originalPage!=None"> (<span 51 tal:replace="originalPage" /><span 52 tal:define="originalPageNorm pageinfo/pageNumberOrigNorm | nothing" 53 tal:condition="python:originalPageNorm!=None"> [<span 54 tal:replace="originalPageNorm" />] 55 </span>) 56 </span> <input type="submit" value="Go" /> of <span tal:replace="numPages" /> <a 57 tal:condition="right" tal:attributes="href python:here.getLink('pn',right)">></a> 58 <span tal:condition="not:right">></span> <a tal:condition="rightest" 59 tal:attributes="href python:here.getLink('pn',rightest)">>|</a> <span 52 <input type="hidden" tal:define="params python:here.getParams('pn', None)" tal:repeat="param params" 53 tal:attributes="name param; value python:params[param]" /> 54 <span class="ruler-main">page <a tal:condition="leftest" 55 tal:attributes="href python:here.getLink('pn',leftest)">|<</a> <span tal:condition="not:leftest">|<</span> <a 56 tal:condition="left" tal:attributes="href python:here.getLink('pn',left)"><</a> <span tal:condition="not:left"><</span> 57 <input class="autosubmit" size="3" type="text" name="pn" tal:attributes="value pn" /> <span class="originalPage" 58 title="Original page number" tal:define="originalPage pageinfo/pageNumberOrig | nothing" 59 tal:condition="python:originalPage!=None"> (<span tal:replace="originalPage" /><span 60 tal:define="originalPageNorm pageinfo/pageNumberOrigNorm | nothing" tal:condition="python:originalPageNorm!=None"> 61 [<span tal:replace="originalPageNorm" />] 62 </span>) 63 </span> <input type="submit" value="Go" /> of <span tal:replace="numPages" /> <a tal:condition="right" 64 tal:attributes="href python:here.getLink('pn',right)">></a> <span tal:condition="not:right">></span> <a 65 tal:condition="rightest" tal:attributes="href python:here.getLink('pn',rightest)">>|</a> <span 60 66 tal:condition="not:rightest">>|</span> 67 </span> <!-- ruler-main --> 61 68 </form> 62 69 </metal:block> … … 65 72 <!-- toc ruler (using getBatch) with previous/next toc page buttons --> 66 73 <metal:block metal:define-macro="toc_ruler"> 67 <form class="autosubmit" tal:attributes="action viewerUrl" 68 tal:define="startParam startParam | string:start"> 69 <input type="hidden" tal:define="params python:here.getParams(startParam, None)" 70 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> 71 <a tal:condition="batch/prevStart" 72 tal:attributes="href python:here.getLink(startParam,batch['prevStart'])"><</a> 73 <span tal:condition="not:batch/prevStart"><</span> 74 <form class="autosubmit" tal:attributes="action viewerUrl" tal:define="startParam startParam | string:start"> 75 <input type="hidden" tal:define="params python:here.getParams(startParam, None)" tal:repeat="param params" 76 tal:attributes="name param; value python:params[param]" /> <a tal:condition="batch/prevStart" 77 tal:attributes="href python:here.getLink(startParam,batch['prevStart'])"><</a> <span tal:condition="not:batch/prevStart"><</span> 74 78 <select class="autosubmit" tal:attributes="name startParam"> 75 <option tal:repeat="grp batch/batches" 76 tal:attributes="selected python:(start==grp['start']); value grp/start" 79 <option tal:repeat="grp batch/batches" tal:attributes="selected python:(start==grp['start']); value grp/start" 77 80 tal:content="string:${grp/start} - ${grp/end}" /> 78 </select> 79 <input type="submit" value="Go" /> <a tal:condition="batch/nextStart" 80 tal:attributes="href python:here.getLink(startParam,batch['nextStart'])">></a> 81 <span tal:condition="not:batch/nextStart">></span> 81 </select> <input type="submit" value="Go" /> <a tal:condition="batch/nextStart" 82 tal:attributes="href python:here.getLink(startParam,batch['nextStart'])">></a> <span tal:condition="not:batch/nextStart">></span> 82 83 </form> 83 84 </metal:block> … … 86 87 <metal:block metal:define-macro="toc_ruler_thumbs"> 87 88 <form class="autosubmit" tal:attributes="action viewerUrl"> 88 <input type="hidden" tal:define="params python:here.getParams('start',None)" 89 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> 90 <a tal:condition="left" tal:attributes="href python:here.getLink('start',left)"><</a> 91 <span tal:condition="not:left"><</span> 92 <select class="autosubmit" name="start" 93 tal:define="ofs python:test(pageinfo['pageZero'],0,1)"> 89 <input type="hidden" tal:define="params python:here.getParams('start',None)" tal:repeat="param params" 90 tal:attributes="name param; value python:params[param]" /> <a tal:condition="left" 91 tal:attributes="href python:here.getLink('start',left)"><</a> <span tal:condition="not:left"><</span> <select 92 class="autosubmit" name="start" tal:define="ofs python:test(pageinfo['pageZero'],0,1)"> 94 93 <tal:block> 95 <option tal:repeat="grp pageBatch/batches" 96 tal:attributes="selected python:start==grp['start']; value grp/start;" 94 <option tal:repeat="grp pageBatch/batches" tal:attributes="selected python:start==grp['start']; value grp/start;" 97 95 tal:content="string:${grp/start} - ${grp/end}" /> 98 96 </tal:block> 99 </select> 100 <input type="submit" value="Go" /> <a tal:condition="right" 101 tal:attributes="href python:here.getLink('start',right)">></a> <span 102 tal:condition="not:right">></span> 97 </select> <input type="submit" value="Go" /> <a tal:condition="right" tal:attributes="href python:here.getLink('start',right)">></a> 98 <span tal:condition="not:right">></span> 103 99 </form> 104 100 </metal:block> … … 106 102 <!-- toc type switcher --> 107 103 <metal:block metal:define-macro="toc_switcher"> 108 <ul class="switcher"> 109 <li tal:attributes="class python:test(tocMode=='thumbs', 'sel', None)"> 110 <a tal:attributes="href python:here.getLink('tocMode','thumbs')">Thumbnails</a> 111 </li> 112 <li tal:attributes="class python:test(tocMode=='text', 'sel', None)" 113 tal:condition="python:docpath and docinfo.get('numTocEntries', None)"> 114 <a tal:attributes="href python:here.getLink('tocMode','text')">Content</a> 115 </li> 116 <li tal:attributes="class python:test(tocMode=='figures', 'sel', None)" 117 tal:condition="python:docpath and docinfo.get('numFigureEntries', None)"> 118 <a tal:attributes="href python:here.getLink('tocMode','figures')">Figures</a> 119 </li> 120 <li tal:attributes="class python:test(tocMode=='concordance', 'sel', None)" 121 tal:condition="python:docpath and docinfo.get('pageNumbers', None)"> 122 <a tal:attributes="href python:here.getLink('tocMode','concordance')">Concordance</a> 123 </li> 124 <li tal:attributes="class python:test(tocMode=='none', 'sel', None)"> 125 <a tal:attributes="href python:here.getLink('tocMode','none')">None</a> 126 </li> 127 </ul> 104 <div class="toc-switcher"> 105 <ul> 106 <li tal:attributes="class python:here.getStyle(tocMode, 'none')"><span><a tal:omit-tag="python:tocMode=='none'" 107 tal:attributes="href python:here.getLink('tocMode','none')">None</a></span></li> 108 <li tal:attributes="class python:here.getStyle(tocMode, 'concordance')" 109 tal:condition="python:docpath and docinfo.get('pageNumbers', None)"><span><a 110 tal:omit-tag="python:tocMode=='concordance'" tal:attributes="href python:here.getLink('tocMode','concordance')">Concordance</a></span></li> 111 <li tal:attributes="class python:here.getStyle(tocMode, 'figures')" 112 tal:condition="python:docpath and docinfo.get('numFigureEntries', None)"><span><a 113 tal:omit-tag="python:tocMode=='figures'" tal:attributes="href python:here.getLink('tocMode','figures')">Figures</a></span></li> 114 <li tal:attributes="class python:here.getStyle(tocMode, 'text')" 115 tal:condition="python:docpath and docinfo.get('numTocEntries', None)"><span><a 116 tal:omit-tag="python:tocMode=='text'" tal:attributes="href python:here.getLink('tocMode','text')">Content</a></span></li> 117 <li tal:attributes="class python:here.getStyle(tocMode, 'thumbs')"><span><a 118 tal:omit-tag="python:tocMode=='thumbs'" tal:attributes="href python:here.getLink('tocMode','thumbs')">Thumbnails</a></span></li> 119 </ul> 120 </div> 128 121 </metal:block> 129 122 -
zpt/layer_text_search.zpt
r526 r532 16 16 <ul> 17 17 <metal:block metal:define-macro="layer_select_li"> 18 <li tal:condition="python:query"> 19 <input type="checkbox" class="autosubmit" name="viewLayer" value="search" 20 tal:attributes="checked python:'search' in viewLayers" /> Search hits 21 </li> 18 <li tal:condition="python:query"><input type="checkbox" class="autosubmit" name="viewLayer" value="search" 19 tal:attributes="checked python:'search' in viewLayers" /> Search hits</li> 22 20 </metal:block> 23 21 </ul> … … 48 46 <h4>Search</h4> 49 47 <form tal:attributes="action viewerUrl"> 50 <input type="hidden" 51 tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewLayer':None})" 52 tal:repeat="param params" 53 tal:attributes="name param; value python:params[param]" /> 48 <input type="hidden" tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewLayer':None})" 49 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> 54 50 <!-- make sure we have one viewLayer=search --> 55 51 <tal:block tal:repeat="vl viewLayers"> 56 <input type="hidden" name="viewLayer" tal:attributes="value vl" 57 tal:condition="python:vl != 'search'" /> 52 <input type="hidden" name="viewLayer" tal:attributes="value vl" tal:condition="python:vl != 'search'" /> 58 53 </tal:block> 59 54 <input type="hidden" name="viewLayer" value="search" /> 60 55 <!-- query text --> 61 <input type="text" name="query" tal:attributes="value query" /> <input 62 type="submit" value="Search" /> <a 56 <input type="text" name="query" tal:attributes="value query" /> <br /> <input type="submit" value="Search" /> <a 63 57 tal:attributes="href python:here.getLink('query',None)">Clear</a> 64 58 <ul> 65 <li> 66 <input type="radio" name="queryType" value="fulltext" 67 tal:attributes="checked python:queryType=='fulltext'" /> Exact 68 </li> 69 <li> 70 <input type="radio" name="queryType" value="fulltextMorph" 71 tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms 72 </li> 73 <li> 74 <input type="radio" name="queryType" value="ftIndex" 75 tal:attributes="checked python:queryType=='ftIndex'" /> Fulltext index 76 </li> 77 <li> 78 <input type="radio" name="queryType" value="ftIndexMorph" 79 tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological 80 index 81 </li> 59 <li><input type="radio" name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" /> 60 Exact</li> 61 <li><input type="radio" name="queryType" value="fulltextMorph" 62 tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms</li> 63 <li><input type="radio" name="queryType" value="ftIndex" tal:attributes="checked python:queryType=='ftIndex'" /> 64 Fulltext index</li> 65 <li><input type="radio" name="queryType" value="ftIndexMorph" 66 tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological index</li> 82 67 </ul> 83 68 </form> -
zpt/toc_concordance.zpt
r526 r532 6 6 </head> 7 7 <body> 8 <!-- block used for main content area --> 9 <div class="toc-concordance" metal:define-macro="main" 10 tal:define="start pageinfo/start; tocsize docinfo/numPages; grpsize pageinfo/tocPageSize; 8 <div class="toc-container" metal:define-macro="main"> 9 <div metal:use-macro="here/template/common_template/macros/toc_switcher" /> 10 <!-- block used for main content area --> 11 <div class="tocbody concordance" 12 tal:define="start pageinfo/start; tocsize docinfo/numPages; grpsize pageinfo/tocPageSize; 11 13 pageNumbers docinfo/pageNumbers | nothing; 12 14 batch python:here.getBatch(start=start,size=grpsize,end=tocsize,data=pageNumbers);"> 13 <div metal:use-macro="here/template/common_template/macros/toc_switcher" /> 14 <div class="ruler"> 15 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler" /> 16 </div> 17 <div class="content"> 18 <table tal:condition="pageNumbers"> 19 <tr> 20 <th>Scan</th> 21 <th>Original</th> 22 </tr> 23 <tr tal:repeat="toc batch/this"> 24 <tal:block tal:define="pn toc/pn | nothing"> 25 <td> 26 <a tal:condition="pn" 27 tal:attributes="href python:here.getLink('pn', toc['pn'])" 28 tal:content="toc/pn" title="Scan number">ScanNo</a> 29 </td> 30 <td> 31 <span class="originalPage" title="Original page number" 32 tal:define="originalPage toc/no | nothing" 33 tal:condition="python:originalPage!=None"><span 34 tal:replace="originalPage" /><span 35 tal:define="originalPageNorm toc/non | nothing" 36 tal:condition="python:originalPageNorm!=None"> [<span 37 tal:replace="originalPageNorm" />] 38 </span></span> 39 </td> 40 </tal:block> 41 </tr> 42 </table> 15 <div metal:use-macro="here/template/common_template/macros/toc_switcher" /> 16 <div class="ruler"> 17 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler" /> 18 </div> 19 <div class="content"> 20 <table tal:condition="pageNumbers"> 21 <tr> 22 <th>Scan</th> 23 <th>Original</th> 24 </tr> 25 <tr tal:repeat="toc batch/this"> 26 <tal:block tal:define="pn toc/pn | nothing"> 27 <td><a tal:condition="pn" tal:attributes="href python:here.getLink('pn', toc['pn'])" tal:content="toc/pn" 28 title="Scan number">ScanNo</a></td> 29 <td><span class="originalPage" title="Original page number" tal:define="originalPage toc/no | nothing" 30 tal:condition="python:originalPage!=None"><span tal:replace="originalPage" /><span 31 tal:define="originalPageNorm toc/non | nothing" tal:condition="python:originalPageNorm!=None"> [<span 32 tal:replace="originalPageNorm" />] 33 </span></span></td> 34 </tal:block> 35 </tr> 36 </table> 37 </div> 43 38 </div> 44 39 </div> -
zpt/toc_figures.zpt
r526 r532 6 6 </head> 7 7 <body> 8 <!-- block used for main content area --> 9 <div class="toc-figures" metal:define-macro="main" 10 tal:define="start pageinfo/start; tocsize docinfo/numFigureEntries; grpsize pageinfo/tocPageSize; 8 <div class="toc-container" metal:define-macro="main"> 9 <div metal:use-macro="here/template/common_template/macros/toc_switcher" /> 10 <!-- block used for main content area --> 11 <div class="tocbody figures" 12 tal:define="start pageinfo/start; tocsize docinfo/numFigureEntries; grpsize pageinfo/tocPageSize; 11 13 batch python:here.getBatch(start=start,size=grpsize,end=tocsize);"> 12 <div metal:use-macro="here/template/common_template/macros/toc_switcher"/> 13 <div class="ruler"> 14 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler"/> 14 <div metal:use-macro="here/template/common_template/macros/toc_switcher" /> 15 <div class="ruler"> 16 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler" /> 17 </div> 18 <div class="content" 19 tal:content="structure python:here.getTocPage(mode='figures',start=start,pageinfo=pageinfo,docinfo=docinfo)" /> 15 20 </div> 16 <div class="content"17 tal:content="structure python:here.getTocPage(mode='figures',start=start,pageinfo=pageinfo,docinfo=docinfo)" />18 21 </div> 19 22 <!-- /toc --> -
zpt/toc_text.zpt
r526 r532 6 6 </head> 7 7 <body> 8 <!-- block used for main content area --> 9 <div class="toc-text" metal:define-macro="main" 10 tal:define="start pageinfo/start; tocsize docinfo/numTocEntries; grpsize pageinfo/tocPageSize; 8 <div class="toc-container" metal:define-macro="main"> 9 <div metal:use-macro="here/template/common_template/macros/toc_switcher" /> 10 <!-- block used for main content area --> 11 <div class="tocbody text" 12 tal:define="start pageinfo/start; tocsize docinfo/numTocEntries; grpsize pageinfo/tocPageSize; 11 13 batch python:here.getBatch(start=start,size=grpsize,end=tocsize);"> 12 <div metal:use-macro="here/template/common_template/macros/toc_switcher"/> 13 <div class="ruler"> 14 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler"/> 14 <div class="ruler"> 15 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler" /> 16 </div> 17 <div class="content" tal:content="structure python:here.getTocPage(mode='text',start=start,pageinfo=pageinfo,docinfo=docinfo)" /> 15 18 </div> 16 <div class="content"17 tal:content="structure python:here.getTocPage(mode='text',start=start,pageinfo=pageinfo,docinfo=docinfo)" />18 19 </div> 19 <!-- toc -->20 <!-- toc --> 20 21 </body> 21 22 </html> -
zpt/toc_thumbs.zpt
r528 r532 6 6 </head> 7 7 <body> 8 <!-- block used for main content area --> 9 <div class="toc-thumbs" metal:define-macro="main" 10 tal:define="start pageinfo/start; 8 <div class="toc-container" metal:define-macro="main"> 9 <div metal:use-macro="here/template/common_template/macros/toc_switcher" /> 10 <!-- block used for main content area --> 11 <div class="tocbody thumbs" 12 tal:define="start pageinfo/start; 11 13 grpsize pageinfo/groupsize; 12 14 numgroups pageinfo/numgroups; … … 15 17 left python:test(flowLtr,pageBatch['prevStart'],pageBatch['nextStart']); 16 18 right python:test(flowLtr,pageBatch['nextStart'],pageBatch['prevStart']);"> 17 <div metal:use-macro="here/template/common_template/macros/toc_switcher"/>18 19 19 <div class="content"> 20 <div class="ruler"> 21 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler_thumbs"/> 20 <div class="content"> 21 <div class="ruler"> 22 <metal:block metal:use-macro="here/template/common_template/macros/toc_ruler_thumbs" /> 23 </div> 24 25 <table class="thumbs"> 26 <tr tal:repeat="row pageBatch/pages"> 27 <td tal:repeat="thumb row" tal:attributes="class python:here.getStyle(thumb['idx'],pn,'thumb')"><a 28 tal:define="idx thumb/idx" tal:condition="idx" tal:attributes="href python:here.getLink('pn',idx)"> <img 29 tal:attributes="src python:test(docinfo['imageURL'],here.getScalerUrl(pn=idx,dw=100,dh=100,docinfo=docinfo),'images/pic'); 30 alt idx" /><br /> 31 <span title="Scan number" tal:content="idx" /> <span 32 tal:condition="python:pageNumbers and pageNumbers.get(idx, False) and pageNumbers[idx]['no']" 33 title="Original page number" tal:content="python:' (%s)'%(pageNumbers[idx]['no'])" /> 34 </a></td> 35 </tr> 36 </table> 22 37 </div> 23 24 <table class="thumbs"> 25 <tr tal:repeat="row pageBatch/pages"> 26 <td tal:repeat="thumb row" 27 tal:attributes="class python:here.getStyle(thumb['idx'],pn,'thumb')"> 28 <a tal:define="idx thumb/idx" tal:condition="idx" 29 tal:attributes="href python:here.getLink('pn',idx)"> 30 <img 31 tal:attributes="src python:test(docinfo['imageURL'],here.getScalerUrl(pn=idx,dw=100,dh=100,docinfo=docinfo),'images/pic'); 32 alt idx" /><br/> 33 <span title="Scan number" tal:content="idx"/> 34 <span tal:condition="python:pageNumbers and pageNumbers.get(idx, False) and pageNumbers[idx]['no']" title="Original page number" tal:content="python:' (%s)'%(pageNumbers[idx]['no'])"/> 35 </a> 36 </td> 37 </tr> 38 </table> 39 </div> <!-- content --> 40 </div> <!-- toc --> 38 <!-- content --> 39 </div> 40 <!-- toc --> 41 </div> 41 42 </body> 42 43 </html> -
zpt/viewer_images.zpt
r514 r532 25 25 26 26 <script type="text/javascript" 27 tal:content=" string:27 tal:content="python:''' 28 28 var dlOpts = { 29 29 'interactionMode' : 'fullscreen', 30 'digilibBaseUrl' : ' $dlBaseUrl',31 'fn' : ' ${docinfo/imagePath}',32 'pn' : ' ${pageinfo/pn}',30 'digilibBaseUrl' : '%s', 31 'fn' : '%s', 32 'pn' : '%s', 33 33 'suppressParamNames' : ['fn'], 34 34 'scalerInsets' : {'x' : 140, 'y' : 100} 35 }; "></script>35 };'''%(dlBaseUrl,docinfo.get('imagePath',''),pageinfo.get('pn','1'))"></script> 36 36 37 37 <script type="text/javascript"> … … 70 70 <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> 71 71 </div> 72 <ul class="switcher">73 <li class="sel">Image</li>74 <li tal:condition="docpath">75 <a tal:attributes="href python:here.getLink('viewMode','text')">Text</a>76 </li>77 </ul>78 <!-- /switcher -->79 72 <div class="content"> 80 73 <div id="scaler"> -
zpt/viewer_text.zpt
r530 r532 14 14 <script type="text/javascript" tal:attributes="src string:$rootUrl/template/jquery_js"></script> 15 15 <script type="text/javascript"> 16 17 18 19 20 21 22 23 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 24 // --> 25 25 </script> 26 26 <!-- layer headers (rendered always) --> 27 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)"> 28 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/html_head" tal:condition="python:exists(mpath)"> 30 29 <metal:block metal:use-macro="python:path(mpath)" /> 31 30 </tal:block> 32 31 </tal:block> 33 34 32 </head> 35 33 <body tal:condition="numPages"> … … 43 41 <metal:block metal:use-macro="here/template/common_template/macros/head" /> 44 42 </div> 43 45 44 <div class="page-body" tal:condition="python:here.isAccessible(docinfo)"> 46 45 <!--table of contents--> 47 46 <div class="col toc"> 48 <metal:block 49 metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> 47 <metal:block metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> 50 48 </div> 51 49 … … 55 53 <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> 56 54 </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 55 <div class="content"> 64 56 <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle" … … 81 73 <!--"BEGIN TEXT DISPLAY" --> 82 74 <div class="options"> 83 <h4>Text display</h4>75 <h4>Text layer</h4> 84 76 <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]" /> 77 <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None,'viewMode':None})" 78 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> 89 79 <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> 80 <!-- text layer select buttons (rendered always) --> 81 <tal:block tal:repeat="layer availableLayers"> 82 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/layer_select_li" 83 tal:condition="python:exists(mpath)"> 84 <li metal:use-macro="python:path(mpath)" /> 85 </tal:block> 86 </tal:block> 109 87 </ul> 110 88 </form> … … 113 91 114 92 <!--"BEGIN TEXT SIZE"--> 115 < div class="options">93 <!-- <div class="options"> 116 94 <h4>Text size</h4> 117 95 <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> 96 <li><a href="javascript:fontSize(12);" class="fs_sml">S</a></li> 97 <li><a href="javascript:fontSize(14);" class="fs_med">M</a></li> 98 <li><a href="javascript:fontSize(16);" class="fs_lrg">L</a></li> 127 99 </ul> 128 </div> 100 </div> --> 129 101 <!--"END TEXT SIZE"--> 130 102 … … 136 108 <input type="hidden" 137 109 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]" /> 110 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> 140 111 <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> 112 <li><input type="radio" class="autosubmit" name="characterNormalization" value="orig" 113 tal:attributes="checked python:norm=='orig'" /> Original</li> 114 <li><input type="radio" class="autosubmit" name="characterNormalization" value="reg" 115 tal:attributes="checked python:norm=='reg'" /> Regularized</li> 116 <li><input type="radio" class="autosubmit" name="characterNormalization" value="regPlusNorm" 117 tal:attributes="checked python:norm=='regPlusNorm'" /> Normalized</li> 154 118 </ul> 155 119 <input type="submit" value="Go!" /> … … 160 124 <!-- layer option boxes (rendered if active) --> 161 125 <tal:block tal:repeat="layer availableLayers"> 162 <tal:block 163 tal:define="mpath string:here/template/layer_text_${layer}/macros/options_box" 126 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/options_box" 164 127 tal:condition="python:exists(mpath)"> 165 128 <metal:block metal:use-macro="python:path(mpath)" /> -
zpt/viewer_xml.zpt
r512 r532 46 46 <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> 47 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 48 <div class="content"> 55 49 <div class="pageHeaderTitle" tal:condition="exists:pageinfo/pageHeaderTitle" … … 62 56 <!-- right-side options --> 63 57 <div class="col buttons"> 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={'viewMode':None})"70 tal:repeat="param params"71 tal:attributes="name param; value python:params[param]" />72 <ul>73 <li>74 <input class="autosubmit" type="radio" name="viewMode" value="text"75 tal:attributes="checked python:viewMode=='text'" /> Text76 </li>77 <li>78 <input type="radio" class="autosubmit" name="viewMode" value="text"79 tal:attributes="checked python:viewMode=='xml'" /> XML80 </li>81 </ul>82 <input type="submit" value="Go!" />83 </form>84 </div>85 <!--"END TEXT DISPLAY"-->86 87 58 <!--"BEGIN TEXT SIZE"--> 88 < div class="options">59 <!-- <div class="options"> 89 60 <h4>Text size</h4> 90 61 <ul class="fsizer"> … … 99 70 </li> 100 71 </ul> 101 </div> 72 </div> --> 102 73 <!--"END TEXT SIZE"--> 103 74
Note: See TracChangeset
for help on using the changeset viewer.