Mercurial > hg > documentViewer
annotate zpt/viewer_index.zpt @ 525:70c3ae5eac7c
layers can have their own templates.
first version of annotations layer.
author | casties |
---|---|
date | Thu, 05 Apr 2012 19:29:50 +0200 |
parents | 29f2172db368 |
children | 510bae2b593b |
rev | line source |
---|---|
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
3 <html xmlns="http://www.w3.org/1999/xhtml" |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
4 tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode; |
505 | 5 tocMode pageinfo/tocMode; viewerUrl docinfo/viewerUrl; |
501 | 6 docpath docinfo/textURLPath | nothing; |
7 query nothing; | |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
8 numPages docinfo/numPages | nothing;"> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
9 <head> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
11 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" /> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
12 <link rel="stylesheet" href="template/docuviewer_css" type="text/css" /> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
13 </head> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
14 <body tal:condition="numPages"> |
501 | 15 <h1>Document information</h1> |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
16 |
501 | 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> | |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
33 |
502 | 34 <tal:x condition="not:formattedData"> |
501 | 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> | |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
42 |
501 | 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 --> | |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
60 </table> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
61 |
501 | 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"> | |
502 | 78 Download as <a |
501 | 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)" /> --> | |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
99 </body> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
100 <body tal:condition="not:numPages"> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
101 <div class="errortext">Sorry, document doesn't exist.</div> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
102 </body> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
103 </html> |