Changeset 558:6ab436383fca in documentViewer
- Timestamp:
- Sep 28, 2012, 9:25:25 AM (12 years ago)
- Branch:
- default
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
documentViewer.py
r552 r558 129 129 # available layer types (annotator not default) 130 130 builtinLayers = {'text': ['dict','search','gis'], 131 'xml': None, 'images': None, 'index': None}131 'xml': None, 'images': None, 'index': ['extended']} 132 132 availableLayers = builtinLayers; 133 133 # layer templates -
zpt/viewer_index.zpt
r550 r558 4 4 tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode; 5 5 tocMode pageinfo/tocMode; viewerUrl docinfo/viewerUrl; 6 viewLayer pageinfo/viewLayer; viewLayers pageinfo/viewLayers; 7 availableLayers python:here.getAvailableLayers().get('index', None); 6 8 docpath docinfo/textURLPath | nothing; 7 9 query nothing; … … 11 13 <title tal:content="python:docinfo.get('creator',' ') + ' - ' + docinfo.get('title',' ')" /> 12 14 <link rel="stylesheet" href="template/docuviewer_css" type="text/css" /> 15 <!-- layer headers (rendered always) --> 16 <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)"> 18 <metal:block metal:use-macro="python:path(mpath)" /> 19 </tal:block> 20 </tal:block> 13 21 </head> 14 22 <body tal:condition="numPages"> … … 109 117 <div class="col buttons"> 110 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 136 <div class="options"> 111 137 <h4>Browse</h4> 112 138 <ul class="list"> 113 <li><a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">View full document</a></li>139 <li><a class="openbutton" tal:attributes="href python:context.getLink('viewMode','auto')">View full document</a></li> 114 140 </ul> 115 141 </div> … … 123 149 target="_blank">as HTML</a></li> 124 150 <li><a target="_blank" 125 tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)" target="_blank">as XML</a></li> 151 tal:attributes="href python:'http://mpdl-system.mpiwg-berlin.mpg.de/mpdl/getDoc?doc=%s'%(docpath)" target="_blank">as 152 XML</a></li> 126 153 </ul> 127 154 (copyright and license see below) … … 131 158 <h4>Search</h4> 132 159 <form tal:define="queryType string:fulltextMorph" tal:condition="docpath" tal:attributes="action viewerUrl"> 133 <input type="hidden" tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewMode':None,'viewLayer':'search'})" 160 <input type="hidden" 161 tal:define="params python:here.getParams(params={'query':None,'queryType':None,'viewMode':None,'viewLayer':'search'})" 134 162 tal:repeat="param params" tal:attributes="name param; value python:params[param]" /> 135 163 <!-- query text --> … … 153 181 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> 154 182 <!-- footer --> 155 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" />183 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" /> 156 184 </tal:block> 157 185 158 186 </body> 159 187 <body tal:condition="not:numPages"> … … 161 189 <tal:block tal:condition="exists:here/template/site_template.pt/macros/footer"> 162 190 <!-- footer --> 163 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" />191 <metal:block metal:use-macro="here/template/site_template.pt/macros/footer" /> 164 192 </tal:block> 165 193 </body>
Note: See TracChangeset
for help on using the changeset viewer.