Mercurial > hg > documentViewer
annotate zpt/viewer_index.zpt @ 588:e1034c2ca255
bug with missing current param.
author | casties |
---|---|
date | Thu, 15 Nov 2012 17:20:03 +0100 |
parents | bf0f514b6f92 |
children |
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" |
538 | 46 tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="tp" border="0" |
562 | 47 tal:attributes="src python:'%s&pn=%s&dw=300&dh=500'%(docinfo.get('imageURL',None),tp)" /><img |
578 | 48 tal:condition="python:not docinfo.get('titlePage',None) and exists('here/template/book.png')" border="0" |
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 --> | |
64 <tal:x condition="exists:docinfo/bib"> | |
65 <tr tal:define="bibinfo docinfo/bib" tal:repeat="bib bibinfo"> | |
66 <td class="type" tal:content="python:bib.capitalize().replace('_',' ') + ':'" /> | |
67 <td class="content" tal:content="bibinfo/bib" /> | |
68 </tr> | |
69 </tal:x> | |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
70 |
538 | 71 <tal:y condition="not:exists:docinfo/bib"> |
72 <!-- wenn es kein bibinfo gibt (archimedes-texte) --> | |
73 <tr> | |
74 <td class="type">Author:</td> | |
75 <td class="content" tal:content="docinfo/creator" /> | |
76 </tr> | |
77 <tr> | |
78 <td class="type">Title:</td> | |
79 <td class="content" tal:content="docinfo/title" /> | |
80 </tr> | |
81 <tr> | |
82 <td class="type">Date:</td> | |
83 <td class="content" tal:content="docinfo/date" /> | |
84 </tr> | |
85 </tal:y> | |
86 </tal:x> | |
87 <!-- ende kein template fuer die daten --> | |
88 </table> | |
89 | |
539 | 90 <tal:block tal:define="dri docinfo/DRI | nothing" tal:condition="dri"> |
540 | 91 <h2>Permanent URL</h2> |
92 <table> | |
93 <tr> | |
94 <td class="type">Document ID:</td> | |
95 <td class="content" tal:content="dri" /> | |
96 </tr> | |
582 | 97 <tr> |
540 | 98 <td class="type">Permanent URL:</td> |
542 | 99 <td class="content"><a target="_blank" tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri" |
540 | 100 tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td> |
582 | 101 </tr> |
540 | 102 </table> |
539 | 103 </tal:block> |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
104 |
579 | 105 <tal:block tal:define="ctxs docinfo/presentationContext | nothing" tal:condition="ctxs"> |
578 | 106 <h2>Presentation context</h2> |
107 <ul> | |
108 <li tal:repeat="ctx ctxs"><a tal:define="link ctx/link | nothing; name ctx/name | link;" tal:content="name" | |
109 tal:attributes="href link" target="_blank" tal:omit-tag="not:link" /></li> | |
110 </ul> | |
111 </tal:block> | |
112 | |
539 | 113 <tal:block tal:define="attribution docinfo/attribution | nothing; copyright docinfo/copyright | nothing"> |
540 | 114 <h2>Copyright information</h2> |
115 <table border="0" tal:condition="attribution | copyright"> | |
116 <!-- attribution --> | |
117 <tr tal:condition="attribution" | |
118 tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=attribution)" /> | |
119 <!-- copyright --> | |
120 <tr tal:condition="copyright" | |
121 tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=copyright)" /> | |
122 </table> | |
123 <table border="0" tal:condition="not:attribution | copyright"> | |
124 <tr> | |
125 <td class="type">Copyright:</td> | |
126 <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
|
127 History of Science</a> (unless stated otherwise)</td> |
540 | 128 </tr> |
562 | 129 <tr tal:define="accType python:docinfo.get('accessType', None)"> |
540 | 130 <td class="type">License:</td> |
578 | 131 <td tal:condition="python:accType == 'free'" class="content"><a target="_blank" |
132 href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a> (unless stated otherwise)</td> | |
133 <td tal:condition="python:accType != 'free'" class="content">Internal use only<span tal:condition="accType" | |
134 tal:content="string: ($accType)" />, please contact <a href="mailto:library@mpiwg-berlin.mpg.de">library@mpiwg-berlin.mpg.de</a> | |
135 (unless stated otherwise) | |
136 </td> | |
540 | 137 </tr> |
138 </table> | |
539 | 139 </tal:block> |
538 | 140 </div> |
578 | 141 </div> |
142 <!-- /main content column --> | |
143 | |
542 | 144 <div class="col buttons"> |
578 | 145 <!-- option block column --> |
558 | 146 <div class="options"> |
542 | 147 <h4>Browse</h4> |
148 <ul class="list"> | |
558 | 149 <li><a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">View full document</a></li> |
542 | 150 </ul> |
151 </div> | |
501 | 152 |
542 | 153 <div class="options" tal:condition="docpath"> |
154 <h4>Download</h4> | |
155 Download full document | |
156 <ul class="list"> | |
559 | 157 <li><a target="_blank" rel="nofollow" class="download" |
578 | 158 tal:attributes="href python:here.getTextDownloadUrl(type='html',docinfo=docinfo)" target="_blank">as HTML</a></li> |
559 | 159 <li><a target="_blank" rel="nofollow" class="download" |
578 | 160 tal:attributes="href python:here.getTextDownloadUrl(type='xml',docinfo=docinfo)" target="_blank">as XML</a></li> |
542 | 161 </ul> |
162 (copyright and license see below) | |
163 </div> | |
164 | |
543 | 165 <div class="options" tal:condition="docpath"> |
542 | 166 <h4>Search</h4> |
167 <form tal:define="queryType string:fulltextMorph" tal:condition="docpath" tal:attributes="action viewerUrl"> | |
558 | 168 <input type="hidden" |
169 tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewMode':None,'viewLayer':'search'})" | |
543 | 170 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> |
542 | 171 <!-- query text --> |
172 <input type="text" name="query" tal:attributes="value query" /> <br /> <input type="submit" value="Search" /> <a | |
173 tal:condition="query" tal:attributes="href python:here.getLink('query',None)">Clear</a> | |
174 <ul> | |
175 <li><input type="radio" name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" /> | |
176 Exact</li> | |
177 <li><input type="radio" name="queryType" value="fulltextMorph" | |
178 tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms</li> | |
179 <li><input type="radio" name="queryType" value="ftIndex" tal:attributes="checked python:queryType=='ftIndex'" /> | |
180 Fulltext index</li> | |
181 <li><input type="radio" name="queryType" value="ftIndexMorph" | |
182 tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological index</li> | |
183 </ul> | |
184 </form> | |
185 </div> | |
559 | 186 |
187 <div class="options" tal:condition="availableLayers"> | |
188 <h4>Metadata</h4> | |
189 <form tal:attributes="action viewerUrl" class="autosubmit"> | |
578 | 190 <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})" tal:repeat="param params" |
191 tal:attributes="name param; value python:params[param]" /> | |
559 | 192 <ul> |
193 <!-- text layer select buttons (rendered always) --> | |
194 <tal:block tal:repeat="layer availableLayers"> | |
195 <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/layer_select_li" | |
196 tal:condition="python:exists(mpath)"> | |
197 <li metal:use-macro="python:path(mpath)" /> | |
198 </tal:block> | |
199 </tal:block> | |
200 </ul> | |
201 <input type="submit" value="Go!" /> | |
202 </form> | |
203 </div> | |
578 | 204 </div> |
205 <!-- /option block column --> | |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
535
diff
changeset
|
206 </div> |
543 | 207 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> |
208 <!-- footer --> | |
558 | 209 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" /> |
543 | 210 </tal:block> |
558 | 211 |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
212 </body> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
213 <body tal:condition="not:numPages"> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
214 <div class="errortext">Sorry, document doesn't exist.</div> |
543 | 215 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> |
216 <!-- footer --> | |
558 | 217 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" /> |
543 | 218 </tal:block> |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
219 </body> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
220 </html> |