source: documentViewer/zpt/viewer_index.zpt @ 561:9255acc4518d

Last change on this file since 561:9255acc4518d was 560:04c330b92cab, checked in by casties, 12 years ago

uses escidoc-dri (instead of -test). updated default license display for access!=free.

File size: 9.7 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 string:${docinfo/imageURL}&pn=$tp&dw=300&dh=500" /><img
49        tal:condition="python:not tp 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>
122              <td class="type">License:</td>
123              <td tal:condition="python:docinfo.get('accessType', None) == '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:docinfo.get('accessType', None) != 'free'" class="content">Internal use only, please contact <a href="mailto:library@mpiwg-berlin.mpg.de">library@mpiwg-berlin.mpg.de</a>
126                (unless stated otherwise)</td>
127            </tr>
128          </table>
129        </tal:block>
130      </div>
131    </div> <!-- /main content column -->
132   
133    <div class="col buttons">
134      <!-- option block column -->
135      <div class="options">
136        <h4>Browse</h4>
137        <ul class="list">
138          <li><a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">View full document</a></li>
139        </ul>
140      </div>
141
142      <div class="options" tal:condition="docpath">
143        <h4>Download</h4>
144        Download full document
145        <ul class="list">
146          <li><a target="_blank" rel="nofollow" class="download"
147            tal:attributes="href python:here.getTextDownloadUrl(type='html',docinfo=docinfo)"
148            target="_blank">as HTML</a></li>
149          <li><a target="_blank" rel="nofollow" class="download"
150            tal:attributes="href python:here.getTextDownloadUrl(type='xml',docinfo=docinfo)" target="_blank">as
151              XML</a></li>
152        </ul>
153        (copyright and license see below)
154      </div>
155
156      <div class="options" tal:condition="docpath">
157        <h4>Search</h4>
158        <form tal:define="queryType string:fulltextMorph" tal:condition="docpath" tal:attributes="action viewerUrl">
159          <input type="hidden"
160            tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewMode':None,'viewLayer':'search'})"
161            tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
162          <!-- query text -->
163          <input type="text" name="query" tal:attributes="value query" /> <br /> <input type="submit" value="Search" /> <a
164            tal:condition="query" tal:attributes="href python:here.getLink('query',None)">Clear</a>
165          <ul>
166            <li><input type="radio" name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" />
167              Exact</li>
168            <li><input type="radio" name="queryType" value="fulltextMorph"
169              tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms</li>
170            <li><input type="radio" name="queryType" value="ftIndex" tal:attributes="checked python:queryType=='ftIndex'" />
171              Fulltext index</li>
172            <li><input type="radio" name="queryType" value="ftIndexMorph"
173              tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological index</li>
174          </ul>
175        </form>
176      </div>
177
178      <div class="options" tal:condition="availableLayers">
179        <h4>Metadata</h4>
180        <form tal:attributes="action viewerUrl" class="autosubmit">
181          <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})"
182            tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
183          <ul>
184            <!-- text layer select buttons (rendered always) -->
185            <tal:block tal:repeat="layer availableLayers">
186              <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/layer_select_li"
187                tal:condition="python:exists(mpath)">
188                <li metal:use-macro="python:path(mpath)" />
189              </tal:block>
190            </tal:block>
191          </ul>
192          <input type="submit" value="Go!" />
193        </form>
194      </div>
195    </div> <!-- /option block column -->     
196  </div>
197  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
198    <!-- footer -->
199    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" />
200  </tal:block>
201
202</body>
203<body tal:condition="not:numPages">
204  <div class="errortext">Sorry, document doesn't exist.</div>
205  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
206    <!-- footer -->
207    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" />
208  </tal:block>
209</body>
210</html>
Note: See TracBrowser for help on using the repository browser.