source: documentViewer/zpt/viewer_index.zpt @ 519:9a3cc3732194

elementtree
Last change on this file since 519:9a3cc3732194 was 505:29f2172db368, checked in by casties, 13 years ago

title also for non-bib-tag.

File size: 4.2 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                  docpath docinfo/textURLPath | nothing;
7                  query nothing;
8                  numPages docinfo/numPages | nothing;">
9<head>
10<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
11<title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" />
12<link rel="stylesheet" href="template/docuviewer_css" type="text/css" />
13</head>
14<body tal:condition="numPages">
15  <h1>Document information</h1>
16
17  <div class="index-image">
18    <!-- image -->
19    <a tal:define="tp docinfo/titlePage | nothing"
20      tal:attributes="href python:context.getLink('viewMode','auto')"><img
21      tal:condition="tp" border="0"
22      tal:attributes="src string:${docinfo/imageURL}&pn=$tp&dw=300&dh=500" /><img
23      tal:condition="not:tp" border="0" src="images/oldbook.png" /></a>
24  </div>
25
26  <div class="index-info">
27    <table border="0"
28      tal:define="formattedData python:here.metadata.getBibFormattedMetaDataExtended(bibdata=docinfo.get('bib', None))">
29      <tal:x condition="python:formattedData">
30        <!-- wenn es bibinfo in docinfo gibt -->
31        <tr tal:replace="structure python:formattedData" />
32      </tal:x>
33
34      <tal:x condition="not:formattedData">
35        <!-- kein template fuer die daten -->
36        <tal:x condition="exists:docinfo/bib">
37          <tr tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo">
38            <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'" />
39            <td class="content" tal:content="bibinfo/bib" />
40          </tr>
41        </tal:x>
42
43        <tal:y condition="not:exists:docinfo/bib">
44          <!-- wenn es kein bibinfo gibt (archimedes-texte) -->
45          <tr>
46            <td class="type">Author:</td>
47            <td class="content" tal:content="docinfo/creator" />
48          </tr>
49          <tr>
50            <td class="type">Title:</td>
51            <td class="content" tal:content="docinfo/title" />
52          </tr>
53          <tr>
54            <td class="type">Date:</td>
55            <td class="content" tal:content="docinfo/date" />
56          </tr>
57        </tal:y>
58      </tal:x>
59      <!-- ende kein template fuer die daten -->
60    </table>
61
62    <table border="0">
63      <!-- attribution -->
64      <tr tal:condition="exists:docinfo/attribution"
65        tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=docinfo['attribution'])" />
66      <!-- copyright -->
67      <tr tal:condition="exists:docinfo/copyright"
68        tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=docinfo['copyright'])" />
69    </table>
70  </div>
71
72  <div>
73    <div>
74      <a class="openbutton"
75        tal:attributes="href python:context.getLink('viewMode','auto')">Access Book</a>
76    </div>
77    <div tal:condition="docpath">
78      Download as <a
79        tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath.replace('.xml','.html'))"
80        target="_blank">html</a> / <a
81        tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)"
82        target="_blank">xml</a>
83    </div>
84    <div>
85      <!--BEGIN search -->
86      <form tal:condition="docpath" tal:attributes="action python:here.getLink()">
87        <input type="hidden" tal:define="params python:here.getParams('viewMode', None)"
88          tal:repeat="param params"
89          tal:attributes="name param; value python:params[param]" /> <input
90          class="textMain" name="query" onfocus="this.select();" type="text"
91          tal:attributes="value query" /> <input type="submit" class="buttonMain"
92          value="Search in Book" />
93      </form>
94      <!-- END search-->
95    </div>
96  </div>
97  <!-- DEBUG -->
98  <!-- <p tal:content="python:repr(docinfo)" /> -->
99</body>
100<body tal:condition="not:numPages">
101  <div class="errortext">Sorry, document doesn't exist.</div>
102</body>
103</html>
Note: See TracBrowser for help on using the repository browser.