Changeset 532:0b8bed1223ad in documentViewer for zpt/common_template.zpt
- Timestamp:
- Jul 25, 2012, 7:28:31 PM (12 years ago)
- Branch:
- default
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.