source: documentViewer/zpt/common_template.zpt @ 530:5c7433c2515c

Last change on this file since 530:5c7433c2515c was 528:f8a5f63eafc0, checked in by casties, 12 years ago

new viewMode=thumbs.

File size: 7.0 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6</head>
7<body>
8  <!-- block used for page header content area -->
9  <metal:block metal:define-macro="head"
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);">
14    <div tal:condition="not:formattedLabel">
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      </tal:block>
19      <span tal:condition="not:python:docinfo['creator'] or docinfo['title']"
20        tal:content="string:[no bibliographical information for this document (type ${bibType})]" />
21    </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>
28    </div>
29  </metal:block>
30  <!-- /head -->
31
32  <!-- page ruler with previous/next page buttons -->
33  <metal:block metal:define-macro="page_ruler"
34    tal:define="
35              prev python:test(pn>1,pn-1,None); next python:test(pn<numPages,pn+1,None);
36              first python:test(pn>1,1,None); last python:test(pn<numPages,numPages,None);
37              left python:test(flowLtr,prev,next); right python:test(flowLtr,next,prev);
38              leftest python:test(flowLtr,first,last); rightest python:test(flowLtr,last,first);">
39    <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)">|&lt;</a> <span
44        tal:condition="not:leftest">|&lt;</span> <a tal:condition="left"
45        tal:attributes="href python:here.getLink('pn',left)">&lt;</a> <span
46        tal:condition="not:left">&lt;</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)">&gt;</a>
58      <span tal:condition="not:right">&gt;</span> <a tal:condition="rightest"
59        tal:attributes="href python:here.getLink('pn',rightest)">&gt;|</a> <span
60        tal:condition="not:rightest">&gt;|</span>
61    </form>
62  </metal:block>
63  <!-- /ruler -->
64
65  <!-- toc ruler (using getBatch) with previous/next toc page buttons -->
66  <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'])">&lt;</a>
73      <span tal:condition="not:batch/prevStart">&lt;</span>
74      <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"
77          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'])">&gt;</a>
81      <span tal:condition="not:batch/nextStart">&gt;</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)">&lt;</a>
91      <span tal:condition="not:left">&lt;</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)">&gt;</a> <span
102        tal:condition="not:right">&gt;</span>
103    </form>
104  </metal:block>
105
106  <!-- toc type switcher -->
107  <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>
128  </metal:block>
129
130</body>
131</html>
Note: See TracBrowser for help on using the repository browser.