Changes in [615:d6eca930a534:618:54d3498a6e78] in documentViewer


Ignore:
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • documentViewer.py

    r615 r618  
    2222def getMDText(node):
    2323    """returns the @text content from the MetaDataProvider metadata node"""
     24
     25   
     26
    2427    if isinstance(node, dict):
    2528        return node.get('@text', None)
    2629   
     30    if isinstance(node,list): #more than one text file if there is an attribute don't choose it
     31        for nodeInList in node:
     32            attr = nodeInList.get("@attr",None)
     33            if attr is None:
     34                return node.get('@text',None)
     35        return None
     36
     37
     38
    2739    return node
    2840
     
    256268            logging.error("template folder missing!")
    257269            return "ERROR: template folder missing!"
    258            
     270       
     271       
     272
    259273        if not getattr(self, 'digilibBaseUrl', None):
    260274            self.digilibBaseUrl = self.findDigilibUrl() or "http://digilib.mpiwg-berlin.mpg.de/digitallibrary"
     
    751765        # old style text URL
    752766        textUrl = getMDText(texttool.get('text', None))
     767
     768       
     769
     770
    753771        if textUrl and docPath:
    754772            if urlparse.urlparse(textUrl)[0] == "": #keine url
  • zpt/viewer/layer_image_annotator.zpt

    r599 r616  
    2424    dlOpts.annotationUser='$annUser';
    2525    dlOpts.annotatorPlugins=['Auth','Permissions','Store','Markdown','DigilibIntegrator'];
     26    dlOpts.annotationPageUri='$annUrl';
    2627    dlOpts.annotatorPluginSettings={'Store':{'annotationData':{'uri':'$annUrl','resource':'$resUrl'},'loadFromSearch':{'uri':'$annUrl'}},
    2728        'Permissions':{'read':[],'update':['$permUser'],'delete':['$permUser'],'admin':['$permUser']}};
Note: See TracChangeset for help on using the changeset viewer.