source: MILK/trunk/milk_server/milk_server/templates/browse/browse_functions.html @ 5987

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/MILK/trunk/milk_server/milk_server/templates/browse/browse_functions.html@5987
Revision 5987, 8.9 KB checked in by sdonegan, 11 years ago (diff)

Updated code to allow selection of text search type by radio button

Line 
1<!--! A collection of template definitions for use in atom output construction -->
2<html xmlns="http://www.w3.org/1999/xhtml" 
3        xmlns:py="http://genshi.edgewall.org/"
4        xmlns:xi="http://www.w3.org/2001/XInclude"
5        py:strip="">
6       
7    <xi:include href="../utils.html" />
8        <xi:include href="../vocabsearch/vocabsearch.html" />
9
10    <div py:def="searchTextInputs()">
11        <div class="contentWrap">
12            <p>The NERC Data Discovery Service allows you to find data resources held within the NERC DataGrid (NDG) catalogue. 
13            The catalogue makes data discovery easier as it connects data held in managed archives and other initiatives.</p>
14            <p>It is populated with 'discovery' metadata (information about data sets) harvested on a regular basis from the
15            NERC Data Centres and other providers in the UK and worldwide. </p>
16            <p>Choose one or more search categories to query the catalogue and return data sets of interest. 
17            Links to further information and/or data access are provided in the responses.</p>
18           
19            <!-- disabled from original "2 box" type entry -->
20           
21                   
22            <!-- ***********************************************************************************  -->
23           
24            <div class="searchHdr">Text Search </div>
25                         
26                <div class="RadioTextSearchBox">
27           
28                   
29                    <input type="radio" name="radioSearchType" value="free" id="free" onclick="Div_show('radioTxtSrchEntry');Div_hide('radioVocSrchEntry');removeSelection('vocab')"/>
30                    Free Text Search &nbsp;<span py:replace="helpIcon('fts_help')"/>
31                   
32                    <input type="radio" name="radioSearchType" value="vocab" id="vocab" checked="checked" onclick="Div_show('radioVocSrchEntry');Div_hide('radioTxtSrchEntry');removeSelection('free')"/>
33                    Vocab Assisted Text Search &nbsp;<span py:replace="helpIcon('term_search_help')"/>
34                   
35                </div>
36               
37               
38           
39           
40            <!-- Help divs -->
41            <div id="term_search_help" class="hidden" >
42                <div class="helptxt">
43                 <p>Vocab term search provides an autocomplete text field - which searches the vocabulary server
44                 for terms which match the input text - suggesting possible terms to use in a search.  Currently this looks at just the CF Standard names list hosted by BODC</p>
45                 <p>Note, the text field will ONLY accept valid vocab terms and when these are searched on, a
46                 standard text search, similar to that facilitated by the 'Free text search' input, is undertaken.
47                 Note, also, if both vocab term and free text data are input, both are used in the subsequent
48                 text search.</p>
49                 <p>
50                 Terms are only looked up after two characters are entered, to narrow options.  Additionally, it is
51                 possible to use the wildcard, '*' to match multiple letters in a term.</p>
52                </div>
53            </div>
54            <div id="fts_help" class="hidden" >
55                <div class="helptxt">
56                 <p>Free text search looks through the entire database of discovery documents, or it can be limited
57                    to the Author (dataset creator), or Parameter fields</p>
58                    <p> Note that it is possible to get a document returned which apparently does not include the
59                    search term; this can occur when the html view does not reflect the entire document content.
60                    The document pages include links to fuller and more original versions in viewable XML if you
61                    suspect this is occurring and wish to track down obscure matches.</p>
62                </div>
63            </div>
64           
65         
66            <div id="radioVocSrchEntry" class="radioVocSearchBox">           
67                <div class="SearchTxt">   
68                             
69                    <span class="noteTxt">Enter term for vocabulary assisted text search..</span>                         
70                    <span py:replace="vocabSearchAutoComplete(showInfo = False)"/>                       
71                   
72                </div>
73            </div>
74           
75            <div id="radioTxtSrchEntry" class="radioTxtSearchBox">           
76                <div class="SearchTxt">                   
77                    <span class="noteTxt">Enter text for semantic search....</span>                   
78                    <div class="SearchBox">                 
79                        <label for="searchString">
80                            <input name="searchString" type="text" id="searchString" size="45" value="$c.searchString"/>
81                        </label>
82                        <label for="textTarget">
83                            <select name="textTarget" id="textTarget">
84                                <option value="All" selected="selected">All</option>
85                                <option value="Authors">Authors</option>
86                                <option value="Params">Parameters</option> 
87                            </select>
88                        </label>                   
89                    </div>
90                </div>           
91            </div>
92         
93           
94            <!-- ***********************************************************************************  -->
95           
96                <div class="searchHdr">Temporal coverage (YYYY/MM/DD)&nbsp;<span py:replace="helpIcon('temcov_help')"/></div>
97            <div id="temcov_help" class="hidden">
98                <div class="helptxt">
99                    <p>You can find datasets which have data within a specific time range by using the temporal coverage</p>
100                </div>
101            </div>
102                <script type="text/javascript" src="$g.server/js/date-picker-v4/js/datepicker.js"></script>
103                <link href="$g.server/js/date-picker-v4/css/datepicker.css" rel="stylesheet" type="text/css" />
104            <div class="SearchStartDate">
105                    <span class="SearchTxt">Start date</span>
106                                <input type="text" id="startDateID" name="startDate" class="dateformat-Y-sl-m-sl-d" value="" />
107                        </div>
108           <div class="SearchEndDate">
109                <span class="SearchTxt">End date&nbsp;&nbsp;</span>
110                                <input type="text" id="endDateID" name="endDate" class="dateformat-Y-sl-m-sl-d" value="" />
111           </div>       
112               <div class="searchHdr">Source data providers <span py:replace="helpIcon('datpro_help')"/></div>
113           <div id="datpro_help" class="hidden">
114               <div class="helptxt">
115                        <p>Your search can be limited to NERC data centres alone</p>
116                   </div>
117           </div>
118           <div class="SearchSource">
119               <label for="All"><input type="radio" name="source" value="All" id="All" />All</label>
120               &nbsp;&nbsp;&nbsp;
121               <label for="nercddc"><input type="radio" name="source" value="NERC_DDC" id="nercddc"/>NERC Data Centres only</label>
122           </div><br/>                 
123           <div id="SearchSubmit">
124                        <input name="Search" type="submit" value="Search" />&nbsp;&nbsp;&nbsp;
125                <input name="ClearForm" type="submit" value="Clear form" />
126           </div>
127           <br />
128        </div>
129    </div>
130   
131    <div py:def="searchMapInputs()">
132        <?python
133        #Search Types
134        sps=[['overlaps','overlaps'],['does not overlap','doesNotOverlap'],['is within','within']]
135        ?>
136        <div class="searchHdr">Spatial coverage <span py:replace="helpIcon('spacov_help')"/></div>
137        <table>
138                <tr>
139                <td colspan="3">Look for data which
140                <select name="geoSearchType">${Markup(h.options_for_select(sps,c.geoSearchType))}</select>
141                        the search region.</td>
142                </tr>
143            <tr>
144                    <td colspan="3">
145                <div id="map"></div>
146                <div id="spacov_help" class="hidden">
147                    <div class="helptxt">
148                            <p> The default search is a global search. You can select a limited geospatial region using either the text boxes or the map.
149                             The default is to limit to datasets which overlap with a search region, but you can also aim to find only the datasets
150                             within the search region, or which <b>don't</b> overlap with the search region too. </p>
151                             <p> Or at least that's what should happen. Right now (December 3, 2007) only "overlaps" works!</p>
152                        </div>
153                </div>
154                        </td>
155                    </tr>
156                <tr>
157                    <td align="center">
158                                <div id="dims"/>
159                        </td>
160                </tr>
161        </table>
162    </div>
163   
164</html>
Note: See TracBrowser for help on using the repository browser.