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