source: documentViewer/zpt/common_template.zpt @ 534:9009cf0b0532

Last change on this file since 534:9009cf0b0532 was 534:9009cf0b0532, checked in by casties, 12 years ago

small fixes.

File size: 8.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 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">
19      <tal:block tal:condition="python:docinfo['creator'] or docinfo['title']">
20        <i tal:content="docinfo/creator" />,
21        <span tal:content="docinfo/title" />, <span tal:content="docinfo/date" />
22      </tal:block>
23      <span tal:condition="not:python:docinfo['creator'] or docinfo['title']"
24        tal:content="string:[no bibliographical information for this document (type ${bibType})]" />
25    </div>
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>
39    </div>
40  </metal:block>
41  <!-- /head -->
42
43
44  <!-- page ruler with previous/next page buttons -->
45  <metal:block metal:define-macro="page_ruler"
46    tal:define="
47              prev python:test(pn>1,pn-1,None); next python:test(pn<numPages,pn+1,None);
48              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              leftest python:test(flowLtr,first,last); rightest python:test(flowLtr,last,first);">
51    <form class="autosubmit" tal:attributes="action viewerUrl">
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)">|&lt;</a> <span tal:condition="not:leftest">|&lt;</span> <a
56        tal:condition="left" tal:attributes="href python:here.getLink('pn',left)">&lt;</a> <span tal:condition="not:left">&lt;</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" />]</span>)
62        </span> <input type="submit" value="Go" /> of <span tal:replace="numPages" /> <a tal:condition="right"
63        tal:attributes="href python:here.getLink('pn',right)">&gt;</a> <span tal:condition="not:right">&gt;</span> <a
64        tal:condition="rightest" tal:attributes="href python:here.getLink('pn',rightest)">&gt;|</a> <span
65        tal:condition="not:rightest">&gt;|</span>
66      </span> <!-- ruler-main -->
67    </form>
68  </metal:block>
69  <!-- /ruler -->
70
71  <!-- toc ruler (using getBatch) with previous/next toc page buttons -->
72  <metal:block metal:define-macro="toc_ruler">
73    <form class="autosubmit" tal:attributes="action viewerUrl" tal:define="startParam startParam | string:start">
74      <input type="hidden" tal:define="params python:here.getParams(startParam, None)" tal:repeat="param params"
75        tal:attributes="name param; value python:params[param]" /> <a tal:condition="batch/prevStart"
76        tal:attributes="href python:here.getLink(startParam,batch['prevStart'])">&lt;</a> <span tal:condition="not:batch/prevStart">&lt;</span>
77      <select class="autosubmit" tal:attributes="name startParam">
78        <option tal:repeat="grp batch/batches" tal:attributes="selected python:(start==grp['start']); value grp/start"
79          tal:content="string:${grp/start} - ${grp/end}" />
80      </select> <input type="submit" value="Go" /> <a tal:condition="batch/nextStart"
81        tal:attributes="href python:here.getLink(startParam,batch['nextStart'])">&gt;</a> <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)" tal:repeat="param params"
89        tal:attributes="name param; value python:params[param]" /> <a tal:condition="left"
90        tal:attributes="href python:here.getLink('start',left)">&lt;</a> <span tal:condition="not:left">&lt;</span> <select
91        class="autosubmit" name="start" tal:define="ofs python:test(pageinfo['pageZero'],0,1)">
92        <tal:block>
93          <option tal:repeat="grp pageBatch/batches" tal:attributes="selected python:start==grp['start']; value grp/start;"
94            tal:content="string:${grp/start} - ${grp/end}" />
95        </tal:block>
96      </select> <input type="submit" value="Go" /> <a tal:condition="right" tal:attributes="href python:here.getLink('start',right)">&gt;</a>
97      <span tal:condition="not:right">&gt;</span>
98    </form>
99  </metal:block>
100
101  <!-- toc type switcher -->
102  <metal:block metal:define-macro="toc_switcher">
103    <div class="toc-switcher">
104      <ul>
105        <li tal:attributes="class python:here.getStyle(tocMode, 'none')"><span><a tal:omit-tag="python:tocMode=='none'"
106            tal:attributes="href python:here.getLink('tocMode','none')">None</a></span></li>
107        <li tal:attributes="class python:here.getStyle(tocMode, 'concordance')"
108          tal:condition="python:docpath and docinfo.get('pageNumbers', None)"><span><a
109            tal:omit-tag="python:tocMode=='concordance'" tal:attributes="href python:here.getLink('tocMode','concordance')">Concordance</a></span></li>
110        <li tal:attributes="class python:here.getStyle(tocMode, 'figures')"
111          tal:condition="python:docpath and docinfo.get('numFigureEntries', None)"><span><a
112            tal:omit-tag="python:tocMode=='figures'" tal:attributes="href python:here.getLink('tocMode','figures')">Figures</a></span></li>
113        <li tal:attributes="class python:here.getStyle(tocMode, 'text')"
114          tal:condition="python:docpath and docinfo.get('numTocEntries', None)"><span><a
115            tal:omit-tag="python:tocMode=='text'" tal:attributes="href python:here.getLink('tocMode','text')">Content</a></span></li>
116        <li tal:attributes="class python:here.getStyle(tocMode, 'thumbs')"><span><a
117            tal:omit-tag="python:tocMode=='thumbs'" tal:attributes="href python:here.getLink('tocMode','thumbs')">Thumbnails</a></span></li>
118      </ul>
119    </div>
120  </metal:block>
121
122</body>
123</html>
Note: See TracBrowser for help on using the repository browser.