source: documentViewer/zpt/viewer_index.zpt @ 562:60f5a636bc57

Last change on this file since 562:60f5a636bc57 was 562:60f5a636bc57, checked in by casties, 12 years ago

bugfixes for stability.

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