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="query" type="hidden" />  
102
			<input name="search" value="Search" type="submit" /> 
103
		
104
	</form>
105
	<p class="regtext">
106
	-Or-
107
	</p>
108
	<form name="browseform" method="post" action="../../../metacat"
109
		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
		<input name="action" value="query" type="hidden" />
123
		<input name="browse" value="Browse All" type="submit" />
124
	</form>
125

    
126
	</td>
127
	<td>
128
	
129
	<!-- Login section -->
130
	<jsp:scriptlet>
131
		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
	<form name="loginForm" method="post" action="SaeonLogin.jspx"
142
		onsubmit="return allowSubmit(this)">
143
		<input name="qformat" type="hidden" value="sanparks" />
144
	<table>
145
		<tr valign="top">
146
			<td>
147
				<span class="required">User name</span>	
148
			</td>
149
			<td>
150
				<input name="username" type="text" value=""
151
				style="width: 140" />
152
			</td>
153
		</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
			<td colspan="2" align="center">
170
				<input name="action"
171
				value="Login" type="submit" class="button_login" />
172
			</td>
173
		</tr>
174
	</table>
175
	</form>
176
	
177
	<jsp:scriptlet>
178
		} else {
179
	</jsp:scriptlet>
180
	<h3>
181
		Welcome,
182
		<jsp:expression>clientViewBean.getUsername()</jsp:expression>  
183
	</h3>
184
	<form name="logoutForm" method="post" action="SaeonLogin.jspx">
185
	<input name="qformat" value="sanparks" type="hidden" />
186
	<table>
187
		<tr valign="top">
188
			<td>
189
				<p class="regtext">
190
					You are currently logged in.
191
				</p>
192
			</td>
193
			<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
				<!-- 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
				|
215
				<!-- TODO: Config param follows --> 
216
				<a
217
					href="HOSTNAME_HERE/cgiScripts/cgi-bin/ldapweb.cgi?stage=changepass"
218
					target="_parent">change your password</a>
219
			</td>
220
		</tr>
221
	</table>
222
	</form>
223
	<jsp:scriptlet>
224
		}
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
	<jsp:scriptlet>
242
		if (clientViewHelper.isLoggedIn()) {
243
	</jsp:scriptlet>
244
	<form action="SaeonUpload.jspx">
245
		<input name="action" type="submit" value="Go" class="button_login" />
246
	</form>
247
	<jsp:scriptlet>
248
		} 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
	<jsp:scriptlet>
255
		}
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
	</div>
280
</body>
281
</html>
282
</jsp:root>
(2-2/16)