Mercurial > hg > documentViewer
annotate zpt/viewer_index.zpt @ 560:04c330b92cab
uses escidoc-dri (instead of -test). updated default license display for access!=free.
author | casties |
---|---|
date | Mon, 01 Oct 2012 15:33:22 +0200 |
parents | eabfbad6aeb4 |
children | 60f5a636bc57 |
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"> | |
18 // <!-- | |
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 }); | |
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" |
538 | 47 tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="tp" border="0" |
48 tal:attributes="src string:${docinfo/imageURL}&pn=$tp&dw=300&dh=500" /><img | |
49 tal:condition="python:not tp and exists('here/template/book.png')" border="0" src="template/book.png" /></a> | |
50 </div> | |
501 | 51 |
542 | 52 <div class="col main"> |
559 | 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> | |
559 | 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> |
559 | 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 |
539 | 105 <tal:block tal:define="attribution docinfo/attribution | nothing; copyright docinfo/copyright | nothing"> |
540 | 106 <h2>Copyright information</h2> |
107 <table border="0" tal:condition="attribution | copyright"> | |
108 <!-- attribution --> | |
109 <tr tal:condition="attribution" | |
110 tal:replace="structure python:here.metadataService.getAttributionFormatted('metadata_template', data=attribution)" /> | |
111 <!-- copyright --> | |
112 <tr tal:condition="copyright" | |
113 tal:replace="structure python:here.metadataService.getCopyrightFormatted('metadata_template', data=copyright)" /> | |
114 </table> | |
115 <table border="0" tal:condition="not:attribution | copyright"> | |
116 <tr> | |
117 <td class="type">Copyright:</td> | |
118 <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
|
119 History of Science</a> (unless stated otherwise)</td> |
540 | 120 </tr> |
121 <tr> | |
122 <td class="type">License:</td> | |
560
04c330b92cab
uses escidoc-dri (instead of -test). updated default license display for access!=free.
casties
parents:
559
diff
changeset
|
123 <td tal:condition="python:docinfo.get('accessType', None) == 'free'" class="content"><a target="_blank" href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a> |
04c330b92cab
uses escidoc-dri (instead of -test). updated default license display for access!=free.
casties
parents:
559
diff
changeset
|
124 (unless stated otherwise)</td> |
04c330b92cab
uses escidoc-dri (instead of -test). updated default license display for access!=free.
casties
parents:
559
diff
changeset
|
125 <td tal:condition="python:docinfo.get('accessType', None) != 'free'" class="content">Internal use only, please contact <a href="mailto:library@mpiwg-berlin.mpg.de">library@mpiwg-berlin.mpg.de</a> |
04c330b92cab
uses escidoc-dri (instead of -test). updated default license display for access!=free.
casties
parents:
559
diff
changeset
|
126 (unless stated otherwise)</td> |
540 | 127 </tr> |
128 </table> | |
539 | 129 </tal:block> |
538 | 130 </div> |
559 | 131 </div> <!-- /main content column --> |
132 | |
542 | 133 <div class="col buttons"> |
559 | 134 <!-- option block column --> |
558 | 135 <div class="options"> |
542 | 136 <h4>Browse</h4> |
137 <ul class="list"> | |
558 | 138 <li><a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">View full document</a></li> |
542 | 139 </ul> |
140 </div> | |
501 | 141 |
542 | 142 <div class="options" tal:condition="docpath"> |
143 <h4>Download</h4> | |
144 Download full document | |
145 <ul class="list"> | |
559 | 146 <li><a target="_blank" rel="nofollow" class="download" |
147 tal:attributes="href python:here.getTextDownloadUrl(type='html',docinfo=docinfo)" | |
542 | 148 target="_blank">as HTML</a></li> |
559 | 149 <li><a target="_blank" rel="nofollow" class="download" |
150 tal:attributes="href python:here.getTextDownloadUrl(type='xml',docinfo=docinfo)" target="_blank">as | |
558 | 151 XML</a></li> |
542 | 152 </ul> |
153 (copyright and license see below) | |
154 </div> | |
155 | |
543 | 156 <div class="options" tal:condition="docpath"> |
542 | 157 <h4>Search</h4> |
158 <form tal:define="queryType string:fulltextMorph" tal:condition="docpath" tal:attributes="action viewerUrl"> | |
558 | 159 <input type="hidden" |
160 tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewMode':None,'viewLayer':'search'})" | |
543 | 161 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> |
542 | 162 <!-- query text --> |
163 <input type="text" name="query" tal:attributes="value query" /> <br /> <input type="submit" value="Search" /> <a | |
164 tal:condition="query" tal:attributes="href python:here.getLink('query',None)">Clear</a> | |
165 <ul> | |
166 <li><input type="radio" name="queryType" value="fulltext" tal:attributes="checked python:queryType=='fulltext'" /> | |
167 Exact</li> | |
168 <li><input type="radio" name="queryType" value="fulltextMorph" | |
169 tal:attributes="checked python:queryType=='fulltextMorph'" /> All forms</li> | |
170 <li><input type="radio" name="queryType" value="ftIndex" tal:attributes="checked python:queryType=='ftIndex'" /> | |
171 Fulltext index</li> | |
172 <li><input type="radio" name="queryType" value="ftIndexMorph" | |
173 tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological index</li> | |
174 </ul> | |
175 </form> | |
176 </div> | |
559 | 177 |
178 <div class="options" tal:condition="availableLayers"> | |
179 <h4>Metadata</h4> | |
180 <form tal:attributes="action viewerUrl" class="autosubmit"> | |
181 <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})" | |
182 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> | |
183 <ul> | |
184 <!-- text layer select buttons (rendered always) --> | |
185 <tal:block tal:repeat="layer availableLayers"> | |
186 <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/layer_select_li" | |
187 tal:condition="python:exists(mpath)"> | |
188 <li metal:use-macro="python:path(mpath)" /> | |
189 </tal:block> | |
190 </tal:block> | |
191 </ul> | |
192 <input type="submit" value="Go!" /> | |
193 </form> | |
194 </div> | |
195 </div> <!-- /option block column --> | |
536
abd36d4d97b8
new version of index page. improvements for digilib page and thumbnail overview.
casties
parents:
535
diff
changeset
|
196 </div> |
543 | 197 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> |
198 <!-- footer --> | |
558 | 199 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" /> |
543 | 200 </tal:block> |
558 | 201 |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
202 </body> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
203 <body tal:condition="not:numPages"> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
204 <div class="errortext">Sorry, document doesn't exist.</div> |
543 | 205 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> |
206 <!-- footer --> | |
558 | 207 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" /> |
543 | 208 </tal:block> |
499
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
209 </body> |
3f9703746fef
more cleanup. new template for viewMode=index (not pretty so far).
casties
parents:
diff
changeset
|
210 </html> |