Changeset 2760 for TI05-delivery


Ignore:
Timestamp:
03/08/07 12:02:01 (12 years ago)
Author:
lawrence
Message:

Adding help to results page. Adding initial support for semantic search.

Location:
TI05-delivery/ows_framework/trunk/ows_server/ows_server
Files:
6 edited

Legend:

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

    r2748 r2760  
    4141    map.connect('wayf', controller='login', action='wayf') 
    4242    map.connect('logout', controller='logout') 
     43    map.connect('semantic',controller='discovery', action='semantic') 
    4344    map.connect('view/:uri', controller = 'retrieve', action='view') 
    4445    map.connect('askCorrect/:uri', controller='retrieve', action='askCorrect') 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/discovery.py

    r2757 r2760  
    183183                    c.state=state 
    184184                    c.difs=difs 
     185                    c.querystring='searchString=%s&textTarget=%s'%(request.params['searchString'],request.params['textTarget']) 
    185186                    return render_response('results') 
    186187                 
     
    247248        return constraints(dateRange=dateRange,bbox=bbox,scope=scope,searchString=searchString) 
    248249         
    249     def oneLineSearch(self): 
    250         try: 
    251             discoveryURL=self.cf.get('SEARCH','discoveryURL') 
    252             oneLiner=DiscoveryTemplate.oneLiner 
    253         except: 
    254             return 'Error, invalid configuration for search interface' 
    255         return DiscoveryTemplate.searchTextOneLine%locals()   
     250    #def oneLineSearch(self): 
     251    #    try: 
     252    #        discoveryURL=self.cf.get('SEARCH','discoveryURL') 
     253    #        oneLiner=DiscoveryTemplate.oneLiner 
     254    #    except: 
     255    #        return 'Error, invalid configuration for search interface' 
     256    #    return DiscoveryTemplate.searchTextOneLine%locals()   
     257     
     258    def semantic(self): 
     259        c.constraints=request.environ['QUERY_STRING'] 
     260        return render_response('semantic',fragment=True) 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/public/layout/ndg2.css

    r2759 r2760  
    3737} 
    3838 
    39 .searchBar {margin-top: 2px; background-color:  #f0f0f0; font-weight:bold;} 
    40 .searchBar table {padding-left:10px; padding-bottom:0px; margin:0px;} 
     39.searchBar {margin-top: 2px; background-color:  #f0f0f0; } 
     40.searchBar table {padding-left:10px; padding-bottom:0px; margin:0px;font-weight:bold;} 
     41.searchBar .hidden {display:none} 
    4142/* .searchOneLine {margin-top: 2px; margin-bottom: 2px; background-color: #f0f0f0; text-align:right; font-size:100%;} */ 
    4243 
     
    147148 
    148149 
    149 #context { margin: 0 10px 0 10px; border:0; color:#571512;}  
    150 #synonyms { margin: 0 10px 0 10px; border:0; color:#571512;}  
    151 .syno {} 
     150#context { margin: 5px 10px 5px 10px; border:0; color:#571512;} 
     151#SemanticSearchBox{margin: 0px 0px 0px 0px; border:0}  
     152#SemanticSearchResults { margin: 5px 10px 5px 10px; border:0; color:#571512;}  
    152153.resultsBar {text-align:right; margin: 2px 10px 2px 10px; border:0;} 
     154.resultsBar .hidden {display:none;} 
     155.resultsBar .resultsLeft {float:left} 
    153156 
    154157#resultsTab thead {background-color: #075993; color:#FFFFFF; margin: 0px 10px 0px 10px;}  
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/meta.kid

    r2755 r2760  
    134134                    <span py:replace="abbreviate(d.abstract,200,d.binding.url)"/> 
    135135                <br/> 
    136                 <span class="ndgem"> Sourced from:</span>${XML(d.centre.url())} 
     136                <span class="ndgem"> Sourced from:</span>&nbsp;${XML(d.centre.url())} 
    137137                &nbsp;<span class="ndgem">Links:</span> 
    138138                <span py:replace="serviceIcons([d.binding])"/> 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/ndgPage.kid

    r2759 r2760  
    4040        <table width="100%"><tr><td align="left"> 
    4141        <form action="$g.discoveryURL"> 
    42         Free Text Search&nbsp;<input type="text" size="25" name="searchString"/> 
     42            New Text Search<span py:replace="helpIcon('nts_help')"/>&nbsp; 
     43            <input type="text" size="25" name="searchString"/> 
    4344            <select name="textTarget"> 
    4445            <option value="Authors">Authors</option> 
     
    5455            <span py:replace="logIn()"/></span> 
    5556          </td></tr></table> 
     57          <div id="nts_help" class="hidden"> 
     58            <div class="helptxt"><p> This will do a completely new text search with no constraints beyond the target of the 
     59            text search from the drop down list (All, Authors, Parameters) </p></div> 
     60          </div> 
    5661    </div> 
    5762 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/templates/results.kid

    r2750 r2760  
    1515            <div id="context"> 
    1616                ${c.state.hits} results for ${c.state.searchString} (${XML(c.state.constraints)})</div> 
    17             <div py:if="c.state.alternatives is not None" id="synonyms"> 
    18                 You could also try: 
    19                 <span py:for="i in c.state.alternatives" class="syno">$i[0] [$i[1] hits]</span> 
    20             </div> 
     17            <div id="SemanticSearchBox"/> 
    2118             
    2219            <?python 
     
    2623            upper=c.state.offset+c.state.stride-1 
    2724            ?> 
    28             <div class="resultsBar"> 
    29                 <a href="${c.state.constrainedurl}"> Refine search</a>  
     25            <div class="resultsBar">  
     26                 <div class="resultsLeft"> 
     27                    ${XML(h.link_to_remote("Semantic Search",dict(update="SemanticSearchBox", 
     28                            url='%s?%s'%(h.url_for(action='semantic'),c.querystring))))} 
     29                    <span py:replace="helpIcon('semser_help')"/> 
     30                 </div> 
     31                 <div> 
     32                 <a href="${c.state.constrainedurl}"> Refine Search</a><span py:replace="helpIcon('refser_help')"/> 
    3033                | Found ${c.state.hits} | Showing ${c.state.offset}-$upper  
    3134                  <span py:if="p!=[]"> | <a href="$purl"> Previous ${p[1]}</a> </span> 
    32                   <span py:if="n!=[]"> | <a href="$nurl"> Next ${n[1]}</a></span> | 
     35                  <span py:if="n!=[]"> | <a href="$nurl"> Next ${n[1]}</a></span> | </div> 
     36                <div id="semser_help" class="hidden"> 
     37                    <div class="helptxt"><p> 
     38                    The semantic search option allows you to see how many hits a search using your current parameters would return if you 
     39                    used a slightly different vocabulary in your search term. 
     40                    </p></div> 
     41                </div> 
     42                <div id="refser_help" class="hidden"> 
     43                    <div class="helptxt"><p> 
     44                    The refined search option allows you to constrain your search by returning you to the advanced search page, but retaining your current search parameters 
     45                    </p></div> 
     46                </div> 
    3347            </div> 
    3448            <div id="resultsTab"> 
    3549                <table> 
    36                     <thead><tr><th rowspan="2">Dataset description</th><th colspan="2">Temporal coverage</th> 
     50                    <thead><tr><th rowspan="2">Dataset description</th><th colspan="2">Temporal&nbsp;coverage</th> 
    3751                        <th rowspan="2">Spatial coverage</th></tr> 
    3852                    <tr><th> Start date </th><th> End date </th></tr></thead> 
Note: See TracChangeset for help on using the changeset viewer.