Changeset 590:ed4485d2748e in documentViewer
- Timestamp:
- Nov 16, 2012, 10:44:21 AM (12 years ago)
- Branch:
- default
- Files:
-
- 3 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
css/docuviewer.css
r583 r590 373 373 * image page 374 374 */ 375 div.col.main div.content.image s{375 div.col.main div.content.image { 376 376 background-color: inherit; 377 377 padding: 0; 378 378 } 379 div.col.main div.content.image stable {379 div.col.main div.content.image table { 380 380 border-collapse: collapse; /* for tight digilib */ 381 381 } -
documentViewer.py
r589 r590 90 90 viewer_text = PageTemplateFile('zpt/viewer_text', globals()) 91 91 viewer_xml = PageTemplateFile('zpt/viewer_xml', globals()) 92 viewer_image s = PageTemplateFile('zpt/viewer_images', globals())92 viewer_image = PageTemplateFile('zpt/viewer_image', globals()) 93 93 viewer_index = PageTemplateFile('zpt/viewer_index', globals()) 94 94 viewer_thumbs = PageTemplateFile('zpt/viewer_thumbs', globals()) … … 96 96 # available layer types (annotator not default) 97 97 builtinLayers = {'text': ['dict','search','gis'], 98 'xml': None, 'image s': None, 'index': ['extended']}98 'xml': None, 'image': None, 'index': ['extended']} 99 99 availableLayers = builtinLayers; 100 100 # layer templates … … 104 104 layer_text_gis = PageTemplateFile('zpt/layer_text_gis', globals()) 105 105 layer_text_pundit = PageTemplateFile('zpt/layer_text_pundit', globals()) 106 layer_image s_annotator = PageTemplateFile('zpt/layer_images_annotator', globals())106 layer_image_annotator = PageTemplateFile('zpt/layer_image_annotator', globals()) 107 107 layer_index_extended = PageTemplateFile('zpt/layer_index_extended', globals()) 108 108 # toc templates … … 211 211 @param mode: defines how to access the document behind url 212 212 @param url: url which contains display information 213 @param viewMode: i f images display images, if text display text, default is images (text,images or auto)213 @param viewMode: image: display images, text: display text, default is auto (try text, else image) 214 214 215 215 ''' 216 216 217 217 if not hasattr(self, 'template'): 218 # create template folder if it doesn't exist 219 self.manage_addFolder('template') 220 218 # this won't work 219 logging.error("template folder missing!") 220 return "ERROR: template folder missing!" 221 221 222 if not self.digilibBaseUrl: 222 223 self.digilibBaseUrl = self.findDigilibUrl() or "http://nausikaa.mpiwg-berlin.mpg.de/digitallibrary" … … 232 233 viewMode="text" 233 234 else: 234 viewMode="image s"235 viewMode="image" 235 236 236 237 return pt(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode) … … 243 244 @param url: url which contains display information 244 245 @param mode: defines how to access the document behind url 245 @param viewMode: 'image s': display images, 'text': display text, 'xml': display xml, default is 'auto'246 @param viewMode: 'image': display images, 'text': display text, 'xml': display xml, default is 'auto' 246 247 @param viewLayer: sub-type of viewMode, e.g. layer 'dict' for viewMode='text' 247 248 @param tocMode: type of 'table of contents' for navigation (thumbs, text, figures, none) … … 280 281 viewLayer = "dict" 281 282 else: 282 viewMode = "image s"283 viewMode = "image" 283 284 284 285 elif viewMode == "text_dict": … … 287 288 viewLayer = "dict" 288 289 290 elif viewMode == 'images': 291 # legacy fix 292 viewMode = 'image' 293 self.REQUEST['viewMode'] = 'image' 294 289 295 # safe viewLayer in userinfo 290 296 userinfo['viewLayer'] = viewLayer … … 405 411 try: 406 412 layers = json.loads(newLayerString) 407 if 'text' in layers and 'image s' in layers:413 if 'text' in layers and 'image' in layers: 408 414 self.availableLayers = layers 409 415 return -
zpt/common_template.zpt
r584 r590 28 28 <li tal:condition="docpath" tal:attributes="class python:here.getStyle(viewMode, 'text')"><a 29 29 tal:omit-tag="python:viewMode=='text'" tal:attributes="href python:here.getLink('viewMode','text')">Text</a></li> 30 <li tal:condition="python:docinfo.get('imagePath',None)" tal:attributes="class python:here.getStyle(viewMode, 'image s')"><a31 tal:omit-tag="python:viewMode=='image s'" tal:attributes="href python:here.getLink('viewMode','images')">Image</a></li>30 <li tal:condition="python:docinfo.get('imagePath',None)" tal:attributes="class python:here.getStyle(viewMode, 'image')"><a 31 tal:omit-tag="python:viewMode=='image'" tal:attributes="href python:here.getLink('viewMode','image')">Image</a></li> 32 32 <li tal:condition="docpath" tal:attributes="class python:here.getStyle(viewMode, 'xml')"><a 33 33 tal:omit-tag="python:viewMode=='xml'" tal:attributes="href python:here.getLink('viewMode','xml')">XML</a></li> -
zpt/viewer_image.zpt
r585 r590 4 4 tal:define="docinfo options/docinfo; pageinfo options/pageinfo; viewMode pageinfo/viewMode; 5 5 viewLayer pageinfo/viewLayer; viewLayers pageinfo/viewLayers; 6 availableLayers python:here.getAvailableLayers().get('image s', None);6 availableLayers python:here.getAvailableLayers().get('image', None); 7 7 tocMode pageinfo/tocMode; viewerUrl docinfo/viewerUrl; 8 8 numPages docinfo/numPages | nothing; dlBaseUrl docinfo/digilibBaseUrl | nothing;"> … … 32 32 <!-- layer headers (rendered always) --> 33 33 <tal:block tal:repeat="layer availableLayers"> 34 <tal:block tal:define="mpath string:here/template/layer_image s_${layer}/macros/html_head" tal:condition="python:exists(mpath)">34 <tal:block tal:define="mpath string:here/template/layer_image_${layer}/macros/html_head" tal:condition="python:exists(mpath)"> 35 35 <metal:block metal:use-macro="python:path(mpath)" /> 36 36 </tal:block> … … 71 71 <metal:block metal:use-macro="here/template/common_template/macros/page_ruler" /> 72 72 </div> 73 <div class="content image s">73 <div class="content image"> 74 74 <div id="scaler"> 75 75 <img tal:attributes="src string:${docinfo/imageURL}&pn=${pageinfo/pn}&dw=500&dh=500" /> … … 90 90 <!-- layer select buttons (rendered always) --> 91 91 <tal:block tal:repeat="layer availableLayers"> 92 <tal:block tal:define="mpath string:here/template/layer_image s_${layer}/macros/layer_select_li"92 <tal:block tal:define="mpath string:here/template/layer_image_${layer}/macros/layer_select_li" 93 93 tal:condition="python:exists(mpath)"> 94 94 <li metal:use-macro="python:path(mpath)" /> … … 138 138 <!-- layer option boxes (rendered if active) --> 139 139 <tal:block tal:repeat="layer availableLayers"> 140 <tal:block tal:define="mpath string:here/template/layer_image s_${layer}/macros/options_box"140 <tal:block tal:define="mpath string:here/template/layer_image_${layer}/macros/options_box" 141 141 tal:condition="python:exists(mpath)"> 142 142 <metal:block metal:use-macro="python:path(mpath)" />
Note: See TracChangeset
for help on using the changeset viewer.