Project

General

Profile

1 4235 leinfelder
<%@ 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$'
9
 *      '$Date$'
10
 * '$Revision$'
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 3510 leinfelder
<!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 4235 leinfelder
	href="<%=STYLE_SKINS_URL%>/first/first.css">
37 3510 leinfelder
<script language="JavaScript" type="text/JavaScript"
38 4235 leinfelder
	src="<%=STYLE_SKINS_URL%>/first/first.js"></script>
39 3510 leinfelder
<script language="JavaScript" type="text/JavaScript"
40 4290 leinfelder
	src="<%=STYLE_SKINS_URL%>/first/search.js"></script>
41
<script language="JavaScript" type="text/JavaScript"
42 4235 leinfelder
	src="<%=STYLE_COMMON_URL%>/branding.js"></script>
43 4290 leinfelder
<script language="Javascript" type="text/JavaScript"
44
	src="<%=STYLE_COMMON_URL%>/prototype-1.5.1.1/prototype.js">
45
</script>
46 3510 leinfelder
<script language="Javascript">
47
48 4364 leinfelder
		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 3550 leinfelder
66 4364 leinfelder
			var operator = "UNION";
67
			if (document.getElementById("all").checked) {
68
				operator = "INTERSECT";
69 3510 leinfelder
			}
70 3550 leinfelder
71 4290 leinfelder
			var metacatURL = "<%=CONTEXT_URL%>/metacat";
72
73
			//generate the query
74
			var queryString =
75
				generateSearchString(
76 4364 leinfelder
					searchTerms,
77
					operator,
78 4290 leinfelder
					true,
79
					false);
80 4364 leinfelder
81
			//alert("queryString=" + queryString);
82
83 4377 leinfelder
			callAjax(metacatURL, queryString, "first-assessment", "ajaxSearchResults");
84 4290 leinfelder
		}
85 3510 leinfelder
   </script>
86
</head>
87
<body>
88
<script language="JavaScript">
89 4235 leinfelder
          insertTemplateOpening("<%=CONTEXT_URL%>");
90
          insertSearchBox("<%=CONTEXT_URL%>");
91 3510 leinfelder
      </script>
92
93 4386 leinfelder
<table width="100%" border="0" cellspacing="20" cellpadding="0">
94 3510 leinfelder
	<!--DWLayoutTable-->
95
	<tr>
96
		<td>
97 4364 leinfelder
			<form method="POST" action="<%=SERVLET_URL%>" target="_top" id="searchForm">
98 3510 leinfelder
99
			<table class="tables" cellpadding="8" cellspacing="0">
100
				<tr class="sectheader">
101 4364 leinfelder
					<td class="borderbottom" align="left" colspan="2">
102
						<p align="center">Search Assessments</p>
103 3510 leinfelder
					</td>
104 4364 leinfelder
				</tr>
105 3510 leinfelder
				<tr>
106 4364 leinfelder
					<td align="left">
107 4362 leinfelder
108 4364 leinfelder
						<input name="query" type="hidden">
109
						<input name="qformat" value="first" type="hidden">
110
						<input type="hidden" name="action" value="squery">
111 4305 leinfelder
112 4364 leinfelder
						<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 3510 leinfelder
					</td>
138 4364 leinfelder
					<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 3510 leinfelder
				</tr>
156 4364 leinfelder
				<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 3510 leinfelder
					</td>
161 4364 leinfelder
					<td class="borderbottom" colspan="1">
162
						<input type="button" onclick="javascript:searchAssessments()" value="Search"/>
163
						<!--  <input value="Search" type="submit"> -->
164
					</td>
165 3510 leinfelder
				</tr>
166
			</table>
167 4364 leinfelder
			</form>
168
169 3510 leinfelder
		</td>
170 4364 leinfelder
		<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 3510 leinfelder
	</tr>
182 4364 leinfelder
	<tr>
183
		<td valign="top" colspan="2">
184 4377 leinfelder
			<div id="ajaxSearchResults">Search results...</div>
185 4364 leinfelder
		</td>
186
	</tr>
187 3510 leinfelder
</table>
188
189
<script language="JavaScript">
190 4235 leinfelder
    insertTemplateClosing("<%=CONTEXT_URL%>");
191 3510 leinfelder
</script>
192
</body>
193
</html>