Changeset 5920 for MILK


Ignore:
Timestamp:
30/10/09 16:54:47 (10 years ago)
Author:
sdonegan
Message:

Updated for new functionality for showing services

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/templates/meta.kid

    r5881 r5920  
    4040    <div py:def="Services()" id="ServiceList"> 
    4141        <table cellspacing="0" cellpadding="3" width=" 100%" border="0"><tbody> 
     42         
     43            <!-- Add anchor point so links from all results page to links and services come straight here --> 
     44            <a name="linksAndServices"/> 
     45         
    4246            <tr><td class="linehead" colspan="3"><span class="headingO">Links and Services</span></td></tr> 
    4347            <tr py:for="s in c.doc.services"> 
     
    4650                
    4751                isWMC = False 
     52                 
     53                 
     54                #check for wms, wfs, wcs, vis in contentTypes - according to types on vocab dif accepted terms list 
     55                if 'WEB MAP SERVICE' in t: 
     56                    t = 'WMS' 
     57                     
     58                if 'WEB COVERAGE SERVICE' in t: 
     59                    t = 'WCS' 
     60                     
     61                if 'WEB FEATURE SERVICE' in t: 
     62                    t = 'WFS' 
     63                     
     64                if 'ACCESS MAP VIEWER' in t: 
     65                    t = 'VIS' 
    4866                 
    4967                 
     
    5876                        'VIEW EXTENDED METADATA':g.icons_B, 
    5977                        'DISCOVERY':g.icons_D, 
    60                         'R':g.icons_R}[t] 
     78                        'R':g.icons_R,'WMS':g.wmsIcon,'WCS':g.wcsIcon,'WFS':g.wfsIcon,'VIS':g.visIcon}[t] 
    6179                except: 
    6280                    icon=g.icons_R 
    6381                ?> 
    6482                <td width="20%" py:if="isWMC"> 
     83                scooby doo $g.server 
    6584                        <span py:replace="linkimage(g.server + '/viewItems?ENDPOINT=' + s.url,icon,s.description)" py:strip="True"/> 
    6685                </td> 
     
    6988                </td> 
    7089                <td>${s.description}</td> 
     90                 
     91                <!-- Add in the actual URL of service so user can cut and paste --> 
     92                <td> 
     93                ${s.url} 
     94                </td> 
     95                 
     96                 
    7197            </tr> 
    7298            <tr py:if="c.doc.ndgObject is not None"> 
     
    215241            #discoveryViewLink passed from d.binding, coding for which is deep down somewhere.  Just parse and strip out the url for now.. 
    216242            #..and can add anchor for links and service in at this point too.. 
    217             discoveryViewLink=discoveryViewLinkBinding 
     243            discoveryViewLink=discoveryViewLinkBinding + '#linksAndServices' 
    218244             
    219245        ?> 
     
    243269        <!-- now formulate buttons to add to links and services bar --> 
    244270        <span py:if="numWMS > 0"> 
    245             <input type="button" alt="$numWMS OGC Web Map Services available - click for more info" value="$numWMS WMS available" onclick="window.location.href='$discoveryViewLink'"/> 
     271            <input type="button" class="txtButtons_WMS" alt="$numWMS OGC Web Map Services available - click for more info" value="$numWMS WMS available" onclick="window.location.href='$discoveryViewLink'"/> 
    246272        </span> 
    247273        <span py:if="numWCS > 0"> 
    248             <input type="button" alt="$numWCS OGC Web Coverage Services available - click for more info" value="$numWCS WCS available"/> 
     274            <input type="button" class="txtButtons_WCS" alt="$numWCS OGC Web Coverage Services available - click for more info" value="$numWCS WCS available" onclick="window.location.href='$discoveryViewLink'"/> 
    249275        </span> 
    250276        <span py:if="numWFS > 0"> 
    251             <input type="button" alt="$numWFS OGC Web Feature Services available - click for more info" value="$numWFS WCS available"/> 
     277            <input type="button" class="txtButtons_WFS" alt="$numWFS OGC Web Feature Services available - click for more info" value="$numWFS WCS available" onclick="window.location.href='$discoveryViewLink'"/> 
    252278        </span> 
    253279        <span py:if="numVis > 0"> 
    254             <input type="button" alt="$numVis Data Visualisation Services - click for more info" value="$numVis Visualisations available"/> 
     280            <input type="button" class="txtButtons_VIS" alt="$numVis Data Visualisation Services - click for more info" value="$numVis Visualisations available" onclick="window.location.href='$discoveryViewLink'"/> 
    255281        </span> 
    256282                 
     
    308334         
    309335        abslen = len(d.abstract) 
    310          
     336              
    311337        if len(d.timeCoverage)==1: 
    312338            tc=d.timeCoverage[0] 
     
    355381                <span py:replace="serviceIcons([d.binding])"/>     <!-- Discovery View link -->        
    356382                <span py:replace="serviceIcons(d.services)"/>      <!-- Logos, homepage etc etc -->  
     383                 
     384                <br/><span class="ndgem" py:if="d.serviceCounter > 0">Services:</span> 
    357385                <span py:replace="serviceButtons(d.services,d.discoveryViewURL)"/>    <!-- Buttons for links to wms, wcs, vis services etc --> 
    358                 $d.binding 
     386                 
    359387            </td> 
    360388            <td>${tc[0]}</td> 
Note: See TracChangeset for help on using the changeset viewer.