comparison zpt/viewer_index.zpt @ 559:eabfbad6aeb4

"extended" layer for index view and some bugfixes.
author casties
date Fri, 28 Sep 2012 18:50:59 +0200
parents 6ab436383fca
children 04c330b92cab
comparison
equal deleted inserted replaced
558:6ab436383fca 559:eabfbad6aeb4
5 tocMode pageinfo/tocMode; viewerUrl docinfo/viewerUrl; 5 tocMode pageinfo/tocMode; viewerUrl docinfo/viewerUrl;
6 viewLayer pageinfo/viewLayer; viewLayers pageinfo/viewLayers; 6 viewLayer pageinfo/viewLayer; viewLayers pageinfo/viewLayers;
7 availableLayers python:here.getAvailableLayers().get('index', None); 7 availableLayers python:here.getAvailableLayers().get('index', None);
8 docpath docinfo/textURLPath | nothing; 8 docpath docinfo/textURLPath | nothing;
9 query nothing; 9 query nothing;
10 numPages docinfo/numPages | nothing;"> 10 numPages docinfo/numPages | nothing;
11 global formattedData python:here.metadata.getBibFormattedMetaData(bibdata=docinfo.get('bib', None));">
11 <head> 12 <head>
12 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 13 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
13 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" /> 14 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" />
14 <link rel="stylesheet" href="template/docuviewer_css" type="text/css" /> 15 <link rel="stylesheet" tal:attributes="href string:$viewerUrl/template/docuviewer_css" type="text/css" />
15 <!-- layer headers (rendered always) --> 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) -->
16 <tal:block tal:repeat="layer availableLayers"> 29 <tal:block tal:repeat="layer availableLayers">
17 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/html_head" tal:condition="python:exists(mpath)"> 30 <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/html_head" tal:condition="python:exists(mpath)">
18 <metal:block metal:use-macro="python:path(mpath)" /> 31 <metal:block metal:use-macro="python:path(mpath)" />
19 </tal:block> 32 </tal:block>
20 </tal:block> 33 </tal:block>
21 </head> 34 </head>
22 <body tal:condition="numPages"> 35 <body tal:condition="numPages">
35 tal:attributes="src string:${docinfo/imageURL}&pn=$tp&dw=300&dh=500" /><img 48 tal:attributes="src string:${docinfo/imageURL}&pn=$tp&dw=300&dh=500" /><img
36 tal:condition="python:not tp and exists('here/template/book.png')" border="0" src="template/book.png" /></a> 49 tal:condition="python:not tp and exists('here/template/book.png')" border="0" src="template/book.png" /></a>
37 </div> 50 </div>
38 51
39 <div class="col main"> 52 <div class="col main">
53 <!-- main content column -->
40 <div class="index-info"> 54 <div class="index-info">
41 <h2>Bibliographic information</h2> 55 <h2>Bibliographic information</h2>
42 <table border="0" 56 <table border="0">
43 tal:define="formattedData python:here.metadata.getBibFormattedMetaDataExtended(bibdata=docinfo.get('bib', None),bibxdata=docinfo.get('bibx', None))">
44 <tal:x condition="python:formattedData"> 57 <tal:x condition="python:formattedData">
45 <!-- wenn es bibinfo in docinfo gibt --> 58 <!-- wenn es bibinfo in docinfo gibt -->
46 <tr tal:replace="structure python:formattedData" /> 59 <tr tal:replace="structure python:formattedData" />
47 </tal:x> 60 </tal:x>
48 61
79 <table> 92 <table>
80 <tr> 93 <tr>
81 <td class="type">Document ID:</td> 94 <td class="type">Document ID:</td>
82 <td class="content" tal:content="dri" /> 95 <td class="content" tal:content="dri" />
83 </tr> 96 </tr>
84 <tr> 97 <!-- <tr>
85 <td class="type">Permanent URL:</td> 98 <td class="type">Permanent URL:</td>
86 <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"
87 tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td> 100 tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td>
88 </tr> 101 </tr> -->
89 </table> 102 </table>
90 </tal:block> 103 </tal:block>
91 104
92 <tal:block tal:define="attribution docinfo/attribution | nothing; copyright docinfo/copyright | nothing"> 105 <tal:block tal:define="attribution docinfo/attribution | nothing; copyright docinfo/copyright | nothing">
93 <h2>Copyright information</h2> 106 <h2>Copyright information</h2>
111 (unless otherwise stated)</td> 124 (unless otherwise stated)</td>
112 </tr> 125 </tr>
113 </table> 126 </table>
114 </tal:block> 127 </tal:block>
115 </div> 128 </div>
116 </div> 129 </div> <!-- /main content column -->
130
117 <div class="col buttons"> 131 <div class="col buttons">
118 <div class="options"> 132 <!-- option block column -->
119 <h4>Metadata</h4>
120 <form tal:attributes="action viewerUrl" class="autosubmit">
121 <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None,'viewMode':None})"
122 tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
123 <ul>
124 <!-- text layer select buttons (rendered always) -->
125 <tal:block tal:repeat="layer availableLayers">
126 <tal:block tal:define="mpath string:here/template/layer_text_${layer}/macros/layer_select_li"
127 tal:condition="python:exists(mpath)">
128 <li metal:use-macro="python:path(mpath)" />
129 </tal:block>
130 </tal:block>
131 </ul>
132 <input type="submit" value="Go!" />
133 </form>
134 </div>
135
136 <div class="options"> 133 <div class="options">
137 <h4>Browse</h4> 134 <h4>Browse</h4>
138 <ul class="list"> 135 <ul class="list">
139 <li><a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">View full document</a></li> 136 <li><a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">View full document</a></li>
140 </ul> 137 </ul>
142 139
143 <div class="options" tal:condition="docpath"> 140 <div class="options" tal:condition="docpath">
144 <h4>Download</h4> 141 <h4>Download</h4>
145 Download full document 142 Download full document
146 <ul class="list"> 143 <ul class="list">
147 <li><a target="_blank" 144 <li><a target="_blank" rel="nofollow" class="download"
148 tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath.replace('.xml','.html'))" 145 tal:attributes="href python:here.getTextDownloadUrl(type='html',docinfo=docinfo)"
149 target="_blank">as HTML</a></li> 146 target="_blank">as HTML</a></li>
150 <li><a target="_blank" 147 <li><a target="_blank" rel="nofollow" class="download"
151 tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)" target="_blank">as 148 tal:attributes="href python:here.getTextDownloadUrl(type='xml',docinfo=docinfo)" target="_blank">as
152 XML</a></li> 149 XML</a></li>
153 </ul> 150 </ul>
154 (copyright and license see below) 151 (copyright and license see below)
155 </div> 152 </div>
156 153
173 <li><input type="radio" name="queryType" value="ftIndexMorph" 170 <li><input type="radio" name="queryType" value="ftIndexMorph"
174 tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological index</li> 171 tal:attributes="checked python:queryType=='ftIndexMorph'" /> Morphological index</li>
175 </ul> 172 </ul>
176 </form> 173 </form>
177 </div> 174 </div>
178 <!-- end search options--> 175
179 </div> 176 <div class="options" tal:condition="availableLayers">
177 <h4>Metadata</h4>
178 <form tal:attributes="action viewerUrl" class="autosubmit">
179 <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})"
180 tal:repeat="param params" tal:attributes="name param; value python:params[param]" />
181 <ul>
182 <!-- text layer select buttons (rendered always) -->
183 <tal:block tal:repeat="layer availableLayers">
184 <tal:block tal:define="mpath string:here/template/layer_index_${layer}/macros/layer_select_li"
185 tal:condition="python:exists(mpath)">
186 <li metal:use-macro="python:path(mpath)" />
187 </tal:block>
188 </tal:block>
189 </ul>
190 <input type="submit" value="Go!" />
191 </form>
192 </div>
193 </div> <!-- /option block column -->
180 </div> 194 </div>
181 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> 195 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer">
182 <!-- footer --> 196 <!-- footer -->
183 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" /> 197 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" />
184 </tal:block> 198 </tal:block>