Ignore:
Timestamp:
19/05/09 16:44:06 (11 years ago)
Author:
cbyrom
Message:

Improve look and feel of UI with tweaks to css + fix radio button
on search panel - set this explicitly as an input since htmlfill
doesn't handle the radio button defaults well + simplify template
logic for semantic search results + fix constraint summary string.

Location:
MILK/trunk/milk_server/milk_server
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/controllers/browse/discovery.py

    r5306 r5314  
    450450            if searchConstraints['geoSearchType']: 
    451451                c.geoSearchType = searchConstraints['geoSearchType'] 
     452                 
     453        # NB, htmlfill doesn't handle the checked property correctly, so need 
     454        # to add this explicitly here 
     455        if 'source' not in self.inputs: 
     456            self.inputs['source'] = 'NERC_DDC' 
    452457         
    453458        return self.savePageAndRender("browse/discovery_search", **self.inputs) 
  • MILK/trunk/milk_server/milk_server/controllers/home.py

    r5299 r5314  
    5353            # replace any browse links with to links to editor 
    5454            html = html.replace(VTD.BROWSE_SERVER_URL, g.server) 
    55              
     55 
    5656            # NB, need html in unicode for for htmlfill.render 
    5757            html = unicode(html, 'utf-8', 'xmlcharrefreplace') 
  • MILK/trunk/milk_server/milk_server/models/DiscoveryState.py

    r5306 r5314  
    8484        if c: 
    8585            c += ', ' 
     86 
    8687        c += 'Bounding box: ' 
    8788        if bbox is None or bbox==['90.0','-180.0','180.0','-90.0']: 
     
    9192            c+='%s latitude %s to %sN and longitude %s to %sE' \ 
    9293                %(overlaps,bbox[3],bbox[0],bbox[1],bbox[2]) 
    93         if self.values['scope']:  
     94                 
     95        if self.values['scope']: 
     96            if c: 
     97                c += ', '  
    9498            c += 'Scope: %s'%self.values['scope'] 
    9599        if self.values['textTarget']: 
     100            if c: 
     101                c += ', '  
    96102            c += 'Target: %s'%self.values['textTarget'] 
    97103        return c 
  • MILK/trunk/milk_server/milk_server/public/layout/style/ndg2.css

    r5306 r5314  
    3939} 
    4040 
     41#pageTitle 
     42{ 
     43        padding:5px; 
     44} 
     45 
    4146.working  
    4247{ 
     
    103108        font-size:small; 
    104109} 
     110 
    105111.searchBar {margin-top: 2px; background-color:  #f0f0f0; } /* Change this color and you need to change the color in the pagetab current */ 
    106112.searchBar table {padding-left:10px; padding-bottom:0px; margin:0px;font-weight:bold;} 
  • MILK/trunk/milk_server/milk_server/templates/browse/browse_functions.html

    r5261 r5314  
    3030                </div> 
    3131            </div> 
    32                     <div py:replace="vocabSearchAutoComplete(showInfo = False)" /> 
     32                    <div py:replace="vocabSearchAutoComplete(showInfo = False)"/> 
    3333            <div class="searchHdr">Free text search <span py:replace="helpIcon('fts_help')"/></div> 
    3434            <div id="fts_help" class="hidden" > 
     
    7777               <label for="All"><input type="radio" name="source" value="All" id="All" />All</label> 
    7878               &nbsp;&nbsp;&nbsp; 
    79                <label for="nercddc"><input type="radio" name="source" value="NERC_DDC" id="nercddc" checked="checked"/>NERC Data Centres only</label> 
     79               <label for="nercddc"><input type="radio" name="source" value="NERC_DDC" id="nercddc"/>NERC Data Centres only</label> 
    8080           </div><br/>                   
    8181           <div id="SearchSubmit"> 
  • MILK/trunk/milk_server/milk_server/templates/browse/discovery_search.html

    r5299 r5314  
    4444    <div id="entirepage"> 
    4545        <div py:if="c.inputErrors" py:replace="displayErrorDict(c.inputErrors)"/> 
    46                 <h3>$c.title <a href="$g.server/getFeed/discovery"><img border="0" src="$g.feedIcon" alt="Atom feed for discovery service" title="Atom feed for discovery service"/></a> </h3> 
     46                <h3 id="pageTitle">$c.title <a href="$g.server/getFeed/discovery"><img border="0" src="$g.feedIcon" alt="Atom feed for discovery service" title="Atom feed for discovery service"/></a> </h3> 
    4747        <div class="outer"> 
    4848            <div class="inner"> 
  • MILK/trunk/milk_server/milk_server/templates/browse/semantic.kid

    r4487 r5314  
    33        <div id="SemanticSearchResults"> 
    44            <span py:if="c.semAvailable">You could also try - 
    5                 <span py:if="c.synonyms !=[]">  
     5                <span py:if="c.synonyms">  
    66                    synonym(s): <span py:for="i,url in c.synonyms"><a href="$url">$i</a>&nbsp;</span> 
    7                     <span py:if="c.narrower!=[] or c.broader!=[]">;</span> 
     7                    <span py:if="c.narrower or c.broader">;</span> 
    88                </span> 
    9                 <span py:if="c.narrower !=[]">  
     9                <span py:if="c.narrower">  
    1010                    narrower search(s): <span py:for="i,url in c.narrower"><a href="$url">$i</a>&nbsp;</span> 
    11                     <span py:if="c.broader!=[]">;</span> 
     11                    <span py:if="c.broader">;</span> 
    1212                </span> 
    13                 <span py:if="c.broader !=[]">  
     13                <span py:if="c.broader">  
    1414                    broader search(s): <span py:for="i,url in c.broader"><a href="$url">$i</a>&nbsp;</span> 
    15                 </span>. 
     15                </span> 
    1616            </span> 
    1717            <span py:if="not c.semAvailable">No alternatives available$c.semError</span> 
  • MILK/trunk/milk_server/milk_server/templates/vocabsearch/vocabsearch.html

    r5261 r5314  
    44        <xi:include href="../utils.html" /> 
    55 
    6         <div py:def="vocabSearchAutoComplete(showInfo = True)"> 
     6        <div py:def="vocabSearchAutoComplete(showInfo = True)" class="SearchBox"> 
    77 
    88                <link rel="stylesheet" type="text/css" href="$g.server/js/yui/autocomplete/assets/skins/sam/autocomplete.css" /> 
Note: See TracChangeset for help on using the changeset viewer.