Changeset 8275


Ignore:
Timestamp:
20/04/12 15:44:40 (7 years ago)
Author:
gparton
Message:

amendments to search function on base.html, update of search page and modification to display

Location:
mauRepo/MolesManager/trunk/src/MolesManager
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/MolesManager/static/js/cedaObservation.js

    r8273 r8275  
    5151                pubDetails['pubMonth'] = timeLead0(coObs.resultTime.position.dateTime8601.month) 
    5252                pubDetails['pubDay'] = timeLead0(coObs.resultTime.position.dateTime8601.day) 
    53                 pubDetails['pubString'] = '<p> Record Status: <b>'+ pubDetails['pubType'] +'</b><br /> Created: <b>' + pubDetails['pubYear'] +'-'+ pubDetails['pubMonth'] + '-' + pubDetails['pubDay']+'</b></p>'; 
     53                pubDetails['pubString'] = '<p> Record Status: <b>'+ pubDetails['pubType'] +'</b><br /> Available: <b>' + pubDetails['pubYear'] +'-'+ pubDetails['pubMonth'] + '-' + pubDetails['pubDay']+'</b></p>'; 
    5454                return pubDetails 
    5555        } 
  • mauRepo/MolesManager/trunk/src/MolesManager/static/templates/base.html

    r8264 r8275  
    7070                 
    7171                <div class="header-bottom"> 
    72                         <div class="grid_4 push_8"> 
     72                        <div class="grid_9 push_3"> 
    7373                 
    7474                                        <script type="text/javascript"> 
     
    9898                                        {% csrf_token %} 
    9999         
    100                                                 <div class="fieldWrapper claro"> 
     100                                        <!--    <div class="fieldWrapper claro"> 
    101101                                                        <label for="id_obj_id">Search:</label> 
    102102                                                        <input type="text" name="searchTerm" value= "" 
     
    106106                                                 
    107107                                                </div> <!-- End of div fieldWrapper --> 
    108                                                 <div id="advancedSearch"><p><a href="/search">+Advanced Search</a></p></div> 
    109                                          
    110                                         </div> <!-- End of div myForm -->                                
     108                                        <form method=POST name="searchAll" action="http://badc.nerc.ac.uk/cgi-bin/search/select_search"> 
     109                                        <input type="hidden" name=badc_only value="n"> 
     110                                        <input type="hidden" name=year value="any"> 
     111                                        <center> 
     112                                        <table border=0 > 
     113 
     114                                        <tr> 
     115                                                <td><b>Search for:</b></td> 
     116                                                <td><input name="SEARCH_STRING" type="text" size="25" maxlength="50"></td> 
     117                                                <td nowrap><b>in: &nbsp; </b></td><td> CEDA <input type="radio" name="SEARCH_WHAT" checked value="BROWSE" /> &nbsp; <input type="radio" name="SEARCH_WHAT" value="DISCOVERY" />  NERC Data Catalogue Service <INPUT TYPE="SUBMIT" VALUE="Search"></td> 
     118                                        </tr> 
     119                                        </table> 
     120                                        </center> 
     121                                </div> <!-- End of div myForm --> 
     122                                 
    111123                        </div> <!-- End of div grid_4 push_8 --> 
    112                          
     124                        <!-- <div id="advancedSearch" class="grid_3 push8"><p><a href="/search">+Advanced Search</a></p></div> 
     125                        --> 
    113126                </div> <!-- End of div header-bottom --> 
    114127        </div> <!-- End of div header --> 
  • mauRepo/MolesManager/trunk/src/MolesManager/static/templates/index.html

    r8244 r8275  
    1919                <div id="box2" class="grid_5">  
    2020                <h3>Using this Catalogue</h3> 
    21            <p>This catalogue is still in its development stage and content may occasionally change and be un-available. Users wishing to explore CEDA's operational metadata catalogue shoudl go to: <a href="http://badc.nerc.ac.uk/discovery?searchString=tet&atomTypeID=All--All&searchTarget=Browse&textTarget=Atom">CEDA Data Catalogue</a></p> 
     21           <p>This catalogue is still in its development stage and content may occasionally change and be un-available. Users wishing to explore CEDA's operational metadata catalogue shoudl go to: <a href="http://badc.nerc.ac.uk/discovery?searchString=&atomTypeID=DE+-+NOT+YET+SET+UP--DE&searchTarget=Browse&textTarget=Atom">CEDA Data Catalogue</a></p> 
    2222           <p>This catalogue, however, has a finer data granularity  - i.e. has a more detail about the data in our archives - and will still enable users to discover and access data. The first step is to search for data using the search function on the top right of the screen. Entering a character string will search for matching text in the titles of the entries in the catalogue (other search options will be added in due course.</p> 
    2323           <h3>Further Information</h3> 
  • mauRepo/MolesManager/trunk/src/MolesManager/urls.py

    r8267 r8275  
    11from django.conf.urls.defaults import patterns, url 
    22from settings import SERVE_STATIC_CONTENT, STATIC_ROOT 
     3from django.views.generic.simple import redirect_to 
    34 
    45# Uncomment the next two lines to enable the admin: 
     
    3031urlpatterns += patterns('MolesManager.views.cedaSearch', 
    3132 
    32     (r'search/$', 'coSearch'), 
     33    (r'search/$',  'coSearch'), 
     34     #redirect_to, {'url': 'http://www.ceda.ac.uk'}),#'coSearchRedirect'), 
    3335    ) 
    3436 
  • mauRepo/MolesManager/trunk/src/MolesManager/views/cedaSearch.py

    r8245 r8275  
    3131    c = {}     
    3232    if 'searchTerm' in request.POST: 
    33         c['records'] = __doSearch(request, request.POST['searchTerm'])             
    34     c.update(csrf(request))    
    35     return render_to_response('cedaSearch.html', c) 
     33        c['records'] = __doSearch(request, request.POST['searchTerm']) 
     34        print c['records']             
     35    c.update(csrf(request)) 
     36    if c == {} : 
     37        return render_to_response('cedaObservation.html', c)   
     38    else : 
     39        return render_to_response('cedaSearch.html', c) 
Note: See TracChangeset for help on using the changeset viewer.