Project

General

Profile

1
<%@ page    language="java" %>
2
<%
3
/**
4
 * 
5
 * '$RCSfile$'
6
 * Copyright: 2008 Regents of the University of California and the
7
 *             National Center for Ecological Analysis and Synthesis
8
 *    '$Author: leinfelder $'
9
 *      '$Date: 2008-09-23 16:40:49 -0700 (Tue, 23 Sep 2008) $'
10
 * '$Revision: 4377 $'
11
 * 
12
 * This program is free software; you can redistribute it and/or modify
13
 * it under the terms of the GNU General Public License as published by
14
 * the Free Software Foundation; either version 2 of the License, or
15
 * (at your option) any later version.
16
 * 
17
 * This program is distributed in the hope that it will be useful,
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
 * GNU General Public License for more details.
21
     
22
 * You should have received a copy of the GNU General Public License
23
 * along with this program; if not, write to the Free Software
24
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
25
 */  
26
%>
27

    
28
<%@ include file="../../common/common-settings.jsp"%>
29
<%@ include file="../../common/configure-check.jsp"%>
30

    
31
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
32
<html>
33
<head>
34
<title>FIRST Assessment Metadata Repository</title>
35
<link rel="stylesheet" type="text/css"
36
	href="<%=STYLE_SKINS_URL%>/first/first.css">
37
<script language="JavaScript" type="text/JavaScript"
38
	src="<%=STYLE_SKINS_URL%>/first/first.js"></script>
39
<script language="JavaScript" type="text/JavaScript"
40
	src="<%=STYLE_SKINS_URL%>/first/search.js"></script>
41
<script language="JavaScript" type="text/JavaScript"
42
	src="<%=STYLE_COMMON_URL%>/branding.js"></script>
43
<script language="Javascript" type="text/JavaScript"
44
	src="<%=STYLE_COMMON_URL%>/prototype-1.5.1.1/prototype.js">
45
</script>	
46
<script language="Javascript">
47

    
48
		function browseAll() {
49
			document.getElementById("searchBox").value = "%";
50
			searchAssessments();
51
		}
52
		
53
		function searchAssessments() {
54
			var searchString = document.getElementById("searchBox").value;
55
			var institution = document.getElementById("institution").value;
56
			var instructor = document.getElementById("instructor").value;
57
			var course = document.getElementById("course").value;
58
			var year = document.getElementById("year").value;
59
			var searchTerms = new Object();
60
			searchTerms["anyValue"] = searchString;
61
			searchTerms["institution/organizationName"] = institution;
62
			searchTerms["instructor/individualName/surName"] = instructor;
63
			searchTerms["course/lom/general/title/string"] = course;
64
			searchTerms["course/year"] = year;
65
			
66
			var operator = "UNION";
67
			if (document.getElementById("all").checked) {
68
				operator = "INTERSECT";
69
			}
70
			
71
			var metacatURL = "<%=CONTEXT_URL%>/metacat";
72
			
73
			//generate the query
74
			var queryString = 
75
				generateSearchString(
76
					searchTerms,
77
					operator,
78
					true, 
79
					false);
80
			
81
			//alert("queryString=" + queryString);
82
			
83
			callAjax(metacatURL, queryString, "first-assessment", "ajaxSearchResults");			
84
		}
85
   </script>
86
</head>
87
<body>
88
<script language="JavaScript">
89
          insertTemplateOpening("<%=CONTEXT_URL%>");
90
          insertSearchBox("<%=CONTEXT_URL%>");
91
      </script>
92

    
93
<table width="760" border="0" cellspacing="20" cellpadding="0">
94
	<!--DWLayoutTable-->
95
	<tr>
96
		<td>
97
			<form method="POST" action="<%=SERVLET_URL%>" target="_top" id="searchForm">
98
			
99
			<table class="tables" cellpadding="8" cellspacing="0">
100
				<tr class="sectheader">
101
					<td class="borderbottom" align="left" colspan="2">
102
						<p align="center">Search Assessments</p>
103
					</td>
104
				</tr>
105
				<tr>
106
					<td align="left">
107
							
108
						<input name="query" type="hidden"> 
109
						<input name="qformat" value="first" type="hidden"> 
110
						<input type="hidden" name="action" value="squery"> 								
111
						
112
						<table>
113
							<tr>
114
								<td>Any field:</td>
115
								<td><input size="14" name="searchstring" type="text" value="" id="searchBox"></td>
116
							</tr>
117
							<tr>
118
								<td colspan="2"><hr/></td>
119
							</tr>
120
							<tr>
121
								<td>Institution: </td>
122
								<td><input name="institution" id="institution" type="text" size="14"/></td>
123
							</tr>
124
							<tr>
125
								<td>Course: </td>
126
								<td><input name="course" id="course" type="text" size="14"/></td>
127
							</tr>
128
							<tr>
129
								<td>Instructor: </td>
130
								<td><input name="instructor" id="instructor" type="text" size="14"/></td>
131
							</tr>
132
							<tr>
133
								<td>Year: </td>
134
								<td><input name="year" id="year" type="text" size="4"/></td>
135
							</tr>
136
						</table>
137
					</td>
138
					<td valign="bottom">
139
						<table>	
140
							<tr>
141
								<td nowrap="nowrap">
142
									<input name="anyAll" id="any" value="UNION" type="radio" checked="checked"/>
143
								</td>
144
								<td nowrap="nowrap">Match any</td>
145
							</tr>
146
							<tr>		
147
								<td nowrap="nowrap">
148
									<input name="anyAll" id="all" value="INTERSECT" type="radio"/>
149
								</td>	
150
								<td nowrap="nowrap">Match all</td>
151
							</tr>
152
							<tr>
153
						</table>
154
					</td>
155
				</tr>
156
				<tr class="sectheader">
157
					<td class="borderbottom" colspan="1">
158
						<!-- <input type="button" value="Browse all" onclick="browseAll()"/> -->
159
						(<a href="javascript:browseAll()">Browse All...</a>)
160
					</td>
161
					<td class="borderbottom" colspan="1">
162
						<input type="button" onclick="javascript:searchAssessments()" value="Search"/>
163
						<!--  <input value="Search" type="submit"> -->
164
					</td>
165
				</tr>
166
			</table>
167
			</form>
168
			
169
		</td>
170
		<td colspan="1" valign="top">
171
			<div align="center">
172
				<p align="left">This tool allows you to search for Assessments either by keyword,
173
				or with a structured search that targets particular facets of an assessment.
174
				<br />
175
				<br />
176
				You can use the '%' character as a wildcard in your searches (e.g.,
177
				'%biology%' would locate any phrase with the word biology embedded within it).
178
				</p>
179
			</div>
180
		</td>
181
	</tr>
182
	<tr>
183
		<td valign="top" colspan="2">	
184
			<div id="ajaxSearchResults">Search results...</div>
185
		</td>
186
	</tr>
187
</table>
188

    
189
<script language="JavaScript">          
190
    insertTemplateClosing("<%=CONTEXT_URL%>");
191
</script>
192
</body>
193
</html>
(13-13/14)