source: documentViewer/zpt/viewer_index.zpt @ 558:6ab436383fca

Last change on this file since 558:6ab436383fca was 558:6ab436383fca, checked in by casties, 12 years ago

first step to layers for index view.

File size: 8.9 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<head>
12<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
13<title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" />
14<link rel="stylesheet" href="template/docuviewer_css" type="text/css" />
15<!--  layer headers (rendered always) -->
16<tal:block tal:repeat="layer availableLayers">
17  <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/html_head" tal:condition="python:exists(mpath)">
18    <metal:block metal:use-macro="python:path(mpath)" />
19  </tal:block>
20</tal:block>
21</head>
22<body tal:condition="numPages">
23  <!-- header -->
24  <div class="page-head">
25    <metal:block metal:use-macro="here/template/common_template/macros/head" />
26  </div>
27
28  <!-- main -->
29  <div class="page-body">
30
31    <div class="col index-image">
32      <!-- image -->
33      <a tal:define="tp docinfo/titlePage | string:1"
34        tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="tp" border="0"
35        tal:attributes="src string:${docinfo/imageURL}&pn=$tp&dw=300&dh=500" /><img
36        tal:condition="python:not tp and exists('here/template/book.png')" border="0" src="template/book.png" /></a>
37    </div>
38
39    <div class="col main">
40      <div class="index-info">
41        <h2>Bibliographic information</h2>
42        <table border="0"
43          tal:define="formattedData python:here.metadata.getBibFormattedMetaDataExtended(bibdata=docinfo.get('bib', None),bibxdata=docinfo.get('bibx', None))">
44          <tal:x condition="python:formattedData">
45            <!-- wenn es bibinfo in docinfo gibt -->
46            <tr tal:replace="structure python:formattedData" />
47          </tal:x>
48
49          <tal:x condition="not:formattedData">
50            <!-- kein template fuer die daten -->
51            <tal:x condition="exists:docinfo/bib">
52              <tr tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo">
53                <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'" />
54                <td class="content" tal:content="bibinfo/bib" />
55              </tr>
56            </tal:x>
57
58            <tal:y condition="not:exists:docinfo/bib">
59              <!-- wenn es kein bibinfo gibt (archimedes-texte) -->
60              <tr>
61                <td class="type">Author:</td>
62                <td class="content" tal:content="docinfo/creator" />
63              </tr>
64              <tr>
65                <td class="type">Title:</td>
66                <td class="content" tal:content="docinfo/title" />
67              </tr>
68              <tr>
69                <td class="type">Date:</td>
70                <td class="content" tal:content="docinfo/date" />
71              </tr>
72            </tal:y>
73          </tal:x>
74          <!-- ende kein template fuer die daten -->
75        </table>
76
77        <tal:block tal:define="dri docinfo/DRI | nothing" tal:condition="dri">
78          <h2>Permanent URL</h2>
79          <table>
80            <tr>
81              <td class="type">Document ID:</td>
82              <td class="content" tal:content="dri" />
83            </tr>
84            <tr>
85              <td class="type">Permanent URL:</td>
86              <td class="content"><a target="_blank" tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri"
87                tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td>
88            </tr>
89          </table>
90        </tal:block>
91
92        <tal:block tal:define="attribution docinfo/attribution | nothing; copyright docinfo/copyright | nothing">
93          <h2>Copyright information</h2>
94          <table border="0" tal:condition="attribution | copyright">
95            <!-- attribution -->
96            <tr tal:condition="attribution"
97              tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=attribution)" />
98            <!-- copyright -->
99            <tr tal:condition="copyright"
100              tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=copyright)" />
101          </table>
102          <table border="0" tal:condition="not:attribution | copyright">
103            <tr>
104              <td class="type">Copyright:</td>
105              <td class="content"><a target="_blank" href="http://www.mpiwg-berlin.mpg.de">Max Planck Institute for the
106                  History of Science</a> (unless otherwise stated)</td>
107            </tr>
108            <tr>
109              <td class="type">License:</td>
110              <td class="content"><a target="_blank" href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a>
111                (unless otherwise stated)</td>
112            </tr>
113          </table>
114        </tal:block>
115      </div>
116    </div>
117    <div class="col buttons">
118      <div class="options">
119        <h4>Metadata</h4>
120        <form tal:attributes="action viewerUrl" class="autosubmit">
121          <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None,'viewMode':None})"
122            tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
123          <ul>
124            <!-- text layer select buttons (rendered always) -->
125            <tal:block tal:repeat="layer availableLayers">
126              <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/layer_select_li"
127                tal:condition="python:exists(mpath)">
128                <li metal:use-macro="python:path(mpath)" />
129              </tal:block>
130            </tal:block>
131          </ul>
132          <input type="submit" value="Go!" />
133        </form>
134      </div>
135
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"
148            tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath.replace('.xml','.html'))"
149            target="_blank">as HTML</a></li>
150          <li><a target="_blank"
151            tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)" 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      <!-- end search options-->
179    </div>
180  </div>
181  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
182    <!-- footer -->
183    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" />
184  </tal:block>
185
186</body>
187<body tal:condition="not:numPages">
188  <div class="errortext">Sorry, document doesn't exist.</div>
189  <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
190    <!-- footer -->
191    <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" />
192  </tal:block>
193</body>
194</html>
Note: See TracBrowser for help on using the repository browser.