Ignore:
Timestamp:
02/02/07 20:33:23 (15 years ago)
Author:
lawrence
Message:

Further modifications to support xml versions of displayed records in
discovery.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI07-MOLES/trunk/PythonCode/wsgi/renderEntity.py

    r2097 r2098  
    3939        elif entity.metadataType=='DIF': 
    4040                contentHTML=renderDataContent(entity) 
    41                 relatedHTML=renderDataLinks(entity)+relatedHTML 
     41                #relatedHTML=renderDataLinks(entity)+relatedHTML 
    4242                serviceHTML=self.renderServices(entity) 
    4343        else: 
     
    6565                <tr><td class="lineHead" colspan="3"> 
    6666                <span class="headingO">Links and Services</span></td></tr>''' 
    67         if entity.binding is not None: 
    68             xicon=hyperlink(image(self.config.get('layout','Xicon'),'[X]'),entity.binding.url+'&type=xml') 
    69             html+='<tr><td width="20%%">%s</td><td> This record rendered in XML </td></tr>'%xicon 
    70             picon=hyperlink(image(self.config.get('layout','printer'),'[Print]'),entity.binding.url+'&type=print') 
    71             html+='<tr><td>%s</td><td> Printable version of XML content</td></tr>'%picon 
     67 
    7268        s=renderService(self.config) 
    7369        for item in entity.services: 
    7470            html+='<tr><td>%s</td><td>%s</td></tr>'%(s.get(item),item.description) 
    75         html+='</tbody></table>' 
    7671         
    7772        if entity.ndgObject is not None: 
    78             if entity.ndgObject.gettable: 
    79                 xicon=hyperlink(image(self.config.get('layout','Xicon'),'[X]'),entity.ndgObject.xmlURL) 
    80                 html+='<tr><td width="20%%">%s</td><td> Downloadable XML version of this record </td></tr>'%xicon 
    81                 picon=hyperlink(image(self.config.get('layout','printer'),'[Print]'),entity.ndgObject.printableURL) 
    82                 html+='<tr><td>%s</td><td> Viewable XML version of this record</td></tr>'%picon 
     73            print 'Render says gettable is :', entity.ndgObject.gettable 
     74            xicon=hyperlink(image(self.config.get('layout','Xicon'),'[X]'),entity.ndgObject.xmlURL) 
     75            html+='<tr><td width="20%%">%s</td><td> Downloadable XML version of this record </td></tr>'%xicon 
     76            picon=hyperlink(image(self.config.get('layout','printer'),'[Print]'),entity.ndgObject.printableURL) 
     77            html+='<tr><td>%s</td><td> Viewable XML version of this record</td></tr>'%picon 
     78        html+='</tbody></table>' 
    8379        return html 
    8480 
Note: See TracChangeset for help on using the changeset viewer.