Changeset 814
- Timestamp:
- 21/04/06 18:51:51 (15 years ago)
- Location:
- TI07-MOLES/trunk/StubB/XSLT/browse/portal
- Files:
-
- 14 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TI07-MOLES/trunk/StubB/XSLT/browse/portal/cgi/browseCGI.py
r801 r814 11 11 from secure import * 12 12 from stubB import * 13 from renderEntity import renderEntity 14 from renderPage import renderPage 13 15 14 16 def EvaluateCredentials(ac,securityMetadata): … … 102 104 historyHTML+='<a href="%s">%s</a></br>'%item 103 105 historyHTML+='</p>' 104 return parsedHTML.replace('PutNDGBrowseHistoryHere',historyHTML) 106 content=renderEntity(self.b) 107 return renderPage(content,historyHTML,historyHTML,self.b.name) 108 #return parsedHTML.replace('PutNDGBrowseHistoryHere',historyHTML) 105 109 else: 106 110 return self.error('Not Allowed') -
TI07-MOLES/trunk/StubB/XSLT/browse/portal/cgi/renderEntity.py
r813 r814 17 17 18 18 html=''' 19 <DIV id="EntityContent">19 <DIV id="EntityContent"> 20 20 <p></p> 21 21 <h5>%s</h5> … … 60 60 <tr><td class="line"><b>Data Creator</b><br/></td> 61 61 <td class="line">%s</td></tr>'''%c.toHTML() 62 63 html+='</tbody></table>' 62 64 63 65 return html -
TI07-MOLES/trunk/StubB/XSLT/browse/portal/cgi/renderPage.py
r813 r814 1 def renderPage(contentHTML,historyHTML,selectHTML, config,name):1 def renderPage(contentHTML,historyHTML,selectHTML,name): 2 2 3 3 ''' Renders the content of a browse page, using information from the entity … … 6 6 7 7 #Note layout images and stylesheets should be in the layout directory ... 8 #following should come from a config file 9 localLink='http://www.badc.rl.ac.uk' 10 localImage='/layout/bodc_logo.gif' 11 localAlt='visit badc' 12 ndgLink='http://ndg.nerc.ac.uk/' 13 ndgImage="/layout/ndg_logo.gif" 14 ndgAlt='visit ndg' 15 PageLogo='/layout/browse_header4.gif' 8 16 9 17 #set up html header … … 18 26 19 27 #now get the body layout 28 #note we have to escape the % ... 20 29 html+='''<body> 21 30 <DIV id="Header"> 22 <table style="WIDTH: 90% " border="0" cellspacing="0" cellpadding="0">31 <table style="WIDTH: 90%%" border="0" cellspacing="0" cellpadding="0"> 23 32 <tbody> 24 33 <tr> 25 <td width="3%"></td> 26 <td width="8%"> 27 <a href="%s"><img src=%s" alt="%s" border="0"/></a> 28 </td> 29 <td width="8%"> 34 <td width="3%%"></td> 35 <td width="8%%"> 30 36 <a href="%s"><img src="%s" alt="%s" border="0"/></a> 31 37 </td> 32 <td width="51%" align="center"> 33 <a href="%s"><img src="%s" border="0"/></a> 38 <td width="8%%"> 39 <a href="%s"><img src="%s" alt="%s" border="0"/></a> 40 </td> 41 <td width="51%%" align="center"> 42 <img src="%s" border="0"/></a> 34 43 </td> 35 44 <td> … … 56 65 </tbody> 57 66 </table> 58 </DIV>'''%(localLink,localImage,localAlt,ndgLink,ndgImage,ndgAlt,PageLogo 67 </DIV>'''%(localLink,localImage,localAlt,ndgLink,ndgImage,ndgAlt,PageLogo) 59 68 60 69 #now layout the main parts of the page (importing relevant HTML) … … 74 83 75 84 <DIV id="Content"> 76 <DIV style="CLEAR: none; LEFT: 0px; WIDTH: 98% ; TOP: 0px">77 <DIV style="CLEAR: none; WIDTH: 98% ">78 <TABLE cellSpacing="0" cellPadding="0" width="100% " border="0">85 <DIV style="CLEAR: none; LEFT: 0px; WIDTH: 98%%; TOP: 0px"> 86 <DIV style="CLEAR: none; WIDTH: 98%%"> 87 <TABLE cellSpacing="0" cellPadding="0" width="100%%" border="0"> 79 88 <TBODY> 80 89 <TR> … … 91 100 </TBODY> 92 101 </TABLE> 93 </DIV> 102 </DIV> 103 </DIV> 94 104 </DIV> 95 105 … … 99 109 </DIV> 100 110 </body> 101 </html>'''%(selectHTML, browseHTML,contentHTML)111 </html>'''%(selectHTML,historyHTML,contentHTML) 102 112 103 113 return html
Note: See TracChangeset
for help on using the changeset viewer.