source: documentViewer/zpt/viewer/viewer_index.zpt @ 605:530a9a024450

Last change on this file since 605:530a9a024450 was 605:530a9a024450, checked in by casties, 11 years ago

fixed bug when mapping doesn't exist.

File size: 10.3 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  tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode;
5                  tocMode pageinfo/tocMode; viewerUrl docinfo/viewerUrl;
6                  viewLayer pageinfo/viewLayer; viewLayers pageinfo/viewLayers;
7                  availableLayers python:here.getAvailableLayers().get('index', None);
8                  docpath docinfo/textURLPath | nothing;
9                  query nothing;
10                  numPages docinfo/numPages | nothing;
11                  global formattedData python:here.metadata.getBibFormattedMetaData(bibdata=docinfo.get('bib', None));">
12<head>
13<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
14<title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" />
15<link rel="stylesheet" tal:attributes="href string:$viewerUrl/template/docuviewer_css" type="text/css" />
16<script type="text/javascript" tal:attributes="src string:$viewerUrl/template/jquery_js"></script>
17<script type="text/javascript">
18        $(document).ready(function() {
19                // autosubmit forms
20                $('form.autosubmit').find('.autosubmit').change(function() {
21                        this.form.submit();
22                });
23                $('form.autosubmit input[type="submit"]').hide();
24        });
25// -->
26</script>
27<!--  layer headers (all available) -->
28<tal:block tal:repeat="layer availableLayers">
29  <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/html_head" tal:condition="python:exists(mpath)">
30    <metal:block metal:use-macro="python:path(mpath)" />
31  </tal:block>
32</tal:block>
33</head>
34<body tal:condition="numPages">
35  <!-- header -->
36  <div class="page-head">
37    <metal:block metal:use-macro="here/template/common_template/macros/head" />
38  </div>
39
40  <!-- main -->
41  <div class="page-body">
42
43    <div class="col index-image">
44      <!-- image -->
45      <a tal:define="tp docinfo/titlePage | string:1"
46        tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="python:docinfo.get('imageURL',None) and tp" border="0"
47        tal:attributes="src python:'%s&pn=%s&dw=300&dh=500'%(docinfo.get('imageURL',None),tp)" /><img
48        tal:condition="python:(not docinfo.get('imageURL',None)) and exists('here/template/book.png')" border="0"
49        src="template/book.png" /></a>
50    </div>
51
52    <div class="col main">
53      <!-- main content column -->
54      <div class="index-info">
55        <h2>Bibliographic information</h2>
56        <table border="0">
57          <tal:x condition="python:formattedData">
58            <!-- wenn es bibinfo in docinfo gibt -->
59            <tr tal:replace="structure python:formattedData" />
60          </tal:x>
61
62          <tal:x condition="not:formattedData">
63            <!-- kein template fuer die daten -->
64            <tal:block condition="exists:docinfo/bib">
65              <tal:block tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo">
66                <tr tal:condition="python:bib[0]!='@'">
67                  <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'" />
68                  <td class="content" tal:content="python:bibinfo[bib]" />
69                </tr>
70              </tal:block>
71            </tal:block>
72
73            <tal:y condition="not:exists:docinfo/bib">
74              <!-- wenn es kein bibinfo gibt (archimedes-texte) -->
75              <tr>
76                <td class="type">Author:</td>
77                <td class="content" tal:content="docinfo/creator" />
78              </tr>
79              <tr>
80                <td class="type">Title:</td>
81                <td class="content" tal:content="docinfo/title" />
82              </tr>
83              <tr>
84                <td class="type">Date:</td>
85                <td class="content" tal:content="docinfo/date" />
86              </tr>
87            </tal:y>
88          </tal:x>
89          <!-- ende kein template fuer die daten -->
90        </table>
91
92        <tal:block tal:define="dri docinfo/DRI | nothing" tal:condition="dri">
93          <h2>Permanent URL</h2>
94          <table>
95            <tr>
96              <td class="type">Document ID:</td>
97              <td class="content" tal:content="dri" />
98            </tr>
99            <tr>
100              <td class="type">Permanent URL:</td>
101              <td class="content"><a target="_blank" tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri"
102                tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td>
103            </tr>
104          </table>
105        </tal:block>
106
107        <tal:block tal:define="ctxs docinfo/presentationContext | nothing" tal:condition="ctxs">
108          <h2>Presentation context</h2>
109          <ul>
110            <li tal:repeat="ctx ctxs"><a tal:define="link ctx/link | nothing; name ctx/name | link;" tal:content="name"
111              tal:attributes="href link" target="_blank" tal:omit-tag="not:link" /></li>
112          </ul>
113        </tal:block>
114
115        <tal:block tal:define="attribution docinfo/attribution | nothing; copyright docinfo/copyright | nothing">
116          <h2>Copyright information</h2>
117          <table border="0" tal:condition="attribution | copyright">
118            <!-- attribution -->
119            <tr tal:condition="attribution"
120              tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=attribution)" />
121            <!-- copyright -->
122            <tr tal:condition="copyright"
123              tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=copyright)" />
124          </table>
125          <table border="0" tal:condition="not:attribution | copyright">
126            <tr>
127              <td class="type">Copyright:</td>
128              <td class="content"><a target="_blank" href="http://www.mpiwg-berlin.mpg.de">Max Planck Institute for the
129                  History of Science</a> (unless stated otherwise)</td>
130            </tr>
131            <tr tal:define="accType python:docinfo.get('accessType', None)">
132              <td class="type">License:</td>
133              <td tal:condition="python:accType == 'free'" class="content"><a target="_blank"
134                href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a> (unless stated otherwise)</td>
135              <td tal:condition="python:accType != 'free'" class="content">Internal use only<span tal:condition="accType"
136                tal:content="string: ($accType)" />, please contact <a href="mailto:library@mpiwg-berlin.mpg.de">library@mpiwg-berlin.mpg.de</a>
137                (unless stated otherwise)
138              </td>
139            </tr>
140          </table>
141        </tal:block>
142      </div>
143    </div>
144    <!-- /main content column -->
145
146    <div class="col buttons">
147      <!-- option block column -->
148      <div class="options">
149        <h4>Browse</h4>
150        <ul class="list">
151          <li><a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">View full document</a></li>
152        </ul>
153      </div>
154
155      <div class="options" tal:condition="docpath">
156        <h4>Download</h4>
157        Download full document
158        <ul class="list">
159          <li><a target="_blank" rel="nofollow" class="download"
160            tal:attributes="href python:here.getTextDownloadUrl(type='html',docinfo=docinfo)" target="_blank">as HTML</a></li>
161          <li><a target="_blank" rel="nofollow" class="download"
162            tal:attributes="href python:here.getTextDownloadUrl(type='xml',docinfo=docinfo)" target="_blank">as XML</a></li>
163        </ul>
164        (copyright and license see below)
165      </div>
166
167      <div class="options" tal:condition="docpath">
168        <h4>Search</h4>
169        <form tal:define="queryType string:fulltextMorph" tal:condition="docpath" tal:attributes="action viewerUrl">
170          <input type="hidden"
171            tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewMode':None,'viewLayer':'search'})"
172            tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
173          <!-- query text -->
174          <input type="text" name="query" tal:attributes="value query" /> <br /> <input type="submit" value="Search" /> <a
175            tal:condition="query" tal:attributes="href python:here.getLink('query',None)">Clear</a>
176          <ul>
177            <li><input type="radio" name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" />
178              Exact</li>
179            <li><input type="radio" name="queryType" value="fulltextMorph"
180              tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms</li>
181            <li><input type="radio" name="queryType" value="ftIndex" tal:attributes="checked python:queryType=='ftIndex'" />
182              Fulltext index</li>
183            <li><input type="radio" name="queryType" value="ftIndexMorph"
184              tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological index</li>
185          </ul>
186        </form>
187      </div>
188
189      <div class="options" tal:condition="availableLayers">
190        <h4>Metadata</h4>
191        <form tal:attributes="action viewerUrl" class="autosubmit">
192          <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})" tal:repeat="param params"
193            tal:attributes="name param; value python:params[param]" />
194          <ul>
195            <!-- text layer select buttons (rendered always) -->
196            <tal:block tal:repeat="layer availableLayers">
197              <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/layer_select_li"
198                tal:condition="python:exists(mpath)">
199                <li metal:use-macro="python:path(mpath)" />
200              </tal:block>
201            </tal:block>
202          </ul>
203          <input type="submit" value="Go!" />
204        </form>
205      </div>
206    </div>
207    <!-- /option block column -->
208  </div>
209  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
210    <!-- footer -->
211    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" />
212  </tal:block>
213
214</body>
215<body tal:condition="not:numPages">
216  <div class="errortext">Sorry, document doesn't exist.</div>
217  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
218    <!-- footer -->
219    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" />
220  </tal:block>
221</body>
222</html>
Note: See TracBrowser for help on using the repository browser.