Changeset 528:f8a5f63eafc0 in documentViewer for zpt/common_template.zpt
- Timestamp:
- Apr 13, 2012, 2:55:16 PM (12 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
zpt/common_template.zpt
r527 r528 8 8 <!-- block used for page header content area --> 9 9 <metal:block metal:define-macro="head" 10 tal:define="docpath docinfo/textURLPath | nothing; 11 query here/REQUEST/query | nothing; 12 queryType here/REQUEST/queryType | nothing; 13 bib docinfo/bib | nothing; bibType docinfo/bibType | nothing; 14 formattedLabel python:here.metadataService.getBibFormattedLabel(bibdata=bib);"> 10 tal:define="viewMode pageinfo/viewMode; 11 docpath docinfo/textURLPath | nothing; 12 bib docinfo/bib | nothing; bibType docinfo/bibType | nothing; 13 formattedLabel python:here.metadataService.getBibFormattedLabel(bibdata=bib);"> 15 14 <div tal:condition="not:formattedLabel"> 16 <tal:block tal:condition="python:docinfo['creator'] or docinfo['title']"><i tal:content="docinfo/creator"/>, 17 <span tal:content="docinfo/title"/>, <span tal:content="docinfo/date"/> 15 <tal:block tal:condition="python:docinfo['creator'] or docinfo['title']"> 16 <i tal:content="docinfo/creator" />, 17 <span tal:content="docinfo/title" />, <span tal:content="docinfo/date" /> 18 18 </tal:block> 19 19 <span tal:condition="not:python:docinfo['creator'] or docinfo['title']" 20 tal:content="string:[no bibliographical information for this document (type ${bibType})]" />20 tal:content="string:[no bibliographical information for this document (type ${bibType})]" /> 21 21 </div> 22 22 <div tal:condition="formattedLabel" tal:content="structure formattedLabel" /> 23 23 <div class="doclinks"> 24 <a tal:attributes="href python:here.getLink('viewMode','index')">Bibliographical information</a> 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> 25 28 </div> 26 29 </metal:block> … … 35 38 leftest python:test(flowLtr,first,last); rightest python:test(flowLtr,last,first);"> 36 39 <form class="autosubmit" tal:attributes="action viewerUrl"> 37 <input type="hidden" tal:define="params python:here.getParams('pn', None)" tal:repeat="param params" 38 tal:attributes="name param; value python:params[param]" /> page <a tal:condition="leftest" 39 tal:attributes="href python:here.getLink('pn',leftest)">|<</a> <span tal:condition="not:leftest">|<</span> <a 40 tal:condition="left" tal:attributes="href python:here.getLink('pn',left)"><</a> <span tal:condition="not:left"><</span> 41 <input class="autosubmit" size="3" type="text" name="pn" tal:attributes="value pn" /> <span class="originalPage" 42 title="Original page number" tal:define="originalPage pageinfo/pageNumberOrig | nothing" 43 tal:condition="python:originalPage!=None"> (<span tal:replace="originalPage" /><span 44 tal:define="originalPageNorm pageinfo/pageNumberOrigNorm | nothing" tal:condition="python:originalPageNorm!=None"> [<span 45 tal:replace="originalPageNorm" />]</span>) 46 </span> <input type="submit" value="Go" /> of <span tal:replace="numPages" /> <a tal:condition="right" 47 tal:attributes="href python:here.getLink('pn',right)">></a> <span tal:condition="not:right">></span> <a 48 tal:condition="rightest" tal:attributes="href python:here.getLink('pn',rightest)">>|</a> <span 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 49 60 tal:condition="not:rightest">>|</span> 50 61 </form> … … 52 63 <!-- /ruler --> 53 64 54 <!-- toc ruler with previous/next toc page buttons -->65 <!-- toc ruler (using getBatch) with previous/next toc page buttons --> 55 66 <metal:block metal:define-macro="toc_ruler"> 56 <form class="autosubmit" tal:attributes="action viewerUrl" tal:define="startParam startParam | string:start"> 57 <input type="hidden" tal:define="params python:here.getParams(startParam, None)" tal:repeat="param params" 58 tal:attributes="name param; value python:params[param]" /> <a tal:condition="batch/prevStart" 59 tal:attributes="href python:here.getLink(startParam,batch['prevStart'])"><</a> <span tal:condition="not:batch/prevStart"><</span> 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> 60 74 <select class="autosubmit" tal:attributes="name startParam"> 61 <option tal:repeat="grp batch/batches" tal:attributes="selected python:(start==grp['start']); value grp/start" 75 <option tal:repeat="grp batch/batches" 76 tal:attributes="selected python:(start==grp['start']); value grp/start" 62 77 tal:content="string:${grp/start} - ${grp/end}" /> 63 </select> <input type="submit" value="Go" /> <a tal:condition="batch/nextStart" 64 tal:attributes="href python:here.getLink(startParam,batch['nextStart'])">></a> <span tal:condition="not:batch/nextStart">></span> 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> 82 </form> 83 </metal:block> 84 85 <!-- toc ruler for thumbs (using getPageBatch) with previous/next toc page buttons --> 86 <metal:block metal:define-macro="toc_ruler_thumbs"> 87 <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)"> 94 <tal:block> 95 <option tal:repeat="grp pageBatch/batches" 96 tal:attributes="selected python:start==grp['start']; value grp/start;" 97 tal:content="string:${grp/start} - ${grp/end}" /> 98 </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> 65 103 </form> 66 104 </metal:block> … … 69 107 <metal:block metal:define-macro="toc_switcher"> 70 108 <ul class="switcher"> 71 <li tal:attributes="class python:test(tocMode=='thumbs', 'sel', None)"> <a72 tal:attributes="href python:here.getLink('tocMode','thumbs')">Thumbnails</a>109 <li tal:attributes="class python:test(tocMode=='thumbs', 'sel', None)"> 110 <a tal:attributes="href python:here.getLink('tocMode','thumbs')">Thumbnails</a> 73 111 </li> 74 112 <li tal:attributes="class python:test(tocMode=='text', 'sel', None)" … … 78 116 <li tal:attributes="class python:test(tocMode=='figures', 'sel', None)" 79 117 tal:condition="python:docpath and docinfo.get('numFigureEntries', None)"> 80 <a 81 tal:attributes="href python:here.getLink('tocMode','figures')">Figures</a> 118 <a tal:attributes="href python:here.getLink('tocMode','figures')">Figures</a> 82 119 </li> 83 120 <li tal:attributes="class python:test(tocMode=='concordance', 'sel', None)" 84 121 tal:condition="python:docpath and docinfo.get('pageNumbers', None)"> 85 <a 86 tal:attributes="href python:here.getLink('tocMode','concordance')">Concordance</a> 122 <a tal:attributes="href python:here.getLink('tocMode','concordance')">Concordance</a> 87 123 </li> 88 <li tal:attributes="class python:test(tocMode=='none', 'sel', None)"> <a89 tal:attributes="href python:here.getLink('tocMode','none')">None</a>124 <li tal:attributes="class python:test(tocMode=='none', 'sel', None)"> 125 <a tal:attributes="href python:here.getLink('tocMode','none')">None</a> 90 126 </li> 91 127 </ul>
Note: See TracChangeset
for help on using the changeset viewer.