Mercurial > hg > documentViewer
comparison zpt/viewer_index.zpt @ 578:024b75162437
displays context data on index page
author | casties |
---|---|
date | Fri, 19 Oct 2012 18:51:47 +0200 |
parents | 60f5a636bc57 |
children | fc861a6cef17 |
comparison
equal
deleted
inserted
replaced
577:9251719154a3 | 578:024b75162437 |
---|---|
13 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 13 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
14 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" /> | 14 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" /> |
15 <link rel="stylesheet" tal:attributes="href string:$viewerUrl/template/docuviewer_css" type="text/css" /> | 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> | 16 <script type="text/javascript" tal:attributes="src string:$viewerUrl/template/jquery_js"></script> |
17 <script type="text/javascript"> | 17 <script type="text/javascript"> |
18 // <!-- | 18 $(document).ready(function() { |
19 $(document).ready(function() { | 19 // autosubmit forms |
20 // autosubmit forms | 20 $('form.autosubmit').find('.autosubmit').change(function() { |
21 $('form.autosubmit').find('.autosubmit').change(function() { | 21 this.form.submit(); |
22 this.form.submit(); | 22 }); |
23 }); | 23 $('form.autosubmit input[type="submit"]').hide(); |
24 $('form.autosubmit input[type="submit"]').hide(); | 24 }); |
25 }); | |
26 // --> | 25 // --> |
27 </script> | 26 </script> |
28 <!-- layer headers (all available) --> | 27 <!-- layer headers (all available) --> |
29 <tal:block tal:repeat="layer availableLayers"> | 28 <tal:block tal:repeat="layer availableLayers"> |
30 <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/html_head" tal:condition="python:exists(mpath)"> | 29 <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/html_head" tal:condition="python:exists(mpath)"> |
44 <div class="col index-image"> | 43 <div class="col index-image"> |
45 <!-- image --> | 44 <!-- image --> |
46 <a tal:define="tp docinfo/titlePage | string:1" | 45 <a tal:define="tp docinfo/titlePage | string:1" |
47 tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="tp" border="0" | 46 tal:attributes="href python:context.getLink(params={'viewMode':'auto','pn':tp})"><img tal:condition="tp" border="0" |
48 tal:attributes="src python:'%s&pn=%s&dw=300&dh=500'%(docinfo.get('imageURL',None),tp)" /><img | 47 tal:attributes="src python:'%s&pn=%s&dw=300&dh=500'%(docinfo.get('imageURL',None),tp)" /><img |
49 tal:condition="python:not docinfo.get('titlePage',None) and exists('here/template/book.png')" border="0" src="template/book.png" /></a> | 48 tal:condition="python:not docinfo.get('titlePage',None) and exists('here/template/book.png')" border="0" |
49 src="template/book.png" /></a> | |
50 </div> | 50 </div> |
51 | 51 |
52 <div class="col main"> | 52 <div class="col main"> |
53 <!-- main content column --> | 53 <!-- main content column --> |
54 <div class="index-info"> | 54 <div class="index-info"> |
55 <h2>Bibliographic information</h2> | 55 <h2>Bibliographic information</h2> |
56 <table border="0"> | 56 <table border="0"> |
57 <tal:x condition="python:formattedData"> | 57 <tal:x condition="python:formattedData"> |
58 <!-- wenn es bibinfo in docinfo gibt --> | 58 <!-- wenn es bibinfo in docinfo gibt --> |
98 <td class="type">Permanent URL:</td> | 98 <td class="type">Permanent URL:</td> |
99 <td class="content"><a target="_blank" tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri" | 99 <td class="content"><a target="_blank" tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri" |
100 tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td> | 100 tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td> |
101 </tr> --> | 101 </tr> --> |
102 </table> | 102 </table> |
103 </tal:block> | |
104 | |
105 <tal:block tal:define="ctxs docinfo/presentationContext | nothing"> | |
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> | |
103 </tal:block> | 111 </tal:block> |
104 | 112 |
105 <tal:block tal:define="attribution docinfo/attribution | nothing; copyright docinfo/copyright | nothing"> | 113 <tal:block tal:define="attribution docinfo/attribution | nothing; copyright docinfo/copyright | nothing"> |
106 <h2>Copyright information</h2> | 114 <h2>Copyright information</h2> |
107 <table border="0" tal:condition="attribution | copyright"> | 115 <table border="0" tal:condition="attribution | copyright"> |
118 <td class="content"><a target="_blank" href="http://www.mpiwg-berlin.mpg.de">Max Planck Institute for the | 126 <td class="content"><a target="_blank" href="http://www.mpiwg-berlin.mpg.de">Max Planck Institute for the |
119 History of Science</a> (unless stated otherwise)</td> | 127 History of Science</a> (unless stated otherwise)</td> |
120 </tr> | 128 </tr> |
121 <tr tal:define="accType python:docinfo.get('accessType', None)"> | 129 <tr tal:define="accType python:docinfo.get('accessType', None)"> |
122 <td class="type">License:</td> | 130 <td class="type">License:</td> |
123 <td tal:condition="python:accType == 'free'" class="content"><a target="_blank" href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a> | 131 <td tal:condition="python:accType == 'free'" class="content"><a target="_blank" |
124 (unless stated otherwise)</td> | 132 href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a> (unless stated otherwise)</td> |
125 <td tal:condition="python:accType != 'free'" class="content">Internal use only<span tal:condition="accType" tal:content="string: ($accType)"/>, | 133 <td tal:condition="python:accType != 'free'" class="content">Internal use only<span tal:condition="accType" |
126 please contact <a href="mailto:library@mpiwg-berlin.mpg.de">library@mpiwg-berlin.mpg.de</a> | 134 tal:content="string: ($accType)" />, please contact <a href="mailto:library@mpiwg-berlin.mpg.de">library@mpiwg-berlin.mpg.de</a> |
127 (unless stated otherwise)</td> | 135 (unless stated otherwise) |
136 </td> | |
128 </tr> | 137 </tr> |
129 </table> | 138 </table> |
130 </tal:block> | 139 </tal:block> |
131 </div> | 140 </div> |
132 </div> <!-- /main content column --> | 141 </div> |
133 | 142 <!-- /main content column --> |
143 | |
134 <div class="col buttons"> | 144 <div class="col buttons"> |
135 <!-- option block column --> | 145 <!-- option block column --> |
136 <div class="options"> | 146 <div class="options"> |
137 <h4>Browse</h4> | 147 <h4>Browse</h4> |
138 <ul class="list"> | 148 <ul class="list"> |
139 <li><a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">View full document</a></li> | 149 <li><a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">View full document</a></li> |
140 </ul> | 150 </ul> |
143 <div class="options" tal:condition="docpath"> | 153 <div class="options" tal:condition="docpath"> |
144 <h4>Download</h4> | 154 <h4>Download</h4> |
145 Download full document | 155 Download full document |
146 <ul class="list"> | 156 <ul class="list"> |
147 <li><a target="_blank" rel="nofollow" class="download" | 157 <li><a target="_blank" rel="nofollow" class="download" |
148 tal:attributes="href python:here.getTextDownloadUrl(type='html',docinfo=docinfo)" | 158 tal:attributes="href python:here.getTextDownloadUrl(type='html',docinfo=docinfo)" target="_blank">as HTML</a></li> |
149 target="_blank">as HTML</a></li> | |
150 <li><a target="_blank" rel="nofollow" class="download" | 159 <li><a target="_blank" rel="nofollow" class="download" |
151 tal:attributes="href python:here.getTextDownloadUrl(type='xml',docinfo=docinfo)" target="_blank">as | 160 tal:attributes="href python:here.getTextDownloadUrl(type='xml',docinfo=docinfo)" target="_blank">as XML</a></li> |
152 XML</a></li> | |
153 </ul> | 161 </ul> |
154 (copyright and license see below) | 162 (copyright and license see below) |
155 </div> | 163 </div> |
156 | 164 |
157 <div class="options" tal:condition="docpath"> | 165 <div class="options" tal:condition="docpath"> |
177 </div> | 185 </div> |
178 | 186 |
179 <div class="options" tal:condition="availableLayers"> | 187 <div class="options" tal:condition="availableLayers"> |
180 <h4>Metadata</h4> | 188 <h4>Metadata</h4> |
181 <form tal:attributes="action viewerUrl" class="autosubmit"> | 189 <form tal:attributes="action viewerUrl" class="autosubmit"> |
182 <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})" | 190 <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})" tal:repeat="param params" |
183 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> | 191 tal:attributes="name param; value python:params[param]" /> |
184 <ul> | 192 <ul> |
185 <!-- text layer select buttons (rendered always) --> | 193 <!-- text layer select buttons (rendered always) --> |
186 <tal:block tal:repeat="layer availableLayers"> | 194 <tal:block tal:repeat="layer availableLayers"> |
187 <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/layer_select_li" | 195 <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/layer_select_li" |
188 tal:condition="python:exists(mpath)"> | 196 tal:condition="python:exists(mpath)"> |
191 </tal:block> | 199 </tal:block> |
192 </ul> | 200 </ul> |
193 <input type="submit" value="Go!" /> | 201 <input type="submit" value="Go!" /> |
194 </form> | 202 </form> |
195 </div> | 203 </div> |
196 </div> <!-- /option block column --> | 204 </div> |
205 <!-- /option block column --> | |
197 </div> | 206 </div> |
198 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> | 207 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> |
199 <!-- footer --> | 208 <!-- footer --> |
200 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" /> | 209 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" /> |
201 </tal:block> | 210 </tal:block> |