Mercurial > hg > documentViewer
annotate zpt/viewer/viewer_index.zpt @ 605:530a9a024450
fixed bug when mapping doesn't exist.
author | casties |
---|---|
date | Tue, 11 Dec 2012 16:11:39 -0500 |
parents | 6e7bcc628a76 |
children | 37ad612edf5a |
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; |
558 | 6 viewLayer pageinfo/viewLayer; viewLayers pageinfo/viewLayers; |
7 availableLayers python:here.getAvailableLayers().get('index', None); | |
501 | 8 docpath docinfo/textURLPath | nothing; |
9 query nothing; | |
559 | 10 numPages docinfo/numPages | nothing; |
11 global formattedData python:here.metadata.getBibFormattedMetaData(bibdata=docinfo.get('bib', None));"> | |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
12 <head> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
13 <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
|
14 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" /> |
559 | 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"> | |
578 | 18 $(document).ready(function() { |
19 // autosubmit forms | |
20 $('form.autosubmit').find('.autosubmit').change(function() { | |
21 this.form.submit(); | |
22 }); | |
23 $('form.autosubmit input[type="submit"]').hide(); | |
24 }); | |
559 | 25 // --> |
26 </script> | |
27 <!-- layer headers (all available) --> | |
558 | 28 <tal:block tal:repeat="layer availableLayers"> |
559 | 29 <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/html_head" tal:condition="python:exists(mpath)"> |
558 | 30 <metal:block metal:use-macro="python:path(mpath)" /> |
31 </tal:block> | |
32 </tal:block> | |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
33 </head> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
34 <body tal:condition="numPages"> |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
535
diff
changeset
|
35 <!-- header --> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
535
diff
changeset
|
36 <div class="page-head"> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
535
diff
changeset
|
37 <metal:block metal:use-macro="here/template/common_template/macros/head" /> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
535
diff
changeset
|
38 </div> |
538 | 39 |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
535
diff
changeset
|
40 <!-- main --> |
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
535
diff
changeset
|
41 <div class="page-body"> |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
42 |
538 | 43 <div class="col index-image"> |
44 <!-- image --> | |
540 | 45 <a tal:define="tp docinfo/titlePage | string:1" |
603 | 46 tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="python:docinfo.get('imageURL',None) and tp" border="0" |
562 | 47 tal:attributes="src python:'%s&pn=%s&dw=300&dh=500'%(docinfo.get('imageURL',None),tp)" /><img |
604 | 48 tal:condition="python:(not docinfo.get('imageURL',None)) and exists('here/template/book.png')" border="0" |
578 | 49 src="template/book.png" /></a> |
538 | 50 </div> |
501 | 51 |
542 | 52 <div class="col main"> |
578 | 53 <!-- main content column --> |
538 | 54 <div class="index-info"> |
550 | 55 <h2>Bibliographic information</h2> |
559 | 56 <table border="0"> |
538 | 57 <tal:x condition="python:formattedData"> |
58 <!-- wenn es bibinfo in docinfo gibt --> | |
59 <tr tal:replace="structure python:formattedData" /> | |
60 </tal:x> | |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
61 |
538 | 62 <tal:x condition="not:formattedData"> |
63 <!-- kein template fuer die daten --> | |
605 | 64 <tal:block condition="exists:docinfo/bib"> |
65 <tal:block tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo"> | |
66 <tr tal:condition="python:bib[0]!='@'"> | |
67 <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'" /> | |
68 <td class="content" tal:content="python:bibinfo[bib]" /> | |
69 </tr> | |
70 </tal:block> | |
71 </tal:block> | |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
72 |
538 | 73 <tal:y condition="not:exists:docinfo/bib"> |
74 <!-- wenn es kein bibinfo gibt (archimedes-texte) --> | |
75 <tr> | |
76 <td class="type">Author:</td> | |
77 <td class="content" tal:content="docinfo/creator" /> | |
78 </tr> | |
79 <tr> | |
80 <td class="type">Title:</td> | |
81 <td class="content" tal:content="docinfo/title" /> | |
82 </tr> | |
83 <tr> | |
84 <td class="type">Date:</td> | |
85 <td class="content" tal:content="docinfo/date" /> | |
86 </tr> | |
87 </tal:y> | |
88 </tal:x> | |
89 <!-- ende kein template fuer die daten --> | |
90 </table> | |
91 | |
539 | 92 <tal:block tal:define="dri docinfo/DRI | nothing" tal:condition="dri"> |
540 | 93 <h2>Permanent URL</h2> |
94 <table> | |
95 <tr> | |
96 <td class="type">Document ID:</td> | |
97 <td class="content" tal:content="dri" /> | |
98 </tr> | |
582 | 99 <tr> |
540 | 100 <td class="type">Permanent URL:</td> |
542 | 101 <td class="content"><a target="_blank" tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri" |
540 | 102 tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td> |
582 | 103 </tr> |
540 | 104 </table> |
539 | 105 </tal:block> |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
106 |
579 | 107 <tal:block tal:define="ctxs docinfo/presentationContext | nothing" tal:condition="ctxs"> |
578 | 108 <h2>Presentation context</h2> |
109 <ul> | |
110 <li tal:repeat="ctx ctxs"><a tal:define="link ctx/link | nothing; name ctx/name | link;" tal:content="name" | |
111 tal:attributes="href link" target="_blank" tal:omit-tag="not:link" /></li> | |
112 </ul> | |
113 </tal:block> | |
114 | |
539 | 115 <tal:block tal:define="attribution docinfo/attribution | nothing; copyright docinfo/copyright | nothing"> |
540 | 116 <h2>Copyright information</h2> |
117 <table border="0" tal:condition="attribution | copyright"> | |
118 <!-- attribution --> | |
119 <tr tal:condition="attribution" | |
120 tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=attribution)" /> | |
121 <!-- copyright --> | |
122 <tr tal:condition="copyright" | |
123 tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=copyright)" /> | |
124 </table> | |
125 <table border="0" tal:condition="not:attribution | copyright"> | |
126 <tr> | |
127 <td class="type">Copyright:</td> | |
128 <td class="content"><a target="_blank" href="http://www.mpiwg-berlin.mpg.de">Max Planck Institute for the | |
560
04c330b92cab
uses escidoc-dri (instead of -test). updated default license display for access!=free.
casties
parents:
559
diff
changeset
|
129 History of Science</a> (unless stated otherwise)</td> |
540 | 130 </tr> |
562 | 131 <tr tal:define="accType python:docinfo.get('accessType', None)"> |
540 | 132 <td class="type">License:</td> |
578 | 133 <td tal:condition="python:accType == 'free'" class="content"><a target="_blank" |
134 href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a> (unless stated otherwise)</td> | |
135 <td tal:condition="python:accType != 'free'" class="content">Internal use only<span tal:condition="accType" | |
136 tal:content="string: ($accType)" />, please contact <a href="mailto:library@mpiwg-berlin.mpg.de">library@mpiwg-berlin.mpg.de</a> | |
137 (unless stated otherwise) | |
138 </td> | |
540 | 139 </tr> |
140 </table> | |
539 | 141 </tal:block> |
538 | 142 </div> |
578 | 143 </div> |
144 <!-- /main content column --> | |
145 | |
542 | 146 <div class="col buttons"> |
578 | 147 <!-- option block column --> |
558 | 148 <div class="options"> |
542 | 149 <h4>Browse</h4> |
150 <ul class="list"> | |
558 | 151 <li><a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">View full document</a></li> |
542 | 152 </ul> |
153 </div> | |
501 | 154 |
542 | 155 <div class="options" tal:condition="docpath"> |
156 <h4>Download</h4> | |
157 Download full document | |
158 <ul class="list"> | |
559 | 159 <li><a target="_blank" rel="nofollow" class="download" |
578 | 160 tal:attributes="href python:here.getTextDownloadUrl(type='html',docinfo=docinfo)" target="_blank">as HTML</a></li> |
559 | 161 <li><a target="_blank" rel="nofollow" class="download" |
578 | 162 tal:attributes="href python:here.getTextDownloadUrl(type='xml',docinfo=docinfo)" target="_blank">as XML</a></li> |
542 | 163 </ul> |
164 (copyright and license see below) | |
165 </div> | |
166 | |
543 | 167 <div class="options" tal:condition="docpath"> |
542 | 168 <h4>Search</h4> |
169 <form tal:define="queryType string:fulltextMorph" tal:condition="docpath" tal:attributes="action viewerUrl"> | |
558 | 170 <input type="hidden" |
171 tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewMode':None,'viewLayer':'search'})" | |
543 | 172 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> |
542 | 173 <!-- query text --> |
174 <input type="text" name="query" tal:attributes="value query" /> <br /> <input type="submit" value="Search" /> <a | |
175 tal:condition="query" tal:attributes="href python:here.getLink('query',None)">Clear</a> | |
176 <ul> | |
177 <li><input type="radio" name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" /> | |
178 Exact</li> | |
179 <li><input type="radio" name="queryType" value="fulltextMorph" | |
180 tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms</li> | |
181 <li><input type="radio" name="queryType" value="ftIndex" tal:attributes="checked python:queryType=='ftIndex'" /> | |
182 Fulltext index</li> | |
183 <li><input type="radio" name="queryType" value="ftIndexMorph" | |
184 tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological index</li> | |
185 </ul> | |
186 </form> | |
187 </div> | |
559 | 188 |
189 <div class="options" tal:condition="availableLayers"> | |
190 <h4>Metadata</h4> | |
191 <form tal:attributes="action viewerUrl" class="autosubmit"> | |
578 | 192 <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})" tal:repeat="param params" |
193 tal:attributes="name param; value python:params[param]" /> | |
559 | 194 <ul> |
195 <!-- text layer select buttons (rendered always) --> | |
196 <tal:block tal:repeat="layer availableLayers"> | |
197 <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/layer_select_li" | |
198 tal:condition="python:exists(mpath)"> | |
199 <li metal:use-macro="python:path(mpath)" /> | |
200 </tal:block> | |
201 </tal:block> | |
202 </ul> | |
203 <input type="submit" value="Go!" /> | |
204 </form> | |
205 </div> | |
578 | 206 </div> |
207 <!-- /option block column --> | |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
535
diff
changeset
|
208 </div> |
543 | 209 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> |
210 <!-- footer --> | |
558 | 211 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" /> |
543 | 212 </tal:block> |
558 | 213 |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
214 </body> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
215 <body tal:condition="not:numPages"> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
216 <div class="errortext">Sorry, document doesn't exist.</div> |
543 | 217 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> |
218 <!-- footer --> | |
558 | 219 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" /> |
543 | 220 </tal:block> |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
221 </body> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
222 </html> |