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 4388 leinfelder
</script>
46
<script language="Javascript" type="text/JavaScript"
47
	src="<%=STYLE_COMMON_URL%>/effects.js">
48
</script>
49 3510 leinfelder
<script language="Javascript">
50
51 4364 leinfelder
		function browseAll() {
52
			document.getElementById("searchBox").value = "%";
53
			searchAssessments();
54
		}
55
56
		function searchAssessments() {
57
			var searchString = document.getElementById("searchBox").value;
58
			var institution = document.getElementById("institution").value;
59
			var instructor = document.getElementById("instructor").value;
60
			var course = document.getElementById("course").value;
61
			var year = document.getElementById("year").value;
62
			var searchTerms = new Object();
63
			searchTerms["anyValue"] = searchString;
64
			searchTerms["institution/organizationName"] = institution;
65
			searchTerms["instructor/individualName/surName"] = instructor;
66
			searchTerms["course/lom/general/title/string"] = course;
67
			searchTerms["course/year"] = year;
68 3550 leinfelder
69 4364 leinfelder
			var operator = "UNION";
70
			if (document.getElementById("all").checked) {
71
				operator = "INTERSECT";
72 3510 leinfelder
			}
73 3550 leinfelder
74 4290 leinfelder
			var metacatURL = "<%=CONTEXT_URL%>/metacat";
75
76
			//generate the query
77
			var queryString =
78
				generateSearchString(
79 4364 leinfelder
					searchTerms,
80
					operator,
81 4290 leinfelder
					true,
82
					false);
83 4364 leinfelder
84
			//alert("queryString=" + queryString);
85
86 4388 leinfelder
			callAjax(metacatURL, queryString, "first-assessment", "ajaxSearchResults");
87
88
			Effect.Appear('ajaxSearchResults', {duration: 1.5});
89 4290 leinfelder
		}
90 3510 leinfelder
   </script>
91
</head>
92
<body>
93
<script language="JavaScript">
94 4235 leinfelder
          insertTemplateOpening("<%=CONTEXT_URL%>");
95
          insertSearchBox("<%=CONTEXT_URL%>");
96 3510 leinfelder
      </script>
97
98 4386 leinfelder
<table width="100%" border="0" cellspacing="20" cellpadding="0">
99 3510 leinfelder
	<tr>
100 4388 leinfelder
		<th colspan="2">
101
			Search
102
		</th>
103
	</tr>
104
	<tr>
105 3510 leinfelder
		<td>
106 4364 leinfelder
			<form method="POST" action="<%=SERVLET_URL%>" target="_top" id="searchForm">
107 3510 leinfelder
108
			<table class="tables" cellpadding="8" cellspacing="0">
109
				<tr class="sectheader">
110 4388 leinfelder
111 4364 leinfelder
					<td class="borderbottom" align="left" colspan="2">
112 4388 leinfelder
						Any field:
113
						<input size="30" name="searchstring" type="text" value="" id="searchBox">
114 3510 leinfelder
					</td>
115 4388 leinfelder
116 4364 leinfelder
				</tr>
117 3510 leinfelder
				<tr>
118 4388 leinfelder
					<td align="left" class="borderbottom">
119 4362 leinfelder
120 4364 leinfelder
						<input name="query" type="hidden">
121
						<input name="qformat" value="first" type="hidden">
122
						<input type="hidden" name="action" value="squery">
123 4305 leinfelder
124 4364 leinfelder
						<table>
125 4388 leinfelder
126 4364 leinfelder
							<tr>
127
								<td>Institution: </td>
128
								<td><input name="institution" id="institution" type="text" size="14"/></td>
129
							</tr>
130
							<tr>
131
								<td>Course: </td>
132
								<td><input name="course" id="course" type="text" size="14"/></td>
133
							</tr>
134
							<tr>
135
								<td>Instructor: </td>
136
								<td><input name="instructor" id="instructor" type="text" size="14"/></td>
137
							</tr>
138
							<tr>
139
								<td>Year: </td>
140
								<td><input name="year" id="year" type="text" size="4"/></td>
141
							</tr>
142
						</table>
143 3510 leinfelder
					</td>
144 4388 leinfelder
					<td valign="bottom" class="borderbottom">
145 4364 leinfelder
						<table>
146
							<tr>
147
								<td nowrap="nowrap">
148
									<input name="anyAll" id="any" value="UNION" type="radio" checked="checked"/>
149
								</td>
150
								<td nowrap="nowrap">Match any</td>
151
							</tr>
152
							<tr>
153
								<td nowrap="nowrap">
154
									<input name="anyAll" id="all" value="INTERSECT" type="radio"/>
155
								</td>
156
								<td nowrap="nowrap">Match all</td>
157
							</tr>
158
							<tr>
159 4388 leinfelder
								<td colspan="2">
160
									<input type="button" onclick="javascript:searchAssessments()" value="Search"/>
161
								</td>
162
							</tr>
163 4364 leinfelder
						</table>
164
					</td>
165 3510 leinfelder
				</tr>
166 4388 leinfelder
167 3510 leinfelder
			</table>
168 4364 leinfelder
			</form>
169
170 3510 leinfelder
		</td>
171 4364 leinfelder
		<td colspan="1" valign="top">
172 4388 leinfelder
			<div align="left">
173 4364 leinfelder
				<p align="left">This tool allows you to search for Assessments either by keyword,
174
				or with a structured search that targets particular facets of an assessment.
175
				<br />
176
				<br />
177
				You can use the '%' character as a wildcard in your searches (e.g.,
178
				'%biology%' would locate any phrase with the word biology embedded within it).
179
				</p>
180 4388 leinfelder
				<a href="javascript:browseAll()">Browse All Assessments...</a>
181 4364 leinfelder
			</div>
182
		</td>
183 3510 leinfelder
	</tr>
184 4364 leinfelder
	<tr>
185
		<td valign="top" colspan="2">
186 4393 leinfelder
			<div id="ajaxSearchResults" style="display:none;">
187
				Loading search results
188
				<img src="<%=CONTEXT_URL%>/style/images/spinner.gif" border="none"/>
189
			</div>
190 4364 leinfelder
		</td>
191
	</tr>
192 3510 leinfelder
</table>
193
194
<script language="JavaScript">
195 4235 leinfelder
    insertTemplateClosing("<%=CONTEXT_URL%>");
196 3510 leinfelder
</script>
197
</body>
198
</html>