Mercurial > hg > documentViewer
comparison zpt/common_template.zpt @ 536:abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
author | casties |
---|---|
date | Thu, 26 Jul 2012 21:22:56 +0200 |
parents | 510bae2b593b |
children | 6cdc31e9ed8e |
comparison
equal
deleted
inserted
replaced
535:510bae2b593b | 536:abd36d4d97b8 |
---|---|
10 tal:define="viewMode pageinfo/viewMode; | 10 tal:define="viewMode pageinfo/viewMode; |
11 docpath docinfo/textURLPath | nothing; | 11 docpath docinfo/textURLPath | nothing; |
12 bib docinfo/bib | nothing; bibType docinfo/bibType | nothing; | 12 bib docinfo/bib | nothing; bibType docinfo/bibType | nothing; |
13 formattedLabel python:here.metadataService.getBibFormattedLabel(bibdata=bib);"> | 13 formattedLabel python:here.metadataService.getBibFormattedLabel(bibdata=bib);"> |
14 <div class="logo" tal:condition="exists:here/template/logo.png"> | 14 <div class="logo" tal:condition="exists:here/template/logo.png"> |
15 <img tal:attributes="src here/template/logo.png/absolute_url"/> | 15 <img tal:attributes="src here/template/logo.png/absolute_url" /> |
16 </div> | 16 </div> |
17 <div class="title-block"> | 17 <div class="title-block"> |
18 <div class="title" tal:condition="not:formattedLabel"> | 18 <div class="title" tal:condition="not:formattedLabel"> |
19 <tal:block tal:condition="python:docinfo['creator'] or docinfo['title']"> | 19 <tal:block tal:condition="python:docinfo['creator'] or docinfo['title']"> |
20 <i tal:content="docinfo/creator" />, | 20 <i tal:content="docinfo/creator" />, |
21 <span tal:content="docinfo/title" />, <span tal:content="docinfo/date" /> | 21 <span tal:content="docinfo/title" />, <span tal:content="docinfo/date" /> |
22 </tal:block> | 22 </tal:block> |
23 <span tal:condition="not:python:docinfo['creator'] or docinfo['title']" | 23 <span tal:condition="not:python:docinfo['creator'] or docinfo['title']" |
24 tal:content="string:[no bibliographical information for this document (type ${bibType})]" /> | 24 tal:content="string:[no bibliographical information for this document (type ${bibType})]" /> |
25 </div> | 25 </div> |
26 <div class="title" tal:condition="formattedLabel" tal:content="structure formattedLabel" /> | 26 <div class="title" tal:condition="formattedLabel" tal:content="structure formattedLabel" /> |
27 <ul class="view-switcher"> | 27 <ul class="view-switcher"> |
28 <li tal:attributes="class python:here.getStyle(viewMode, 'text')"><a tal:omit-tag="python:viewMode=='text'" | 28 <li tal:condition="docpath" tal:attributes="class python:here.getStyle(viewMode, 'text')"><a |
29 tal:attributes="href python:here.getLink('viewMode','text')">Text</a></li> | 29 tal:omit-tag="python:viewMode=='text'" 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'" | 30 <li tal:condition="python:docinfo.get('imagePath',None)" tal:attributes="class python:here.getStyle(viewMode, 'images')"><a |
31 tal:attributes="href python:here.getLink('viewMode','images')">Image</a></li> | 31 tal:omit-tag="python:viewMode=='images'" 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'" | 32 <li tal:condition="docpath" tal:attributes="class python:here.getStyle(viewMode, 'xml')"><a |
33 tal:attributes="href python:here.getLink('viewMode','xml')">XML</a></li> | 33 tal:omit-tag="python:viewMode=='xml'" 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'" | 34 <li tal:condition="python:docinfo.get('imagePath',None)" tal:attributes="class python:here.getStyle(viewMode, 'thumbs')"><a |
35 tal:attributes="href python:here.getLink('viewMode','thumbs')">Thumbnail overview</a></li> | 35 tal:omit-tag="python:viewMode=='thumbs'" tal:attributes="href python:here.getLink('viewMode','thumbs')">Thumbnail |
36 <li tal:attributes="class python:here.getStyle(viewMode, 'index')"><a tal:omit-tag="python:viewMode=='index'" | 36 overview</a></li> |
37 tal:attributes="href python:here.getLink('viewMode','index')">Document information</a></li> | 37 <li tal:attributes="class python:here.getStyle(viewMode, 'index')"><a tal:omit-tag="python:viewMode=='index'" |
38 </ul> | 38 tal:attributes="href python:here.getLink('viewMode','index')">Document information</a></li> |
39 </ul> | |
39 </div> | 40 </div> |
40 </metal:block> | 41 </metal:block> |
41 <!-- /head --> | 42 <!-- /head --> |
42 | 43 |
43 | 44 |
48 first python:test(pn>1,1,None); last python:test(pn<numPages,numPages,None); | 49 first python:test(pn>1,1,None); last python:test(pn<numPages,numPages,None); |
49 left python:test(flowLtr,prev,next); right python:test(flowLtr,next,prev); | 50 left python:test(flowLtr,prev,next); right python:test(flowLtr,next,prev); |
50 leftest python:test(flowLtr,first,last); rightest python:test(flowLtr,last,first);"> | 51 leftest python:test(flowLtr,first,last); rightest python:test(flowLtr,last,first);"> |
51 <form class="autosubmit" tal:attributes="action viewerUrl"> | 52 <form class="autosubmit" tal:attributes="action viewerUrl"> |
52 <input type="hidden" tal:define="params python:here.getParams('pn', None)" tal:repeat="param params" | 53 <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 tal:attributes="name param; value python:params[param]" /> <span class="ruler-main">page <a tal:condition="leftest" |
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 | 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> | 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" | 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" | 58 title="Original page number" tal:define="originalPage pageinfo/pageNumberOrig | nothing" |
59 tal:condition="python:originalPage!=None"> (<span tal:replace="originalPage" /><span | 59 tal:condition="python:originalPage!=None"> (<span tal:replace="originalPage" /><span |
60 tal:define="originalPageNorm pageinfo/pageNumberOrigNorm | nothing" tal:condition="python:originalPageNorm!=None"> | 60 tal:define="originalPageNorm pageinfo/pageNumberOrigNorm | nothing" tal:condition="python:originalPageNorm!=None"> |
61 [<span tal:replace="originalPageNorm" />]</span>) | 61 [<span tal:replace="originalPageNorm" />] |
62 </span> <input type="submit" value="Go" /> of <span tal:replace="numPages" /> <a tal:condition="right" | 62 </span>) |
63 </span> <input type="submit" value="Go" /> of <span tal:replace="numPages" /> <a tal:condition="right" | |
63 tal:attributes="href python:here.getLink('pn',right)">></a> <span tal:condition="not:right">></span> <a | 64 tal:attributes="href python:here.getLink('pn',right)">></a> <span tal:condition="not:right">></span> <a |
64 tal:condition="rightest" tal:attributes="href python:here.getLink('pn',rightest)">>|</a> <span | 65 tal:condition="rightest" tal:attributes="href python:here.getLink('pn',rightest)">>|</a> <span |
65 tal:condition="not:rightest">>|</span> | 66 tal:condition="not:rightest">>|</span> |
66 </span> <!-- ruler-main --> | 67 </span> |
68 <!-- ruler-main --> | |
67 </form> | 69 </form> |
68 </metal:block> | 70 </metal:block> |
69 <!-- /ruler --> | 71 <!-- /ruler --> |
70 | 72 |
71 <!-- toc ruler (using getBatch) with previous/next toc page buttons --> | 73 <!-- toc ruler (using getBatch) with previous/next toc page buttons --> |
84 | 86 |
85 <!-- toc ruler for thumbs (using getPageBatch) with previous/next toc page buttons --> | 87 <!-- toc ruler for thumbs (using getPageBatch) with previous/next toc page buttons --> |
86 <metal:block metal:define-macro="toc_ruler_thumbs"> | 88 <metal:block metal:define-macro="toc_ruler_thumbs"> |
87 <form class="autosubmit" tal:attributes="action viewerUrl"> | 89 <form class="autosubmit" tal:attributes="action viewerUrl"> |
88 <input type="hidden" tal:define="params python:here.getParams('start',None)" tal:repeat="param params" | 90 <input type="hidden" tal:define="params python:here.getParams('start',None)" tal:repeat="param params" |
89 tal:attributes="name param; value python:params[param]" /> <a tal:condition="left" | 91 tal:attributes="name param; value python:params[param]" /><span class="ruler-main"><a tal:condition="left" |
90 tal:attributes="href python:here.getLink('start',left)"><</a> <span tal:condition="not:left"><</span> <select | 92 tal:attributes="href python:here.getLink('start',left)"><</a> <span tal:condition="not:left"><</span> <select |
91 class="autosubmit" name="start" tal:define="ofs python:test(pageinfo['pageZero'],0,1)"> | 93 class="autosubmit" name="start" tal:define="ofs python:test(pageinfo['pageZero'],0,1)"> |
92 <tal:block> | 94 <tal:block> |
93 <option tal:repeat="grp pageBatch/batches" tal:attributes="selected python:start==grp['start']; value grp/start;" | 95 <option tal:repeat="grp pageBatch/batches" tal:attributes="selected python:start==grp['start']; value grp/start;" |
94 tal:content="string:${grp/start} - ${grp/end}" /> | 96 tal:content="string:${grp/start} - ${grp/end}" /> |
95 </tal:block> | 97 </tal:block> |
96 </select> <input type="submit" value="Go" /> <a tal:condition="right" tal:attributes="href python:here.getLink('start',right)">></a> | 98 </select> <input type="submit" value="Go" /> <a tal:condition="right" tal:attributes="href python:here.getLink('start',right)">></a> |
97 <span tal:condition="not:right">></span> | 99 <span tal:condition="not:right">></span></span> |
98 </form> | 100 </form> |
99 </metal:block> | 101 </metal:block> |
100 | 102 |
101 <!-- toc type switcher --> | 103 <!-- toc type switcher --> |
102 <metal:block metal:define-macro="toc_switcher"> | 104 <metal:block metal:define-macro="toc_switcher"> |
103 <div class="toc-switcher-col"> | 105 <div class="toc-switcher-col"> |
104 <div class="toc-switcher"> | 106 <div class="toc-switcher"> |
105 <ul> | 107 <ul> |
106 <li tal:attributes="class python:here.getStyle(tocMode, 'none')"><span><a tal:omit-tag="python:tocMode=='none'" | 108 <li tal:attributes="class python:here.getStyle(tocMode, 'none')"><span><a |
107 tal:attributes="href python:here.getLink('tocMode','none')">None</a></span></li> | 109 tal:omit-tag="python:tocMode=='none'" tal:attributes="href python:here.getLink('tocMode','none')">None</a></span></li> |
108 <li tal:attributes="class python:here.getStyle(tocMode, 'concordance')" | 110 <li tal:attributes="class python:here.getStyle(tocMode, 'concordance')" |
109 tal:condition="python:docpath and docinfo.get('pageNumbers', None)"><span><a | 111 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> | 112 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')" | 113 <li tal:attributes="class python:here.getStyle(tocMode, 'figures')" |
112 tal:condition="python:docpath and docinfo.get('numFigureEntries', None)"><span><a | 114 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> | 115 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')" | 116 <li tal:attributes="class python:here.getStyle(tocMode, 'text')" |
115 tal:condition="python:docpath and docinfo.get('numTocEntries', None)"><span><a | 117 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> | 118 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 | 119 <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> | 120 tal:omit-tag="python:tocMode=='thumbs'" tal:attributes="href python:here.getLink('tocMode','thumbs')">Thumbnails</a></span></li> |
119 </ul> | 121 </ul> |
120 </div> | 122 </div> |
121 </div> | 123 </div> |
122 </metal:block> | 124 </metal:block> |
123 | 125 |
124 </body> | 126 </body> |
125 </html> | 127 </html> |