Changeset 2675 for TI05-delivery


Ignore:
Timestamp:
29/06/07 22:15:47 (12 years ago)
Author:
lawrence
Message:

Interim commit in support of browse and discovery.

Location:
TI05-delivery/ows_framework/trunk/ows_server/ows_server
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/config/ndgDiscovery.config

    r2674 r2675  
    4343###### user customisable: 
    4444localLink:      http://ndg.nerc.ac.uk/ 
    45 localImage:     %(layout)sndg_logo.gif 
     45localImage:     %(layout)sndg_logo_circle.gif 
    4646localAlt:       visit badc 
    4747###### ought to be the end of the customisations 
    4848ndgLink:        http://ndg.nerc.ac.uk/ 
    49 ndgImage:       %(layout)sndg_logo.gif 
     49ndgImage:       %(layout)sndg_logo_circle.gif 
    5050ndgAlt:         visit ndg 
    5151stfcLink:       http://ceda.stfc.ac.uk/ 
     
    5757printer:        %(layout)sprinter.gif 
    5858helpIcon:       %(layout)shelp_icon.gif 
    59 HdrLeftAlt:     %(layout)sNatural Environment Researhc Council 
     59HdrLeftAlt:     %(layout)sNatural Environment Research Council 
    6060HdrLeftLogo:    %(layout)sNERC_Logo.gif 
    6161 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/discovery.py

    r2672 r2675  
    167167                    return render_response('content') 
    168168                c.xml=renderDiscoverySet(difs,state,self.cf) 
    169                 print self.oneLineSearch() 
    170169                f=file('debug-dif.xml','w') 
    171170                f.write(c.xml) 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/login.py

    r2674 r2675  
    88        #where are we going back to? 
    99        self.inputs=dict(parse_querystring(request.environ)) 
    10         print self.inputs 
    1110        if 'r' in self.inputs: 
    1211            c.returnTo=self.inputs['r'] 
     
    2221        session['panelView']='History' 
    2322        session.save() 
     23         
    2424        # and now go back to whence we had come 
    25         try: 
    26             h.redirect_to(c.returnTo) 
    27         except: 
    28             #Dom added this try except as the http redirect was failing if controller accessed directly e.g. through http://localhost:8080/login 
    29             return 'Logged in' 
    30          
     25        if c.returnTo!='': 
     26            try: 
     27                h.redirect_to(c.returnTo) 
     28            except: 
     29                pass 
     30        c.xml='<p> Login Successful </p>' 
     31        return render_response(content) 
     32             
    3133    def wayf(self): 
    3234        ''' NDG equivalent to Shibboleth WAYF ''' 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/retrieve.py

    r2674 r2675  
    7676            elif self.uri.schema=='DIF': 
    7777                r='dif' 
    78                 c.doc=DIF.DIF(x.tree,et=1) 
     78                c.doc=DIF.DIF(x.tree,et=1,ndgObj=self.uri) 
    7979                name=c.doc.name 
    80                 print c.doc.parameters 
     80                print c.doc.ndgObject 
    8181            elif self.uri.schema=='NumSim': 
    8282                r='numsim' 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/lib/base.py

    r2667 r2675  
    55from pylons.helpers import abort, redirect_to, etag_cache 
    66from pylons.i18n import N_, _, ungettext 
     7from paste.request import construct_url 
    78import ows_server.models as model 
    89import ows_server.lib.helpers as h 
     
    2627        # is under environ['pylons.routes_dict'] should you want to check 
    2728        # the action or route vars here 
     29        c.requestURL=construct_url(environ) 
    2830        return WSGIController.__call__(self, environ, start_response) 
    2931     
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/public/layout/ndg2.css

    r2672 r2675  
    3737} 
    3838 
    39 .searchBar { 
    40 text-align:right; 
    41 margin-top: 2px; margin-bottom: 2px; background-color:  #f0f0f0; 
    42 font-weight:bold; 
    43 } 
    44 .searchBar #loginBar {text-align:right;} 
     39.searchBar {margin-top: 2px; background-color:  #f0f0f0; font-weight:bold;} 
     40.searchBar table {padding-left:10px; padding-bottom:0px; margin:0px;} 
    4541/* .searchOneLine {margin-top: 2px; margin-bottom: 2px; background-color: #f0f0f0; text-align:right; font-size:100%;} */ 
    4642 
    4743#Header {color: black; background-color: white; text-align: center; margin-bottom: 10px; padding-top: 3px; padding-right: 0px; padding-left: 0px; padding-bottom: 0px; font-size: medium; font-weight:bold; color:white} 
    48 #Header table {padding:20px;} 
     44#Header table {margin:0px; padding:20px;} 
    4945 
    5046/* Left Column if Necessary */ 
     
    147143 
    148144/* And now the footer */ 
    149  
    150 #Footer  { color: #999999; background-color: #f4f4f4; margin-bottom: 25px; padding-top: 3px; padding-right: 10px; padding-left: 10px; clear: both; border-top: 2px solid #3c78b5; margin-top:10px; font-size:80%;} 
     145#Footer  { color: #999999; background-color: #eeeeee; margin-bottom: 25px; padding-top: 3px; padding-right: 10px; padding-left: 10px; clear: both; border-top: 2px solid #333333; margin-top:10px; font-size:80%; border-bottom: 2px solid #333333;} 
    151146 
    152147/* Footer not yet checked */ 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/dif.kid

    r2655 r2675  
    1 <html py:extends="'ndgPage.kid'" xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"> 
     1<html py:extends="ndgPage.kid,meta.kid" xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"> 
    22 
    33    <head py:replace="pagehead()"/> 
     
    55    <div id="entirepage"> 
    66        <div py:replace="header()"/> 
     7        <div py:replace="searchOneLine()"/> 
    78        <!--! The if on the call to the left panel needs to be here for subtle css reasons --> 
    89        <div py:if="'ndgSec' in session" py:replace="leftpanel()" id="Left"/> 
     
    1819                </div> 
    1920                <div py:replace="ParameterList(c.doc.parameters)"/>  
     21                <div py:replace="Coverage()"/> 
     22                <div py:replace="Sensors()"/> 
     23                <div py:replace="Sources()"/> 
     24                <div py:replace="Curator()"/> 
     25                <div py:replace="Services()"/> 
    2026            </div> 
    2127        </div> 
     
    2632        <div py:replace="footer()"/> 
    2733    </div> 
     34     
     35     
     36     
    2837    </body> 
    2938</html> 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/ndgPage.kid

    r2672 r2675  
    2828        <table width="100%"><tr><td align="left"> 
    2929        <form action="$g.discoveryURL"> 
    30         New Search&nbsp;<input type="text" size="25" name="searchString"/> 
     30        Free Text Search&nbsp;<input type="text" size="25" name="searchString"/> 
    3131            <select name="textTarget"> 
    3232            <option value="Authors">Authors</option> 
     
    7878    </div> 
    7979     
    80     <!-- Parameter list class, used in StubB and DIF --> 
    81      
    82     <div py:def="ParameterList(params)" class="ParameterList"> 
    83         <table cellspacing="0" cellpadding="3" border="0" width="100%"><tbody> 
    84             <tr><td class="linehead"><span class="heading0"> Parameters</span></td></tr> 
    85             <span py:for="item in params"> 
    86                 <tr><td class="rowhead">$item</td></tr> 
    87                 <?python 
    88                 #need to make sure keyword with spaces are not split inappropriately 
    89                 keywords=[] 
    90                 for word in params[item]: 
    91                     keywords.append(word.replace(' ','&nbsp;')) 
    92                 keywords='; '.join(keywords) 
    93                 ?> 
    94                 <tr py:if="params[item]!=[]"><td>$keywords</td></tr> 
    95             </span> 
    96         </tbody></table> 
    97     </div> 
    98      
    99      
    10080    <!-- Page Footer follows --> 
    10181 
     
    146126    <span py:def="logOut()" class="logOut"> 
    147127        <form action="$g.logout"> 
    148             <input type="hidden" name="r" value="$g.server${h.url_for()}"/> 
     128            <input type="hidden" name="r" value="$c.requestURL"/> 
    149129            <input type="submit" value="Logout"/> 
    150130        </form> 
     
    153133    <span py:def="logIn()" class="logIn"> 
    154134        <form action="$g.wayfuri"> 
    155             <input type="hidden" name="r" value="$g.server${h.url_for()}"/> 
     135            <input type="hidden" name="r" value="$c.requestURL"/> 
    156136            <input type="submit" value="Login"/> 
    157137        </form> 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/stubB.kid

    r2672 r2675  
    1 <html py:extends="'ndgPage.kid'" xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"> 
     1<html py:extends="ndgPage.kid,meta.kid" xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"> 
    22 
    33    <head py:replace="pagehead()"/> 
     
    6161                </div> <!-- DeploymentList --> 
    6262                 
     63                <div py:replace="Services()"/> 
    6364                 
    64                 <div id="ServiceList"> 
    65                     <table cellspacing="0" cellpadding="3" width=" 100%" border="0"><tbody> 
    66                       <tr><td class="linehead" colspan="3"><span class="headingO">Links and Services</span></td></tr> 
    67                       <!-- s=renderService(self.config)  
    68                       <tr py:for="item in c.doc.services"><td>$s.get(item)<td><tr> 
    69                       --> 
    70                       <tr py:if="c.doc.ndgObject is not None"> 
    71                         <td width="20%"><span py:replace="linkimage(c.doc.ndgObject.xmlURL,c.icons_xml,'[XML]')"/></td> 
    72                         <td>Downloadable XML version of this record</td> 
    73                       </tr> 
    74                       <tr py:if="c.doc.ndgObject is not None"> 
    75                         <td width="20%"><span py:replace="linkimage(c.doc.ndgObject.printableURL,c.icons_prn,'[HTML]')"/></td> 
    76                         <td>Viewable XML version of this record</td> 
    77                       </tr> 
    78                     </tbody></table> 
    79                 </div> <!-- ServiceList --> 
    80        
    8165                <center> 
    8266                <p>Not all information in this record may be rendered in this view. Please see the XML version for complete 
Note: See TracChangeset for help on using the changeset viewer.