annotate zpt/common_template.zpt @ 526:3f375a048402

moved search and dict into separate layers. removed search_template. added tocMode=concordance. fixed bug with paging tocs.
author casties
date Tue, 10 Apr 2012 19:41:44 +0200
parents 551ca1641a5e
children 652cc8d3f1a9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
501
29c6d09a506c more cleanup.
casties
parents:
diff changeset
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
29c6d09a506c more cleanup.
casties
parents:
diff changeset
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
29c6d09a506c more cleanup.
casties
parents:
diff changeset
3 <html xmlns="http://www.w3.org/1999/xhtml">
29c6d09a506c more cleanup.
casties
parents:
diff changeset
4 <head>
29c6d09a506c more cleanup.
casties
parents:
diff changeset
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
29c6d09a506c more cleanup.
casties
parents:
diff changeset
6 </head>
29c6d09a506c more cleanup.
casties
parents:
diff changeset
7 <body>
29c6d09a506c more cleanup.
casties
parents:
diff changeset
8 <!-- block used for page header content area -->
29c6d09a506c more cleanup.
casties
parents:
diff changeset
9 <metal:block metal:define-macro="head"
29c6d09a506c more cleanup.
casties
parents:
diff changeset
10 tal:define="docpath docinfo/textURLPath | nothing;
29c6d09a506c more cleanup.
casties
parents:
diff changeset
11 query here/REQUEST/query | nothing;
29c6d09a506c more cleanup.
casties
parents:
diff changeset
12 queryType here/REQUEST/queryType | nothing;
29c6d09a506c more cleanup.
casties
parents:
diff changeset
13 bib docinfo/bib | nothing; bibType docinfo/bibType | nothing;
29c6d09a506c more cleanup.
casties
parents:
diff changeset
14 formattedLabel python:here.metadataService.getBibFormattedLabel(bibdata=bib);">
505
29f2172db368 title also for non-bib-tag.
casties
parents: 502
diff changeset
15 <div tal:condition="not:formattedLabel">
29f2172db368 title also for non-bib-tag.
casties
parents: 502
diff changeset
16 <tal:block tal:condition="python:docinfo['creator'] or docinfo['title']"><i tal:content="docinfo/creator"/>,
29f2172db368 title also for non-bib-tag.
casties
parents: 502
diff changeset
17 <span tal:content="docinfo/title"/>, <span tal:content="docinfo/date"/>
29f2172db368 title also for non-bib-tag.
casties
parents: 502
diff changeset
18 </tal:block>
29f2172db368 title also for non-bib-tag.
casties
parents: 502
diff changeset
19 <span tal:condition="not:python:docinfo['creator'] or docinfo['title']"
501
29c6d09a506c more cleanup.
casties
parents:
diff changeset
20 tal:content="string:[no bibliographical information for this document (type ${bibType})]" />
505
29f2172db368 title also for non-bib-tag.
casties
parents: 502
diff changeset
21 </div>
501
29c6d09a506c more cleanup.
casties
parents:
diff changeset
22 <div tal:condition="formattedLabel" tal:content="structure formattedLabel" />
502
daf36d0fcfee more cleanup.
casties
parents: 501
diff changeset
23 <div class="doclinks">
daf36d0fcfee more cleanup.
casties
parents: 501
diff changeset
24 <a tal:attributes="href python:here.getLink('viewMode','index')">Bibliographical information</a>
daf36d0fcfee more cleanup.
casties
parents: 501
diff changeset
25 </div>
501
29c6d09a506c more cleanup.
casties
parents:
diff changeset
26 </metal:block>
29c6d09a506c more cleanup.
casties
parents:
diff changeset
27 <!-- /head -->
29c6d09a506c more cleanup.
casties
parents:
diff changeset
28
29c6d09a506c more cleanup.
casties
parents:
diff changeset
29 <!-- page ruler with previous/next page buttons -->
29c6d09a506c more cleanup.
casties
parents:
diff changeset
30 <metal:block metal:define-macro="page_ruler"
29c6d09a506c more cleanup.
casties
parents:
diff changeset
31 tal:define="
29c6d09a506c more cleanup.
casties
parents:
diff changeset
32 prev python:test(pn>1,pn-1,None); next python:test(pn<numPages,pn+1,None);
29c6d09a506c more cleanup.
casties
parents:
diff changeset
33 first python:test(pn>1,1,None); last python:test(pn<numPages,numPages,None);
29c6d09a506c more cleanup.
casties
parents:
diff changeset
34 left python:test(flowLtr,prev,next); right python:test(flowLtr,next,prev);
29c6d09a506c more cleanup.
casties
parents:
diff changeset
35 leftest python:test(flowLtr,first,last); rightest python:test(flowLtr,last,first);">
29c6d09a506c more cleanup.
casties
parents:
diff changeset
36 <form class="autosubmit" tal:attributes="action viewerUrl">
502
daf36d0fcfee more cleanup.
casties
parents: 501
diff changeset
37 <input type="hidden" tal:define="params python:here.getParams('pn', None)" tal:repeat="param params"
daf36d0fcfee more cleanup.
casties
parents: 501
diff changeset
38 tal:attributes="name param; value python:params[param]" /> page <a tal:condition="leftest"
daf36d0fcfee more cleanup.
casties
parents: 501
diff changeset
39 tal:attributes="href python:here.getLink('pn',leftest)">|&lt;</a> <span tal:condition="not:leftest">|&lt;</span> <a
daf36d0fcfee more cleanup.
casties
parents: 501
diff changeset
40 tal:condition="left" tal:attributes="href python:here.getLink('pn',left)">&lt;</a> <span tal:condition="not:left">&lt;</span>
daf36d0fcfee more cleanup.
casties
parents: 501
diff changeset
41 <input class="autosubmit" size="3" type="text" name="pn" tal:attributes="value pn" /> <span class="originalPage"
daf36d0fcfee more cleanup.
casties
parents: 501
diff changeset
42 title="Original page number" tal:define="originalPage pageinfo/pageNumberOrig | nothing"
daf36d0fcfee more cleanup.
casties
parents: 501
diff changeset
43 tal:condition="python:originalPage!=None"> (<span tal:replace="originalPage" /><span
daf36d0fcfee more cleanup.
casties
parents: 501
diff changeset
44 tal:define="originalPageNorm pageinfo/pageNumberOrigNorm | nothing" tal:condition="python:originalPageNorm!=None"> [<span
501
29c6d09a506c more cleanup.
casties
parents:
diff changeset
45 tal:replace="originalPageNorm" />]
29c6d09a506c more cleanup.
casties
parents:
diff changeset
46 </span>)
502
daf36d0fcfee more cleanup.
casties
parents: 501
diff changeset
47 </span> <input type="submit" value="Go" /> of <span tal:replace="numPages" /> <a tal:condition="right"
daf36d0fcfee more cleanup.
casties
parents: 501
diff changeset
48 tal:attributes="href python:here.getLink('pn',right)">&gt;</a> <span tal:condition="not:right">&gt;</span> <a
daf36d0fcfee more cleanup.
casties
parents: 501
diff changeset
49 tal:condition="rightest" tal:attributes="href python:here.getLink('pn',rightest)">&gt;|</a> <span
501
29c6d09a506c more cleanup.
casties
parents:
diff changeset
50 tal:condition="not:rightest">&gt;|</span>
29c6d09a506c more cleanup.
casties
parents:
diff changeset
51 </form>
29c6d09a506c more cleanup.
casties
parents:
diff changeset
52 </metal:block>
29c6d09a506c more cleanup.
casties
parents:
diff changeset
53 <!-- /ruler -->
29c6d09a506c more cleanup.
casties
parents:
diff changeset
54
29c6d09a506c more cleanup.
casties
parents:
diff changeset
55 <!-- toc ruler with previous/next toc page buttons -->
29c6d09a506c more cleanup.
casties
parents:
diff changeset
56 <metal:block metal:define-macro="toc_ruler">
511
551ca1641a5e more cleanup.
casties
parents: 505
diff changeset
57 <form class="autosubmit" tal:attributes="action viewerUrl" tal:define="startParam startParam | string:start">
551ca1641a5e more cleanup.
casties
parents: 505
diff changeset
58 <input type="hidden" tal:define="params python:here.getParams(startParam, None)" tal:repeat="param params"
502
daf36d0fcfee more cleanup.
casties
parents: 501
diff changeset
59 tal:attributes="name param; value python:params[param]" /> <a tal:condition="batch/prevStart"
511
551ca1641a5e more cleanup.
casties
parents: 505
diff changeset
60 tal:attributes="href python:here.getLink(startParam,batch['prevStart'])">&lt;</a> <span tal:condition="not:batch/prevStart">&lt;</span>
551ca1641a5e more cleanup.
casties
parents: 505
diff changeset
61 <select class="autosubmit" tal:attributes="name startParam">
502
daf36d0fcfee more cleanup.
casties
parents: 501
diff changeset
62 <option tal:repeat="grp batch/batches" tal:attributes="selected python:(start==grp['start']); value grp/start"
501
29c6d09a506c more cleanup.
casties
parents:
diff changeset
63 tal:content="string:${grp/start} - ${grp/end}" />
502
daf36d0fcfee more cleanup.
casties
parents: 501
diff changeset
64 </select> <input type="submit" value="Go" /> <a tal:condition="batch/nextStart"
511
551ca1641a5e more cleanup.
casties
parents: 505
diff changeset
65 tal:attributes="href python:here.getLink(startParam,batch['nextStart'])">&gt;</a> <span tal:condition="not:batch/nextStart">&gt;</span>
501
29c6d09a506c more cleanup.
casties
parents:
diff changeset
66 </form>
29c6d09a506c more cleanup.
casties
parents:
diff changeset
67 </metal:block>
29c6d09a506c more cleanup.
casties
parents:
diff changeset
68
526
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
69 <!-- toc type switcher -->
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
70 <metal:block metal:define-macro="toc_switcher">
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
71 <ul class="switcher">
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
72 <li tal:attributes="class python:test(tocMode=='thumbs', 'sel', None)"><a
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
73 tal:attributes="href python:here.getLink('tocMode','thumbs')">Thumbnails</a>
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
74 </li>
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
75 <li tal:attributes="class python:test(tocMode=='text', 'sel', None)"
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
76 tal:condition="python:docpath and docinfo.get('numTocEntries', None)">
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
77 <a tal:attributes="href python:here.getLink('tocMode','text')">Content</a>
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
78 </li>
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
79 <li tal:attributes="class python:test(tocMode=='figures', 'sel', None)"
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
80 tal:condition="python:docpath and docinfo.get('numFigureEntries', None)">
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
81 <a
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
82 tal:attributes="href python:here.getLink('tocMode','figures')">Figures</a>
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
83 </li>
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
84 <li tal:attributes="class python:test(tocMode=='concordance', 'sel', None)"
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
85 tal:condition="python:docpath and docinfo.get('pageNumbers', None)">
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
86 <a
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
87 tal:attributes="href python:here.getLink('tocMode','concordance')">Concordance</a>
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
88 </li>
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
89 <li tal:attributes="class python:test(tocMode=='none', 'sel', None)"><a
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
90 tal:attributes="href python:here.getLink('tocMode','none')">None</a>
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
91 </li>
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
92 </ul>
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
93 </metal:block>
3f375a048402 moved search and dict into separate layers.
casties
parents: 511
diff changeset
94
501
29c6d09a506c more cleanup.
casties
parents:
diff changeset
95 </body>
29c6d09a506c more cleanup.
casties
parents:
diff changeset
96 </html>