Project

General

Profile

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 3415 leinfelder
	<tr>
70
		<td colspan="3">
71
			<p class="regtext">
72
			Welcome to the SANParks Data Repository.
73
			This is the primary source for comprehensive information about scientific
74
			and research data sets collected throughout the South African National Park System.
75
			</p>
76
		</td>
77
	</tr>
78 3414 leinfelder
	<tr valign="top">
79
	<td>
80
81
	<h2>Search for SANParks Data</h2>
82
	<form name="searchform" method="post" action="../../../metacat" target="_top">
83
		<jsp:include page="SimpleSearchMetacatPostFields.html" />
84
		<jsp:element name="input">
85
			<jsp:attribute name="name">sessionid</jsp:attribute>
86
			<jsp:attribute name="type">hidden</jsp:attribute>
87
			<jsp:attribute name="value">
88
				<jsp:getProperty name="clientViewBean" property="sessionid" />
89
			</jsp:attribute>
90
		</jsp:element>
91
		<p class="regtext">
92 3415 leinfelder
		The repository search system is used to locate data sets of interest by
93
		searching through existing registered data sets.
94
		Presently the search covers all fields, including author, title, abstract,
95
		keywords, and other documentation for each data set.
96
		<br />
97
		Use a '%' symbol as a wildcard in searches (e.g., '%herbivore%'
98
		would locate any phrase with the word herbivore embedded within it).
99 3414 leinfelder
		</p>
100 3419 leinfelder
			<input name="anyfield" value="" type="text" size="14" />
101
			<input name="action" value="query" type="hidden" />
102
			<input name="search" value="Search" type="submit" />
103 3414 leinfelder
104
	</form>
105
	<p class="regtext">
106
	-Or-
107 3405 leinfelder
	</p>
108
	<form name="browseform" method="post" action="../../../metacat"
109 3414 leinfelder
		target="_top">
110
		<jsp:include page="SimpleSearchMetacatPostFields.html" />
111
		<input name="anyfield" type="hidden" value="%" />
112
		<jsp:element name="input">
113
			<jsp:attribute name="name">sessionid</jsp:attribute>
114
			<jsp:attribute name="type">hidden</jsp:attribute>
115
			<jsp:attribute name="value">
116
				<jsp:getProperty name="clientViewBean" property="sessionid" />
117
			</jsp:attribute>
118
		</jsp:element>
119
		<p class="regtext">
120
		Browse all existing data sets by title. This operation can be slow.
121
		</p>
122 3419 leinfelder
		<input name="action" value="query" type="hidden" />
123
		<input name="browse" value="Browse All" type="submit" />
124 3405 leinfelder
	</form>
125
126 3414 leinfelder
	</td>
127
	<td>
128
129
	<!-- Login section -->
130 3405 leinfelder
	<jsp:scriptlet>
131 3414 leinfelder
		if (!clientViewHelper.isLoggedIn()) {
132
	</jsp:scriptlet>
133
134
	<h3>
135
		Login
136
		<!-- TODO: Config param follows -->
137
		<a href="HOSTNAME_HERE/cgiScripts/cgi-bin/ldapweb.cgi" target="_parent">
138
			<span class="regtext"> (request an account...)</span>
139
		</a>
140
	</h3>
141 3405 leinfelder
	<form name="loginForm" method="post" action="SaeonLogin.jspx"
142 3414 leinfelder
		onsubmit="return allowSubmit(this)">
143
		<input name="qformat" type="hidden" value="sanparks" />
144 3405 leinfelder
	<table>
145 3414 leinfelder
		<tr valign="top">
146
			<td>
147
				<span class="required">User name</span>
148 3405 leinfelder
			</td>
149 3414 leinfelder
			<td>
150
				<input name="username" type="text" value=""
151
				style="width: 140" />
152
			</td>
153 3405 leinfelder
		</tr>
154
		<tr>
155
			<td><span class="required">Organization</span></td>
156
			<td><select name="organization" style="width: 140">
157
				<option value="SANParks" selected="">SANParks</option>
158
				<option value="SAEON">SAEON</option>
159
				<option value="NCEAS">NCEAS</option>
160
				<option value="unaffiliated">unaffiliated</option>
161
			</select></td>
162
		</tr>
163
		<tr>
164
			<td><span class="required">Password</span></td>
165
			<td><input name="password" value="" type="password"
166
				style="width: 140" maxlength="50" /></td>
167
		</tr>
168
		<tr>
169 3414 leinfelder
			<td colspan="2" align="center">
170
				<input name="action"
171
				value="Login" type="submit" class="button_login" />
172
			</td>
173 3405 leinfelder
		</tr>
174
	</table>
175
	</form>
176 3414 leinfelder
177 3405 leinfelder
	<jsp:scriptlet>
178 3414 leinfelder
		} else {
179
	</jsp:scriptlet>
180 3416 leinfelder
	<h3>
181
		Welcome,
182
		<jsp:expression>clientViewBean.getUsername()</jsp:expression>
183
	</h3>
184 3405 leinfelder
	<form name="logoutForm" method="post" action="SaeonLogin.jspx">
185
	<input name="qformat" value="sanparks" type="hidden" />
186
	<table>
187 3416 leinfelder
		<tr valign="top">
188 3405 leinfelder
			<td>
189 3416 leinfelder
				<p class="regtext">
190
					You are currently logged in.
191
				</p>
192 3405 leinfelder
			</td>
193 3416 leinfelder
			<td align="right">
194
				<input name="action" type="submit" value="Logout" class="button_login" />
195
			</td>
196
		</tr>
197
		<tr valign="top">
198
			<td colspan="2">
199
				<p class="regtext">
200
					(<jsp:expression>clientViewBean.getMessage(ClientView.LOGIN_MESSAGE)</jsp:expression>)
201
				</p>
202
			</td>
203
		</tr>
204
		<tr>
205
			<td colspan="2"
206
				class="regtext"
207
				align="center"
208
				valign="top">
209
210 3414 leinfelder
				<!-- TODO: Config param follows -->
211
				<a
212
					href="HOSTNAME_HERE/cgiScripts/cgi-bin/ldapweb.cgi?stage=resetpass"
213
					target="_parent">reset your password</a>
214 3416 leinfelder
				|
215
				<!-- TODO: Config param follows -->
216
				<a
217 3414 leinfelder
					href="HOSTNAME_HERE/cgiScripts/cgi-bin/ldapweb.cgi?stage=changepass"
218
					target="_parent">change your password</a>
219 3405 leinfelder
			</td>
220
		</tr>
221
	</table>
222
	</form>
223
	<jsp:scriptlet>
224 3414 leinfelder
		}
225
	</jsp:scriptlet>
226
227
	</td>
228
229
	<!-- so the map frame doesn't overlap content -->
230
	<td width="50px"></td>
231
232
	</tr>
233
234
	<tr>
235
	<td colspan="2">
236
237
	<!-- File Upload Form -->
238
	<br />
239
	<h3>Data Package Upload</h3>
240
241 3405 leinfelder
	<jsp:scriptlet>
242 3414 leinfelder
		if (clientViewHelper.isLoggedIn()) {
243
	</jsp:scriptlet>
244 3405 leinfelder
	<form action="SaeonUpload.jspx">
245 3414 leinfelder
		<input name="action" type="submit" value="Go" class="button_login" />
246 3405 leinfelder
	</form>
247
	<jsp:scriptlet>
248 3414 leinfelder
		} else {
249
	</jsp:scriptlet>
250
251
	<p class="regtext">
252
		You must be logged into your user account before uploading a data set.
253
	</p>
254 3405 leinfelder
	<jsp:scriptlet>
255 3414 leinfelder
		}
256
	</jsp:scriptlet>
257
258
	</td>
259
260
	<!-- so the map frame doesn't overlap content -->
261
	<td width="50px"></td>
262
263
	</tr>
264
265
	<!--
266
	<tr>
267
		<td colspan="3">
268
		<iframe
269
			width="100%"
270
			height="400px"
271
			frameborder="0"
272
			scrolling="no"
273
			src="spatial/pma.html" />
274
		</td>
275
	</tr>
276
	-->
277
	</table>
278
279 3405 leinfelder
	</div>
280 3414 leinfelder
</body>
281
</html>
282 3404 leinfelder
</jsp:root>