source: documentViewer/zpt/common_template.zpt @ 526:3f375a048402

Last change on this file since 526:3f375a048402 was 526:3f375a048402, checked in by casties, 12 years ago

moved search and dict into separate layers.
removed search_template.
added tocMode=concordance.
fixed bug with paging tocs.

File size: 5.6 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="docpath docinfo/textURLPath | nothing;
11               query here/REQUEST/query | nothing;
12               queryType here/REQUEST/queryType | nothing;
13               bib docinfo/bib | nothing; bibType docinfo/bibType | nothing;
14               formattedLabel python:here.metadataService.getBibFormattedLabel(bibdata=bib);">
15    <div tal:condition="not:formattedLabel">
16      <tal:block tal:condition="python:docinfo['creator'] or docinfo['title']"><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:attributes="href python:here.getLink('viewMode','index')">Bibliographical information</a>
25    </div>
26  </metal:block>
27  <!-- /head -->
28
29  <!-- page ruler with previous/next page buttons -->
30  <metal:block metal:define-macro="page_ruler"
31    tal:define="
32              prev python:test(pn>1,pn-1,None); next python:test(pn<numPages,pn+1,None);
33              first python:test(pn>1,1,None); last python:test(pn<numPages,numPages,None);
34              left python:test(flowLtr,prev,next); right python:test(flowLtr,next,prev);
35              leftest python:test(flowLtr,first,last); rightest python:test(flowLtr,last,first);">
36    <form class="autosubmit" tal:attributes="action viewerUrl">
37      <input type="hidden" tal:define="params python:here.getParams('pn', None)" tal:repeat="param params"
38        tal:attributes="name param; value python:params[param]" /> page <a tal:condition="leftest"
39        tal:attributes="href python:here.getLink('pn',leftest)">|&lt;</a> <span tal:condition="not:leftest">|&lt;</span> <a
40        tal:condition="left" tal:attributes="href python:here.getLink('pn',left)">&lt;</a> <span tal:condition="not:left">&lt;</span>
41      <input class="autosubmit" size="3" type="text" name="pn" tal:attributes="value pn" /> <span class="originalPage"
42        title="Original page number" tal:define="originalPage pageinfo/pageNumberOrig | nothing"
43        tal:condition="python:originalPage!=None"> (<span tal:replace="originalPage" /><span
44        tal:define="originalPageNorm pageinfo/pageNumberOrigNorm | nothing" tal:condition="python:originalPageNorm!=None"> [<span
45          tal:replace="originalPageNorm" />]
46      </span>)
47      </span> <input type="submit" value="Go" /> of <span tal:replace="numPages" /> <a tal:condition="right"
48        tal:attributes="href python:here.getLink('pn',right)">&gt;</a> <span tal:condition="not:right">&gt;</span> <a
49        tal:condition="rightest" tal:attributes="href python:here.getLink('pn',rightest)">&gt;|</a> <span
50        tal:condition="not:rightest">&gt;|</span>
51    </form>
52  </metal:block>
53  <!-- /ruler -->
54
55  <!-- toc ruler with previous/next toc page buttons -->
56  <metal:block metal:define-macro="toc_ruler">
57    <form class="autosubmit" tal:attributes="action viewerUrl" tal:define="startParam startParam | string:start">
58      <input type="hidden" tal:define="params python:here.getParams(startParam, None)" tal:repeat="param params"
59        tal:attributes="name param; value python:params[param]" /> <a tal:condition="batch/prevStart"
60        tal:attributes="href python:here.getLink(startParam,batch['prevStart'])">&lt;</a> <span tal:condition="not:batch/prevStart">&lt;</span>
61      <select class="autosubmit" tal:attributes="name startParam">
62        <option tal:repeat="grp batch/batches" tal:attributes="selected python:(start==grp['start']); value grp/start"
63          tal:content="string:${grp/start} - ${grp/end}" />
64      </select> <input type="submit" value="Go" /> <a tal:condition="batch/nextStart"
65        tal:attributes="href python:here.getLink(startParam,batch['nextStart'])">&gt;</a> <span tal:condition="not:batch/nextStart">&gt;</span>
66    </form>
67  </metal:block>
68
69  <!-- toc type switcher -->
70  <metal:block metal:define-macro="toc_switcher">
71    <ul class="switcher">
72      <li tal:attributes="class python:test(tocMode=='thumbs', 'sel', None)"><a
73        tal:attributes="href python:here.getLink('tocMode','thumbs')">Thumbnails</a>
74      </li>
75      <li tal:attributes="class python:test(tocMode=='text', 'sel', None)"
76        tal:condition="python:docpath and docinfo.get('numTocEntries', None)">
77        <a tal:attributes="href python:here.getLink('tocMode','text')">Content</a>
78      </li>
79      <li tal:attributes="class python:test(tocMode=='figures', 'sel', None)"
80        tal:condition="python:docpath and docinfo.get('numFigureEntries', None)">
81        <a
82        tal:attributes="href python:here.getLink('tocMode','figures')">Figures</a>
83      </li>
84      <li tal:attributes="class python:test(tocMode=='concordance', 'sel', None)"
85        tal:condition="python:docpath and docinfo.get('pageNumbers', None)">
86        <a
87        tal:attributes="href python:here.getLink('tocMode','concordance')">Concordance</a>
88      </li>
89      <li tal:attributes="class python:test(tocMode=='none', 'sel', None)"><a
90        tal:attributes="href python:here.getLink('tocMode','none')">None</a>
91      </li>
92    </ul>
93  </metal:block>
94
95</body>
96</html>
Note: See TracBrowser for help on using the repository browser.