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 |
|
|
<body style="background: #FFFFFF;">
|
60 |
|
|
<div class="templatecontentareaclass">
|
61 |
|
|
<jsp:useBean id="clientViewBean" scope="session" class="edu.ucsb.nceas.metacat.clientview.ClientView" />
|
62 |
|
|
<jsp:setProperty name="clientViewBean" property="*" />
|
63 |
|
|
<jsp:scriptlet>
|
64 |
|
|
clientViewHelper = ClientViewHelper.clientViewHelperInstance(request);
|
65 |
|
|
clientViewHelper.clientRequest(request, response);
|
66 |
|
|
</jsp:scriptlet>
|
67 |
3405
|
leinfelder
|
|
68 |
3414
|
leinfelder
|
<table>
|
69 |
|
|
<tr valign="top">
|
70 |
|
|
<td>
|
71 |
|
|
|
72 |
|
|
<h2>Search for SANParks Data</h2>
|
73 |
|
|
<form name="searchform" method="post" action="../../../metacat" target="_top">
|
74 |
|
|
<jsp:include page="SimpleSearchMetacatPostFields.html" />
|
75 |
|
|
<jsp:element name="input">
|
76 |
|
|
<jsp:attribute name="name">sessionid</jsp:attribute>
|
77 |
|
|
<jsp:attribute name="type">hidden</jsp:attribute>
|
78 |
|
|
<jsp:attribute name="value">
|
79 |
|
|
<jsp:getProperty name="clientViewBean" property="sessionid" />
|
80 |
|
|
</jsp:attribute>
|
81 |
|
|
</jsp:element>
|
82 |
|
|
<p class="regtext">
|
83 |
|
|
Search the data repository using all fields, including author, title, abstract, keywords, and other
|
84 |
|
|
documentation.
|
85 |
|
|
Use a '%' symbol as a wildcard (e.g., '%herbivore%') to search more broadly.
|
86 |
|
|
</p>
|
87 |
|
|
<input name="anyfield" value="" type="text" size="14" />
|
88 |
|
|
<input name="action" value="query" type="submit" />
|
89 |
|
|
|
90 |
|
|
</form>
|
91 |
|
|
<p class="regtext">
|
92 |
|
|
-Or-
|
93 |
3405
|
leinfelder
|
</p>
|
94 |
|
|
<form name="browseform" method="post" action="../../../metacat"
|
95 |
3414
|
leinfelder
|
target="_top">
|
96 |
|
|
<jsp:include page="SimpleSearchMetacatPostFields.html" />
|
97 |
|
|
<input name="anyfield" type="hidden" value="%" />
|
98 |
|
|
<jsp:element name="input">
|
99 |
|
|
<jsp:attribute name="name">sessionid</jsp:attribute>
|
100 |
|
|
<jsp:attribute name="type">hidden</jsp:attribute>
|
101 |
|
|
<jsp:attribute name="value">
|
102 |
|
|
<jsp:getProperty name="clientViewBean" property="sessionid" />
|
103 |
|
|
</jsp:attribute>
|
104 |
|
|
</jsp:element>
|
105 |
|
|
<p class="regtext">
|
106 |
|
|
Browse all existing data sets by title. This operation can be slow.
|
107 |
|
|
</p>
|
108 |
|
|
<input name="action" value="Browse All" type="submit" />
|
109 |
3405
|
leinfelder
|
</form>
|
110 |
|
|
|
111 |
3414
|
leinfelder
|
</td>
|
112 |
|
|
<td>
|
113 |
|
|
|
114 |
|
|
<!-- Login section -->
|
115 |
3405
|
leinfelder
|
<jsp:scriptlet>
|
116 |
3414
|
leinfelder
|
if (!clientViewHelper.isLoggedIn()) {
|
117 |
|
|
</jsp:scriptlet>
|
118 |
|
|
|
119 |
|
|
<h3>
|
120 |
|
|
Login
|
121 |
|
|
<!-- TODO: Config param follows -->
|
122 |
|
|
<a href="HOSTNAME_HERE/cgiScripts/cgi-bin/ldapweb.cgi" target="_parent">
|
123 |
|
|
<span class="regtext"> (request an account...)</span>
|
124 |
|
|
</a>
|
125 |
|
|
</h3>
|
126 |
3405
|
leinfelder
|
<form name="loginForm" method="post" action="SaeonLogin.jspx"
|
127 |
3414
|
leinfelder
|
onsubmit="return allowSubmit(this)">
|
128 |
|
|
<input name="qformat" type="hidden" value="sanparks" />
|
129 |
3405
|
leinfelder
|
<table>
|
130 |
3414
|
leinfelder
|
<tr valign="top">
|
131 |
|
|
<td>
|
132 |
|
|
<span class="required">User name</span>
|
133 |
3405
|
leinfelder
|
</td>
|
134 |
3414
|
leinfelder
|
<td>
|
135 |
|
|
<input name="username" type="text" value=""
|
136 |
|
|
style="width: 140" />
|
137 |
|
|
</td>
|
138 |
3405
|
leinfelder
|
</tr>
|
139 |
|
|
<tr>
|
140 |
|
|
<td><span class="required">Organization</span></td>
|
141 |
|
|
<td><select name="organization" style="width: 140">
|
142 |
|
|
<option value="SANParks" selected="">SANParks</option>
|
143 |
|
|
<option value="SAEON">SAEON</option>
|
144 |
|
|
<option value="NCEAS">NCEAS</option>
|
145 |
|
|
<option value="unaffiliated">unaffiliated</option>
|
146 |
|
|
</select></td>
|
147 |
|
|
</tr>
|
148 |
|
|
<tr>
|
149 |
|
|
<td><span class="required">Password</span></td>
|
150 |
|
|
<td><input name="password" value="" type="password"
|
151 |
|
|
style="width: 140" maxlength="50" /></td>
|
152 |
|
|
</tr>
|
153 |
|
|
<tr>
|
154 |
3414
|
leinfelder
|
<td colspan="2" align="center">
|
155 |
|
|
<input name="action"
|
156 |
|
|
value="Login" type="submit" class="button_login" />
|
157 |
|
|
</td>
|
158 |
3405
|
leinfelder
|
</tr>
|
159 |
|
|
</table>
|
160 |
|
|
</form>
|
161 |
3414
|
leinfelder
|
|
162 |
3405
|
leinfelder
|
<jsp:scriptlet>
|
163 |
3414
|
leinfelder
|
} else {
|
164 |
|
|
</jsp:scriptlet>
|
165 |
3405
|
leinfelder
|
<form name="logoutForm" method="post" action="SaeonLogin.jspx">
|
166 |
|
|
<input name="qformat" value="sanparks" type="hidden" />
|
167 |
|
|
<table>
|
168 |
|
|
<tr>
|
169 |
|
|
<td>
|
170 |
|
|
<p class="regtext">Account: <jsp:expression>clientViewBean.getMessage(ClientView.LOGIN_MESSAGE)</jsp:expression></p>
|
171 |
|
|
</td>
|
172 |
3414
|
leinfelder
|
<td rowspan="2"
|
173 |
|
|
class="regtext" align="right"
|
174 |
|
|
valign="top"
|
175 |
3405
|
leinfelder
|
style="width: 160">
|
176 |
3414
|
leinfelder
|
<div>
|
177 |
|
|
<!-- TODO: Config param follows -->
|
178 |
|
|
<a
|
179 |
|
|
href="HOSTNAME_HERE/cgiScripts/cgi-bin/ldapweb.cgi?stage=resetpass"
|
180 |
|
|
target="_parent">reset your password</a>
|
181 |
|
|
</div>
|
182 |
|
|
<div>
|
183 |
|
|
<!-- TODO: Config param follows --> <a
|
184 |
|
|
href="HOSTNAME_HERE/cgiScripts/cgi-bin/ldapweb.cgi?stage=changepass"
|
185 |
|
|
target="_parent">change your password</a>
|
186 |
|
|
</div>
|
187 |
3405
|
leinfelder
|
</td>
|
188 |
|
|
</tr>
|
189 |
|
|
<tr>
|
190 |
|
|
<td align="center"><input name="action" type="submit"
|
191 |
|
|
value="Logout" class="button_login" /></td>
|
192 |
|
|
</tr>
|
193 |
|
|
</table>
|
194 |
|
|
</form>
|
195 |
|
|
<jsp:scriptlet>
|
196 |
3414
|
leinfelder
|
}
|
197 |
|
|
</jsp:scriptlet>
|
198 |
|
|
|
199 |
|
|
</td>
|
200 |
|
|
|
201 |
|
|
<!-- so the map frame doesn't overlap content -->
|
202 |
|
|
<td width="50px"></td>
|
203 |
|
|
|
204 |
|
|
</tr>
|
205 |
|
|
|
206 |
|
|
<tr>
|
207 |
|
|
<td colspan="2">
|
208 |
|
|
|
209 |
|
|
<!-- File Upload Form -->
|
210 |
|
|
<br />
|
211 |
|
|
<h3>Data Package Upload</h3>
|
212 |
|
|
|
213 |
3405
|
leinfelder
|
<jsp:scriptlet>
|
214 |
3414
|
leinfelder
|
if (clientViewHelper.isLoggedIn()) {
|
215 |
|
|
</jsp:scriptlet>
|
216 |
3405
|
leinfelder
|
<form action="SaeonUpload.jspx">
|
217 |
3414
|
leinfelder
|
<input name="action" type="submit" value="Go" class="button_login" />
|
218 |
3405
|
leinfelder
|
</form>
|
219 |
|
|
<jsp:scriptlet>
|
220 |
3414
|
leinfelder
|
} else {
|
221 |
|
|
</jsp:scriptlet>
|
222 |
|
|
|
223 |
|
|
<p class="regtext">
|
224 |
|
|
You must be logged into your user account before uploading a data set.
|
225 |
|
|
</p>
|
226 |
3405
|
leinfelder
|
<jsp:scriptlet>
|
227 |
3414
|
leinfelder
|
}
|
228 |
|
|
</jsp:scriptlet>
|
229 |
|
|
|
230 |
|
|
</td>
|
231 |
|
|
|
232 |
|
|
<!-- so the map frame doesn't overlap content -->
|
233 |
|
|
<td width="50px"></td>
|
234 |
|
|
|
235 |
|
|
</tr>
|
236 |
|
|
|
237 |
|
|
<!--
|
238 |
|
|
<tr>
|
239 |
|
|
<td colspan="3">
|
240 |
|
|
<iframe
|
241 |
|
|
width="100%"
|
242 |
|
|
height="400px"
|
243 |
|
|
frameborder="0"
|
244 |
|
|
scrolling="no"
|
245 |
|
|
src="spatial/pma.html" />
|
246 |
|
|
</td>
|
247 |
|
|
</tr>
|
248 |
|
|
-->
|
249 |
|
|
</table>
|
250 |
|
|
|
251 |
3405
|
leinfelder
|
</div>
|
252 |
3414
|
leinfelder
|
</body>
|
253 |
|
|
</html>
|
254 |
3404
|
leinfelder
|
</jsp:root>
|