comparison zpt/viewer/viewer_indexonly.zpt @ 594:da7daa783df4

rearranged viewer templates into folder.
author casties
date Fri, 16 Nov 2012 17:16:50 +0100
parents zpt/viewer_indexonly.zpt@011905457a5f
children 37ad612edf5a
comparison
equal deleted inserted replaced
593:eb46138db658 594:da7daa783df4
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 global formattedData python:here.metadata.getBibFormattedMetaData(bibdata=docinfo.get('bib', None));">
10 <head>
11 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
12 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" />
13 <link rel="stylesheet" tal:attributes="href string:$viewerUrl/template/docuviewer_css" type="text/css" />
14 </head>
15 <body tal:condition="numPages">
16 <!-- header -->
17 <div class="page-head">
18 <metal:block metal:use-macro="here/template/common_template/macros/head">
19 <div metal:fill-slot="view-switcher"></div>
20 </metal:block>
21 </div>
22
23 <!-- main -->
24 <div class="page-body">
25
26 <div class="col index-image">
27 <!-- image -->
28 <a tal:define="tp docinfo/titlePage | string:1"
29 tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="tp" border="0"
30 tal:attributes="src python:'%s&pn=%s&dw=300&dh=500'%(docinfo.get('imageURL',None),tp)" /><img
31 tal:condition="python:not docinfo.get('titlePage',None) and exists('here/template/book.png')" border="0"
32 src="template/book.png" /></a>
33 </div>
34
35 <div class="col main">
36 <!-- main content column -->
37 <div class="index-info">
38 <h2>Bibliographic information</h2>
39 <table border="0">
40 <tal:x condition="python:formattedData">
41 <!-- wenn es bibinfo in docinfo gibt -->
42 <tr tal:replace="structure python:formattedData" />
43 </tal:x>
44
45 <tal:x condition="not:formattedData">
46 <!-- kein template fuer die daten -->
47 <tal:x condition="exists:docinfo/bib">
48 <tr tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo">
49 <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'" />
50 <td class="content" tal:content="bibinfo/bib" />
51 </tr>
52 </tal:x>
53
54 <tal:y condition="not:exists:docinfo/bib">
55 <!-- wenn es kein bibinfo gibt (archimedes-texte) -->
56 <tr>
57 <td class="type">Author:</td>
58 <td class="content" tal:content="docinfo/creator" />
59 </tr>
60 <tr>
61 <td class="type">Title:</td>
62 <td class="content" tal:content="docinfo/title" />
63 </tr>
64 <tr>
65 <td class="type">Date:</td>
66 <td class="content" tal:content="docinfo/date" />
67 </tr>
68 </tal:y>
69 </tal:x>
70 <!-- ende kein template fuer die daten -->
71 </table>
72
73 <tal:block tal:define="dri docinfo/DRI | nothing" tal:condition="dri">
74 <h2>Permanent URL</h2>
75 <table>
76 <tr>
77 <td class="type">Document ID:</td>
78 <td class="content" tal:content="dri" />
79 </tr>
80 <tr>
81 <td class="type">Permanent URL:</td>
82 <td class="content"><a target="_blank" tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri"
83 tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td>
84 </tr>
85 </table>
86 </tal:block>
87
88 <tal:block tal:define="ctxs docinfo/presentationContext | nothing" tal:condition="ctxs">
89 <h2>Presentation context</h2>
90 <ul>
91 <li tal:repeat="ctx ctxs"><a tal:define="link ctx/link | nothing; name ctx/name | link;" tal:content="name"
92 tal:attributes="href link" target="_blank" tal:omit-tag="not:link" /></li>
93 </ul>
94 </tal:block>
95
96 <tal:block tal:define="attribution docinfo/attribution | nothing; copyright docinfo/copyright | nothing">
97 <h2>Copyright information</h2>
98 <table border="0" tal:condition="attribution | copyright">
99 <!-- attribution -->
100 <tr tal:condition="attribution"
101 tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=attribution)" />
102 <!-- copyright -->
103 <tr tal:condition="copyright"
104 tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=copyright)" />
105 </table>
106 <table border="0" tal:condition="not:attribution | copyright">
107 <tr>
108 <td class="type">Copyright:</td>
109 <td class="content"><a target="_blank" href="http://www.mpiwg-berlin.mpg.de">Max Planck Institute for the
110 History of Science</a> (unless stated otherwise)</td>
111 </tr>
112 <tr tal:define="accType python:docinfo.get('accessType', None)">
113 <td class="type">License:</td>
114 <td tal:condition="python:accType == 'free'" class="content"><a target="_blank"
115 href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a> (unless stated otherwise)</td>
116 <td tal:condition="python:accType != 'free'" class="content">Internal use only<span tal:condition="accType"
117 tal:content="string: ($accType)" />, please contact <a href="mailto:library@mpiwg-berlin.mpg.de">library@mpiwg-berlin.mpg.de</a>
118 (unless stated otherwise)
119 </td>
120 </tr>
121 </table>
122 </tal:block>
123 </div>
124 </div>
125 <!-- /main content column -->
126 </div>
127
128 </body>
129 <body tal:condition="not:numPages">
130 <div class="errortext">Sorry, document doesn't exist.</div>
131 </body>
132 </html>