1 |
3404
|
leinfelder
|
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
|
|
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
|
3 |
3405
|
leinfelder
|
|
4 |
|
|
<!-- to change the content type or response encoding change the following line -->
|
5 |
|
|
<jsp:directive.page contentType="text/html;charset=UTF-8" />
|
6 |
|
|
<jsp:directive.page
|
7 |
|
|
import="edu.ucsb.nceas.metacat.clientview.ClientView" />
|
8 |
|
|
<jsp:directive.page
|
9 |
|
|
import="edu.ucsb.nceas.metacat.clientview.ClientViewHelper" />
|
10 |
|
|
<jsp:directive.page
|
11 |
|
|
import="edu.ucsb.nceas.metacat.clientview.ClientHtmlHelper" />
|
12 |
|
|
|
13 |
|
|
<jsp:declaration>
|
14 |
3414
|
leinfelder
|
private ClientViewHelper clientViewHelper = null;
|
15 |
3404
|
leinfelder
|
</jsp:declaration>
|
16 |
3405
|
leinfelder
|
|
17 |
3414
|
leinfelder
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
18 |
|
|
<head>
|
19 |
3405
|
leinfelder
|
|
20 |
|
|
<script type="text/javascript">
|
21 |
3404
|
leinfelder
|
|
22 |
|
|
function allowSubmit(formObj) {
|
23 |
|
|
var result = true;
|
24 |
|
|
var action = "";
|
25 |
|
|
|
26 |
|
|
action = trim(formObj.elements["action"].value);
|
27 |
|
|
if (action == "Login") {
|
28 |
|
|
if (isEmpty(formObj.elements["username"])) {
|
29 |
|
|
result = false;
|
30 |
|
|
alert("User name is required");
|
31 |
|
|
} else if (isEmpty(formObj.elements["organization"])) {
|
32 |
|
|
result = false;
|
33 |
|
|
alert("Organization is required");
|
34 |
|
|
} else if (isEmpty(formObj.elements["password"])) {
|
35 |
|
|
result = false;
|
36 |
|
|
alert("Password is required");
|
37 |
|
|
}
|
38 |
|
|
}
|
39 |
|
|
|
40 |
|
|
return(result);
|
41 |
|
|
}
|
42 |
|
|
|
43 |
|
|
function isEmpty(aTextField) {
|
44 |
|
|
var value = trim(aTextField.value);
|
45 |
|
|
var result = ((value.length == 0) || (value == null));
|
46 |
|
|
return(result);
|
47 |
|
|
}
|
48 |
|
|
|
49 |
|
|
function trim(stringToTrim) {
|
50 |
|
|
return(stringToTrim.replace(/^\s+|\s+$/g,""));
|
51 |
|
|
}
|
52 |
3405
|
leinfelder
|
</script>
|
53 |
|
|
|
54 |
3414
|
leinfelder
|
<title>SANParks - South African National Park Data Repository</title>
|
55 |
3405
|
leinfelder
|
<link href="sanparks.css" rel="stylesheet" type="text/css" />
|
56 |
|
|
|
57 |
3414
|
leinfelder
|
</head>
|
58 |
|
|
|
59 |
3428
|
leinfelder
|
<body>
|
60 |
|
|
<!-- <body style="background: #FFFFFF;">-->
|
61 |
3414
|
leinfelder
|
<div class="templatecontentareaclass">
|
62 |
|
|
<jsp:useBean id="clientViewBean" scope="session" class="edu.ucsb.nceas.metacat.clientview.ClientView" />
|
63 |
|
|
<jsp:setProperty name="clientViewBean" property="*" />
|
64 |
|
|
<jsp:scriptlet>
|
65 |
|
|
clientViewHelper = ClientViewHelper.clientViewHelperInstance(request);
|
66 |
|
|
clientViewHelper.clientRequest(request, response);
|
67 |
|
|
</jsp:scriptlet>
|
68 |
3405
|
leinfelder
|
|
69 |
3414
|
leinfelder
|
<table>
|
70 |
3415
|
leinfelder
|
<tr>
|
71 |
|
|
<td colspan="3">
|
72 |
|
|
<p class="regtext">
|
73 |
|
|
Welcome to the SANParks Data Repository.
|
74 |
|
|
This is the primary source for comprehensive information about scientific
|
75 |
|
|
and research data sets collected throughout the South African National Park System.
|
76 |
|
|
</p>
|
77 |
|
|
</td>
|
78 |
|
|
</tr>
|
79 |
3414
|
leinfelder
|
<tr valign="top">
|
80 |
|
|
<td>
|
81 |
|
|
|
82 |
|
|
<h2>Search for SANParks Data</h2>
|
83 |
3426
|
leinfelder
|
|
84 |
|
|
<p class="emphasis">Searching:
|
85 |
|
|
<jsp:scriptlet>
|
86 |
|
|
String organizationScope = request.getParameter("organizationScope");
|
87 |
|
|
if (organizationScope == null) {
|
88 |
|
|
organizationScope = "%";
|
89 |
|
|
}
|
90 |
|
|
if (!organizationScope.equals("%")) {
|
91 |
|
|
</jsp:scriptlet>
|
92 |
|
|
<jsp:expression>request.getParameter("organizationScope")</jsp:expression>
|
93 |
|
|
<jsp:scriptlet>
|
94 |
|
|
}
|
95 |
|
|
else {
|
96 |
|
|
</jsp:scriptlet>
|
97 |
|
|
All Organizations
|
98 |
|
|
<jsp:scriptlet>
|
99 |
|
|
}
|
100 |
|
|
</jsp:scriptlet>
|
101 |
|
|
</p>
|
102 |
|
|
|
103 |
3414
|
leinfelder
|
<form name="searchform" method="post" action="../../../metacat" target="_top">
|
104 |
|
|
<jsp:include page="SimpleSearchMetacatPostFields.html" />
|
105 |
|
|
<jsp:element name="input">
|
106 |
|
|
<jsp:attribute name="name">sessionid</jsp:attribute>
|
107 |
|
|
<jsp:attribute name="type">hidden</jsp:attribute>
|
108 |
|
|
<jsp:attribute name="value">
|
109 |
|
|
<jsp:getProperty name="clientViewBean" property="sessionid" />
|
110 |
|
|
</jsp:attribute>
|
111 |
|
|
</jsp:element>
|
112 |
|
|
<p class="regtext">
|
113 |
3415
|
leinfelder
|
The repository search system is used to locate data sets of interest by
|
114 |
|
|
searching through existing registered data sets.
|
115 |
|
|
Presently the search covers all fields, including author, title, abstract,
|
116 |
|
|
keywords, and other documentation for each data set.
|
117 |
|
|
<br />
|
118 |
|
|
Use a '%' symbol as a wildcard in searches (e.g., '%herbivore%'
|
119 |
|
|
would locate any phrase with the word herbivore embedded within it).
|
120 |
3414
|
leinfelder
|
</p>
|
121 |
3419
|
leinfelder
|
<input name="anyfield" value="" type="text" size="14" />
|
122 |
|
|
<input name="action" value="query" type="hidden" />
|
123 |
|
|
<input name="search" value="Search" type="submit" />
|
124 |
3414
|
leinfelder
|
|
125 |
|
|
</form>
|
126 |
|
|
<p class="regtext">
|
127 |
|
|
-Or-
|
128 |
3405
|
leinfelder
|
</p>
|
129 |
|
|
<form name="browseform" method="post" action="../../../metacat"
|
130 |
3414
|
leinfelder
|
target="_top">
|
131 |
|
|
<jsp:include page="SimpleSearchMetacatPostFields.html" />
|
132 |
|
|
<input name="anyfield" type="hidden" value="%" />
|
133 |
|
|
<jsp:element name="input">
|
134 |
|
|
<jsp:attribute name="name">sessionid</jsp:attribute>
|
135 |
|
|
<jsp:attribute name="type">hidden</jsp:attribute>
|
136 |
|
|
<jsp:attribute name="value">
|
137 |
|
|
<jsp:getProperty name="clientViewBean" property="sessionid" />
|
138 |
|
|
</jsp:attribute>
|
139 |
|
|
</jsp:element>
|
140 |
|
|
<p class="regtext">
|
141 |
|
|
Browse all existing data sets by title. This operation can be slow.
|
142 |
|
|
</p>
|
143 |
3419
|
leinfelder
|
<input name="action" value="query" type="hidden" />
|
144 |
|
|
<input name="browse" value="Browse All" type="submit" />
|
145 |
3405
|
leinfelder
|
</form>
|
146 |
|
|
|
147 |
3414
|
leinfelder
|
</td>
|
148 |
|
|
<td>
|
149 |
|
|
|
150 |
|
|
<!-- Login section -->
|
151 |
3405
|
leinfelder
|
<jsp:scriptlet>
|
152 |
3414
|
leinfelder
|
if (!clientViewHelper.isLoggedIn()) {
|
153 |
|
|
</jsp:scriptlet>
|
154 |
|
|
|
155 |
|
|
<h3>
|
156 |
|
|
Login
|
157 |
|
|
<!-- TODO: Config param follows -->
|
158 |
|
|
<a href="HOSTNAME_HERE/cgiScripts/cgi-bin/ldapweb.cgi" target="_parent">
|
159 |
|
|
<span class="regtext"> (request an account...)</span>
|
160 |
|
|
</a>
|
161 |
|
|
</h3>
|
162 |
3428
|
leinfelder
|
<form name="loginForm" method="post" action="./"
|
163 |
3414
|
leinfelder
|
onsubmit="return allowSubmit(this)">
|
164 |
|
|
<input name="qformat" type="hidden" value="sanparks" />
|
165 |
3405
|
leinfelder
|
<table>
|
166 |
3414
|
leinfelder
|
<tr valign="top">
|
167 |
|
|
<td>
|
168 |
|
|
<span class="required">User name</span>
|
169 |
3405
|
leinfelder
|
</td>
|
170 |
3414
|
leinfelder
|
<td>
|
171 |
|
|
<input name="username" type="text" value=""
|
172 |
|
|
style="width: 140" />
|
173 |
|
|
</td>
|
174 |
3405
|
leinfelder
|
</tr>
|
175 |
|
|
<tr>
|
176 |
|
|
<td><span class="required">Organization</span></td>
|
177 |
|
|
<td><select name="organization" style="width: 140">
|
178 |
|
|
<option value="SANParks" selected="">SANParks</option>
|
179 |
|
|
<option value="SAEON">SAEON</option>
|
180 |
|
|
<option value="NCEAS">NCEAS</option>
|
181 |
|
|
<option value="unaffiliated">unaffiliated</option>
|
182 |
|
|
</select></td>
|
183 |
|
|
</tr>
|
184 |
|
|
<tr>
|
185 |
|
|
<td><span class="required">Password</span></td>
|
186 |
|
|
<td><input name="password" value="" type="password"
|
187 |
|
|
style="width: 140" maxlength="50" /></td>
|
188 |
|
|
</tr>
|
189 |
|
|
<tr>
|
190 |
3414
|
leinfelder
|
<td colspan="2" align="center">
|
191 |
|
|
<input name="action"
|
192 |
|
|
value="Login" type="submit" class="button_login" />
|
193 |
|
|
</td>
|
194 |
3405
|
leinfelder
|
</tr>
|
195 |
|
|
</table>
|
196 |
|
|
</form>
|
197 |
3414
|
leinfelder
|
|
198 |
3405
|
leinfelder
|
<jsp:scriptlet>
|
199 |
3414
|
leinfelder
|
} else {
|
200 |
|
|
</jsp:scriptlet>
|
201 |
3416
|
leinfelder
|
<h3>
|
202 |
|
|
Welcome,
|
203 |
|
|
<jsp:expression>clientViewBean.getUsername()</jsp:expression>
|
204 |
|
|
</h3>
|
205 |
3428
|
leinfelder
|
<form name="logoutForm" method="post" action="./">
|
206 |
3405
|
leinfelder
|
<input name="qformat" value="sanparks" type="hidden" />
|
207 |
|
|
<table>
|
208 |
3416
|
leinfelder
|
<tr valign="top">
|
209 |
3405
|
leinfelder
|
<td>
|
210 |
3416
|
leinfelder
|
<p class="regtext">
|
211 |
|
|
You are currently logged in.
|
212 |
|
|
</p>
|
213 |
3405
|
leinfelder
|
</td>
|
214 |
3416
|
leinfelder
|
<td align="right">
|
215 |
|
|
<input name="action" type="submit" value="Logout" class="button_login" />
|
216 |
|
|
</td>
|
217 |
|
|
</tr>
|
218 |
|
|
<tr valign="top">
|
219 |
|
|
<td colspan="2">
|
220 |
|
|
<p class="regtext">
|
221 |
|
|
(<jsp:expression>clientViewBean.getMessage(ClientView.LOGIN_MESSAGE)</jsp:expression>)
|
222 |
|
|
</p>
|
223 |
|
|
</td>
|
224 |
|
|
</tr>
|
225 |
|
|
<tr>
|
226 |
|
|
<td colspan="2"
|
227 |
|
|
class="regtext"
|
228 |
|
|
align="center"
|
229 |
|
|
valign="top">
|
230 |
|
|
|
231 |
3414
|
leinfelder
|
<!-- TODO: Config param follows -->
|
232 |
|
|
<a
|
233 |
|
|
href="HOSTNAME_HERE/cgiScripts/cgi-bin/ldapweb.cgi?stage=resetpass"
|
234 |
|
|
target="_parent">reset your password</a>
|
235 |
3416
|
leinfelder
|
|
|
236 |
|
|
<!-- TODO: Config param follows -->
|
237 |
|
|
<a
|
238 |
3414
|
leinfelder
|
href="HOSTNAME_HERE/cgiScripts/cgi-bin/ldapweb.cgi?stage=changepass"
|
239 |
|
|
target="_parent">change your password</a>
|
240 |
3405
|
leinfelder
|
</td>
|
241 |
|
|
</tr>
|
242 |
|
|
</table>
|
243 |
|
|
</form>
|
244 |
|
|
<jsp:scriptlet>
|
245 |
3414
|
leinfelder
|
}
|
246 |
|
|
</jsp:scriptlet>
|
247 |
|
|
|
248 |
|
|
</td>
|
249 |
|
|
|
250 |
|
|
<!-- so the map frame doesn't overlap content -->
|
251 |
|
|
<td width="50px"></td>
|
252 |
|
|
|
253 |
|
|
</tr>
|
254 |
|
|
|
255 |
|
|
<tr>
|
256 |
|
|
<td colspan="2">
|
257 |
|
|
|
258 |
|
|
<!-- File Upload Form -->
|
259 |
|
|
<br />
|
260 |
|
|
<h3>Data Package Upload</h3>
|
261 |
|
|
|
262 |
3405
|
leinfelder
|
<jsp:scriptlet>
|
263 |
3414
|
leinfelder
|
if (clientViewHelper.isLoggedIn()) {
|
264 |
|
|
</jsp:scriptlet>
|
265 |
3428
|
leinfelder
|
<form action="./upload.jsp" method="post">
|
266 |
3414
|
leinfelder
|
<input name="action" type="submit" value="Go" class="button_login" />
|
267 |
3405
|
leinfelder
|
</form>
|
268 |
|
|
<jsp:scriptlet>
|
269 |
3414
|
leinfelder
|
} else {
|
270 |
|
|
</jsp:scriptlet>
|
271 |
|
|
|
272 |
|
|
<p class="regtext">
|
273 |
|
|
You must be logged into your user account before uploading a data set.
|
274 |
|
|
</p>
|
275 |
3405
|
leinfelder
|
<jsp:scriptlet>
|
276 |
3414
|
leinfelder
|
}
|
277 |
|
|
</jsp:scriptlet>
|
278 |
|
|
|
279 |
|
|
</td>
|
280 |
|
|
|
281 |
|
|
<!-- so the map frame doesn't overlap content -->
|
282 |
|
|
<td width="50px"></td>
|
283 |
|
|
|
284 |
|
|
</tr>
|
285 |
|
|
|
286 |
|
|
<!--
|
287 |
|
|
<tr>
|
288 |
|
|
<td colspan="3">
|
289 |
|
|
<iframe
|
290 |
|
|
width="100%"
|
291 |
|
|
height="400px"
|
292 |
|
|
frameborder="0"
|
293 |
|
|
scrolling="no"
|
294 |
|
|
src="spatial/pma.html" />
|
295 |
|
|
</td>
|
296 |
|
|
</tr>
|
297 |
|
|
-->
|
298 |
|
|
</table>
|
299 |
|
|
|
300 |
3405
|
leinfelder
|
</div>
|
301 |
3414
|
leinfelder
|
</body>
|
302 |
|
|
</html>
|
303 |
3404
|
leinfelder
|
</jsp:root>
|