Project

General

Profile

1
<?xml version="1.0" encoding="UTF-8"?>
2
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
3

    
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
        private ClientViewHelper clientViewHelper = null;
15
    </jsp:declaration>
16

    
17
<html xmlns="http://www.w3.org/1999/xhtml">
18
<head>
19

    
20
	<script type="text/javascript">
21
                
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
    </script>
53

    
54
	<title>SANParks - South African National Park Data Repository</title>
55
	<link href="sanparks.css" rel="stylesheet" type="text/css" />
56

    
57
</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

    
68
	<table>
69
	<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
	<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
		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
		</p>
100
			<input name="anyfield" value="" type="text" size="14" /> 
101
			<input name="action" value="Search" type="submit" /> 
102
		
103
	</form>
104
	<p class="regtext">
105
	-Or-
106
	</p>
107
	<form name="browseform" method="post" action="../../../metacat"
108
		target="_top">
109
		<jsp:include page="SimpleSearchMetacatPostFields.html" /> 
110
		<input name="anyfield" type="hidden" value="%" /> 
111
		<jsp:element name="input">
112
			<jsp:attribute name="name">sessionid</jsp:attribute>
113
			<jsp:attribute name="type">hidden</jsp:attribute>
114
			<jsp:attribute name="value">
115
				<jsp:getProperty name="clientViewBean" property="sessionid" />
116
			</jsp:attribute>
117
		</jsp:element>
118
		<p class="regtext">
119
		Browse all existing data sets by title. This operation can be slow.
120
		</p>
121
		<input name="action" value="Browse All" type="submit" />
122
	</form>
123

    
124
	</td>
125
	<td>
126
	
127
	<!-- Login section -->
128
	<jsp:scriptlet>
129
		if (!clientViewHelper.isLoggedIn()) {
130
	</jsp:scriptlet>
131
	
132
	<h3>
133
		Login
134
		<!-- TODO: Config param follows --> 
135
		<a href="HOSTNAME_HERE/cgiScripts/cgi-bin/ldapweb.cgi" target="_parent">
136
			<span class="regtext"> (request an account...)</span>
137
		</a>
138
	</h3>
139
	<form name="loginForm" method="post" action="SaeonLogin.jspx"
140
		onsubmit="return allowSubmit(this)">
141
		<input name="qformat" type="hidden" value="sanparks" />
142
	<table>
143
		<tr valign="top">
144
			<td>
145
				<span class="required">User name</span>	
146
			</td>
147
			<td>
148
				<input name="username" type="text" value=""
149
				style="width: 140" />
150
			</td>
151
		</tr>
152
		<tr>
153
			<td><span class="required">Organization</span></td>
154
			<td><select name="organization" style="width: 140">
155
				<option value="SANParks" selected="">SANParks</option>
156
				<option value="SAEON">SAEON</option>
157
				<option value="NCEAS">NCEAS</option>
158
				<option value="unaffiliated">unaffiliated</option>
159
			</select></td>
160
		</tr>
161
		<tr>
162
			<td><span class="required">Password</span></td>
163
			<td><input name="password" value="" type="password"
164
				style="width: 140" maxlength="50" /></td>
165
		</tr>
166
		<tr>
167
			<td colspan="2" align="center">
168
				<input name="action"
169
				value="Login" type="submit" class="button_login" />
170
			</td>
171
		</tr>
172
	</table>
173
	</form>
174
	
175
	<jsp:scriptlet>
176
		} else {
177
	</jsp:scriptlet>
178
	<form name="logoutForm" method="post" action="SaeonLogin.jspx">
179
	<input name="qformat" value="sanparks" type="hidden" />
180
	<table>
181
		<tr>
182
			<td>
183
			<p class="regtext">Account: <jsp:expression>clientViewBean.getMessage(ClientView.LOGIN_MESSAGE)</jsp:expression></p>
184
			</td>
185
			<td rowspan="2" 
186
				class="regtext" align="right" 
187
				valign="top"
188
				style="width: 160">
189
				<div>
190
				<!-- TODO: Config param follows --> 
191
				<a
192
					href="HOSTNAME_HERE/cgiScripts/cgi-bin/ldapweb.cgi?stage=resetpass"
193
					target="_parent">reset your password</a>
194
				</div>
195
				<div>
196
				<!-- TODO: Config param follows --> <a
197
					href="HOSTNAME_HERE/cgiScripts/cgi-bin/ldapweb.cgi?stage=changepass"
198
					target="_parent">change your password</a>
199
				</div>
200
			</td>
201
		</tr>
202
		<tr>
203
			<td align="center"><input name="action" type="submit"
204
				value="Logout" class="button_login" /></td>
205
		</tr>
206
	</table>
207
	</form>
208
	<jsp:scriptlet>
209
		}
210
	</jsp:scriptlet> 
211
	
212
	</td>
213
	
214
	<!-- so the map frame doesn't overlap content -->
215
	<td width="50px"></td>
216
	
217
	</tr>
218
	
219
	<tr>
220
	<td colspan="2">
221
	
222
	<!-- File Upload Form --> 
223
	<br />
224
	<h3>Data Package Upload</h3>
225
	
226
	<jsp:scriptlet>
227
		if (clientViewHelper.isLoggedIn()) {
228
	</jsp:scriptlet>
229
	<form action="SaeonUpload.jspx">
230
		<input name="action" type="submit" value="Go" class="button_login" />
231
	</form>
232
	<jsp:scriptlet>
233
		} else {
234
	</jsp:scriptlet>
235
	
236
	<p class="regtext">
237
		You must be logged into your user account before uploading a data set.
238
	</p>
239
	<jsp:scriptlet>
240
		}
241
	</jsp:scriptlet>
242
	
243
	</td>
244
	
245
	<!-- so the map frame doesn't overlap content -->
246
	<td width="50px"></td>
247
	
248
	</tr>
249
	
250
	<!--
251
	<tr>
252
		<td colspan="3">
253
		<iframe 
254
			width="100%"
255
			height="400px"
256
			frameborder="0"
257
			scrolling="no"
258
			src="spatial/pma.html" />
259
		</td>
260
	</tr>
261
	-->
262
	</table>
263
	
264
	</div>
265
</body>
266
</html>
267
</jsp:root>
(2-2/16)