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-25 16:11:55 -0700 (Thu, 25 Sep 2008) $'
10
 * '$Revision: 4393 $'
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" type="text/JavaScript"
47
	src="<%=STYLE_COMMON_URL%>/effects.js">
48
</script>
49
<script language="Javascript">
50

    
51
		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
			
69
			var operator = "UNION";
70
			if (document.getElementById("all").checked) {
71
				operator = "INTERSECT";
72
			}
73
			
74
			var metacatURL = "<%=CONTEXT_URL%>/metacat";
75
			
76
			//generate the query
77
			var queryString = 
78
				generateSearchString(
79
					searchTerms,
80
					operator,
81
					true, 
82
					false);
83
			
84
			//alert("queryString=" + queryString);
85
			
86
			callAjax(metacatURL, queryString, "first-assessment", "ajaxSearchResults");
87
			
88
			Effect.Appear('ajaxSearchResults', {duration: 1.5});		
89
		}
90
   </script>
91
</head>
92
<body>
93
<script language="JavaScript">
94
          insertTemplateOpening("<%=CONTEXT_URL%>");
95
          insertSearchBox("<%=CONTEXT_URL%>");
96
      </script>
97

    
98
<table width="100%" border="0" cellspacing="20" cellpadding="0">
99
	<tr>
100
		<th colspan="2">
101
			Search
102
		</th>
103
	</tr>		
104
	<tr>
105
		<td>
106
			<form method="POST" action="<%=SERVLET_URL%>" target="_top" id="searchForm">
107
			
108
			<table class="tables" cellpadding="8" cellspacing="0">
109
				<tr class="sectheader">
110

    
111
					<td class="borderbottom" align="left" colspan="2">
112
						Any field:
113
						<input size="30" name="searchstring" type="text" value="" id="searchBox">
114
					</td>
115

    
116
				</tr>
117
				<tr>
118
					<td align="left" class="borderbottom">
119
							
120
						<input name="query" type="hidden"> 
121
						<input name="qformat" value="first" type="hidden"> 
122
						<input type="hidden" name="action" value="squery"> 								
123
						
124
						<table>
125
							
126
							<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
					</td>
144
					<td valign="bottom" class="borderbottom">
145
						<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
								<td colspan="2">
160
									<input type="button" onclick="javascript:searchAssessments()" value="Search"/>
161
								</td>
162
							</tr>
163
						</table>
164
					</td>
165
				</tr>
166
				
167
			</table>
168
			</form>
169
			
170
		</td>
171
		<td colspan="1" valign="top">
172
			<div align="left">
173
				<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
				<a href="javascript:browseAll()">Browse All Assessments...</a>
181
			</div>
182
		</td>
183
	</tr>
184
	<tr>
185
		<td valign="top" colspan="2">	
186
			<div id="ajaxSearchResults" style="display:none;">
187
				Loading search results 
188
				<img src="<%=CONTEXT_URL%>/style/images/spinner.gif" border="none"/>
189
			</div>
190
		</td>
191
	</tr>
192
</table>
193

    
194
<script language="JavaScript">          
195
    insertTemplateClosing("<%=CONTEXT_URL%>");
196
</script>
197
</body>
198
</html>
(13-13/14)