Changeset 559:eabfbad6aeb4 in documentViewer for zpt
- Timestamp:
- Sep 28, 2012, 4:50:59 PM (12 years ago)
- Branch:
- default
- Location:
- zpt
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
zpt/viewer_index.zpt
r558 r559 8 8 docpath docinfo/textURLPath | nothing; 9 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 12 <head> 12 13 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 13 14 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" /> 14 <link rel="stylesheet" href="template/docuviewer_css" type="text/css" /> 15 <!-- layer headers (rendered always) --> 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) --> 16 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 31 <metal:block metal:use-macro="python:path(mpath)" /> 19 32 </tal:block> … … 38 51 39 52 <div class="col main"> 53 <!-- main content column --> 40 54 <div class="index-info"> 41 55 <h2>Bibliographic information</h2> 42 <table border="0" 43 tal:define="formattedData python:here.metadata.getBibFormattedMetaDataExtended(bibdata=docinfo.get('bib', None),bibxdata=docinfo.get('bibx', None))"> 56 <table border="0"> 44 57 <tal:x condition="python:formattedData"> 45 58 <!-- wenn es bibinfo in docinfo gibt --> … … 82 95 <td class="content" tal:content="dri" /> 83 96 </tr> 84 < tr>97 <!-- <tr> 85 98 <td class="type">Permanent URL:</td> 86 99 <td class="content"><a target="_blank" tal:attributes="href string:http://echo.mpiwg-berlin.mpg.de/$dri" 87 100 tal:content="string:http://echo.mpiwg-berlin.mpg.de/$dri" /></td> 88 </tr> 101 </tr> --> 89 102 </table> 90 103 </tal:block> … … 114 127 </tal:block> 115 128 </div> 116 </div> 129 </div> <!-- /main content column --> 130 117 131 <div class="col buttons"> 118 <div class="options"> 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 132 <!-- option block column --> 136 133 <div class="options"> 137 134 <h4>Browse</h4> … … 145 142 Download full document 146 143 <ul class="list"> 147 <li><a target="_blank" 148 tal:attributes="href python: 'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath.replace('.xml','.html'))"144 <li><a target="_blank" rel="nofollow" class="download" 145 tal:attributes="href python:here.getTextDownloadUrl(type='html',docinfo=docinfo)" 149 146 target="_blank">as HTML</a></li> 150 <li><a target="_blank" 151 tal:attributes="href python: 'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)" target="_blank">as147 <li><a target="_blank" rel="nofollow" class="download" 148 tal:attributes="href python:here.getTextDownloadUrl(type='xml',docinfo=docinfo)" target="_blank">as 152 149 XML</a></li> 153 150 </ul> … … 176 173 </form> 177 174 </div> 178 <!-- end search options--> 179 </div> 175 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 194 </div> 181 195 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> -
zpt/viewer_text.zpt
r545 r559 75 75 <div class="col buttons"> 76 76 <!--"BEGIN TEXT DISPLAY" --> 77 <div class="options" >77 <div class="options" tal:condition="availableLayers"> 78 78 <h4>Text layer</h4> 79 79 <form tal:attributes="action viewerUrl" class="autosubmit"> 80 <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None ,'viewMode':None})"80 <input type="hidden" tal:define="params python:here.getParams(params={'viewLayer':None})" 81 81 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> 82 82 <ul>
Note: See TracChangeset
for help on using the changeset viewer.