Changeset 1895 for TI07-MOLES


Ignore:
Timestamp:
19/12/06 12:29:21 (12 years ago)
Author:
lawrence
Message:

Modifications to support tooltips on the inrecord icon links

Location:
TI07-MOLES/trunk/PythonCode/browse/portal/cgi
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/browse/DiscoveryGUI.py

    r1868 r1895  
    131131            difs=[] 
    132132            for result in results: difs.append(DIF(result,serviceFile=self.serviceFile,et=1)) 
    133             self.html+=renderDiscoverySet(difs,state, 
     133            if results==[]: 
     134               self.html+='<p>No results for "%s"!</p>'%searchString 
     135            else: 
     136               self.html+='<p>Search results for "%s":</p>'%searchString 
     137               self.html+=renderDiscoverySet(difs,state, 
    134138                               summary=1,spatial=1,temporal=1,services=1) 
    135139                                
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/browse/ServiceBinding.py

    r1317 r1895  
    3535        ''' Set icon type t, or if it doesn't exist, use RELATED ''' 
    3636        self.icon=self.get(t,'icon') 
    37         if self.icon is None: 
    38             self.seticon('RELATED') 
    39         else: self.iconalt=self.get(t,'icon_alt') 
     37        self.title=self.get(t,'icon_title') 
     38        self.iconalt=self.get(t,'icon_alt') 
     39        if self.icon is None:  self.seticon('RELATED') 
    4040    def do(self,serviceType,dataProvider): 
    4141        '''  Return an actual endpoint for a given service from the data provider, e.g. 
     
    126126        def icon(self): 
    127127            ''' return html icon linking to specific service ''' 
    128             return hyperlink(image(self.serviceMap.icon,self.serviceMap.iconalt),self.url) 
     128            return hyperlink(image( 
     129                self.serviceMap.icon,self.serviceMap.iconalt,t=self.serviceMap.title),self.url) 
    129130        def __makeuri(self,s,r,l): 
    130131            ''' Actually create the URI ''' 
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/browse/htmlUtilities.py

    r1182 r1895  
    1616    return '<span class="%s">%s</span>'%(id,x) 
    1717 
    18 def hyperlink(n,u): 
     18def hyperlink(n,u,t=None): 
    1919    ''' Make a hyperlink ... provided there is an address to jump to ''' 
    2020    if u !='': 
    21         return '<a href="%s">%s</a>'%(u,n) 
     21        if t is None: 
     22            return '<a href="%s">%s</a>'%(u,n) 
     23        else: 
     24            return '<a href="%s" title="%s">%s</a>'%(u,n,t) 
    2225    else: return n 
    2326     
    24 def image(l,a): 
    25     return '<img src="%s" alt="%s"/>'%(l,a) 
     27def image(l,a,t=None): 
     28    if t is None: 
     29        return '<img src="%s" alt="%s"/>'%(l,a) 
     30    else: 
     31        return '<img src="%s" alt="%s" title="%s"/>'%(l,a,t) 
    2632 
    2733def abbreviate(string,newlen): 
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/browse/serviceMap.config

    r1645 r1895  
    1313icon_alt: A Service 
    1414service_name: A 
     15icon_title: LINKS to a DATA BROWSE view of this dataset 
    1516instance: datasetURI_%s 
    1617 
     
    1920icon: %(layout)s/B.gif 
    2021icon_alt: B Service 
     22icon_title: Links to a METADATA BROWSE view of this dataset 
    2123service_name: B 
    2224instance: uri 
     
    2628icon_alt: Related 
    2729service_name: Related 
     30icon_title: Links to a RELATED URL 
    2831instance: uri 
    2932 
     
    3538default: %(localhost)s/browse.py 
    3639instance: D=1&uri 
     40icon_title: Links to the DISCOVERY RECORD for this dataset 
  • TI07-MOLES/trunk/PythonCode/browse/portal/cgi/discovery/DiscoveryService_services.py

    r1879 r1895  
    1414# Locator 
    1515class DiscoveryServiceLocator: 
    16     DiscoveryServicePortType_address = "http://hermes.neodc.rl.ac.uk:8080/axis2/services/DiscoveryService" 
     16    DiscoveryServicePortType_address = "http://glue.badc.rl.ac.uk:8080/axis2/services/DiscoveryService" 
    1717    def getDiscoveryServicePortTypeAddress(self): 
    1818        return DiscoveryServiceLocator.DiscoveryServicePortType_address 
Note: See TracChangeset for help on using the changeset viewer.