Changeset 57:7cdb0fc34a92 in documentViewer


Ignore:
Timestamp:
May 4, 2007, 1:17:02 PM (17 years ago)
Author:
casties
Branch:
default
Message:

added getInfo_xml method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentViewer.py

    r55 r57  
    8181    head_main = PageTemplateFile('zpt/head_main', globals())
    8282    docuviewer_css = PageTemplateFile('css/docuviewer.css', globals())
     83    info_xml = PageTemplateFile('zpt/info_xml', globals())
    8384
    8485    security.declareProtected('View management screens','changeDocumentViewerForm')   
     
    109110        '''
    110111        view it
    111         @param mode: defines which type of document is behind url (text,images or auto)
     112        @param mode: defines how to access the document behind url
    112113        @param url: url which contains display information
    113         @param viewMode: if images display images, if text display text, default is images
     114        @param viewMode: if images display images, if text display text, default is images (text,images or auto)
    114115       
    115116        '''
     
    134135                viewMode="images"
    135136               
    136 
    137137        return pt(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode)
    138138 
     
    153153        return url
    154154
     155
     156    def getInfo_xml(self,url,mode):
     157        """returns info about the document as XML"""
     158
     159        if not self.digilibBaseUrl:
     160            self.digilibBaseUrl = self.findDigilibUrl() or "http://nausikaa.mpiwg-berlin.mpg.de/digitallibrary"
     161       
     162        docinfo = self.getDocinfo(mode=mode,url=url)
     163        pt = getattr(self.template, 'info_xml')
     164        return pt(docinfo=docinfo)
     165
    155166   
    156167    def getStyle(self, idx, selected, style=""):
     
    161172        else:
    162173            return style
    163        
     174
    164175       
    165176    def isAccessible(self, docinfo):
Note: See TracChangeset for help on using the changeset viewer.