1 |
4381
|
leinfelder
|
<%@ page language="java" %>
|
2 |
|
|
<%
|
3 |
|
|
/**
|
4 |
|
|
*
|
5 |
|
|
* '$RCSfile$'
|
6 |
|
|
* Copyright: 2008 Regents of the University of California and the
|
7 |
|
|
* National Center for Ecological Analysis and Synthesis
|
8 |
|
|
* '$Author: leinfelder $'
|
9 |
|
|
* '$Date: 2008-08-22 16:48:56 -0700 (Fri, 22 Aug 2008) $'
|
10 |
|
|
* '$Revision: 4305 $'
|
11 |
|
|
*
|
12 |
|
|
* This program is free software; you can redistribute it and/or modify
|
13 |
|
|
* it under the terms of the GNU General Public License as published by
|
14 |
|
|
* the Free Software Foundation; either version 2 of the License, or
|
15 |
|
|
* (at your option) any later version.
|
16 |
|
|
*
|
17 |
|
|
* This program is distributed in the hope that it will be useful,
|
18 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20 |
|
|
* GNU General Public License for more details.
|
21 |
|
|
|
22 |
|
|
* You should have received a copy of the GNU General Public License
|
23 |
|
|
* along with this program; if not, write to the Free Software
|
24 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
25 |
|
|
*/
|
26 |
|
|
%>
|
27 |
|
|
|
28 |
|
|
<%@ include file="../../common/common-settings.jsp"%>
|
29 |
|
|
<%@ include file="../../common/configure-check.jsp"%>
|
30 |
|
|
|
31 |
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
32 |
|
|
<%@page import="edu.ucsb.nceas.metacat.service.SessionService"%>
|
33 |
|
|
<html>
|
34 |
|
|
<head>
|
35 |
|
|
<title>FIRST Assessment Metadata Repository</title>
|
36 |
|
|
<link rel="stylesheet" type="text/css"
|
37 |
|
|
href="<%=STYLE_SKINS_URL%>/first/first.css">
|
38 |
|
|
<script language="JavaScript" type="text/JavaScript"
|
39 |
|
|
src="<%=STYLE_SKINS_URL%>/first/first.js"></script>
|
40 |
|
|
<script language="JavaScript" type="text/JavaScript"
|
41 |
|
|
src="<%=STYLE_SKINS_URL%>/first/search.js"></script>
|
42 |
|
|
<script language="JavaScript" type="text/JavaScript"
|
43 |
|
|
src="<%=STYLE_COMMON_URL%>/branding.js"></script>
|
44 |
|
|
<script language="Javascript" type="text/JavaScript"
|
45 |
|
|
src="<%=STYLE_COMMON_URL%>/prototype-1.5.1.1/prototype.js">
|
46 |
|
|
</script>
|
47 |
|
|
<script language="Javascript">
|
48 |
|
|
|
49 |
|
|
function listAssessments(){
|
50 |
|
|
var metacatURL = "<%=CONTEXT_URL%>/metacat";
|
51 |
|
|
|
52 |
|
|
var docids = new Array();
|
53 |
|
|
var objs = document.getElementsByName("@packageId");
|
54 |
|
|
for (var i=0; i< objs.length; i++) {
|
55 |
|
|
docids[i] = objs[i].value;
|
56 |
|
|
}
|
57 |
|
|
|
58 |
|
|
//generate the query to list assessments
|
59 |
|
|
var queryString =
|
60 |
|
|
generateAssessmentListString(docids);
|
61 |
|
|
|
62 |
|
|
callAjax(metacatURL, queryString, "first-assessment", "ajaxCartResults");
|
63 |
|
|
}
|
64 |
|
|
</script>
|
65 |
|
|
</head>
|
66 |
|
|
<body onload="listAssessments()">
|
67 |
|
|
<script language="JavaScript">
|
68 |
|
|
insertTemplateOpening("<%=CONTEXT_URL%>");
|
69 |
|
|
insertSearchBox("<%=CONTEXT_URL%>");
|
70 |
|
|
</script>
|
71 |
|
|
|
72 |
4387
|
leinfelder
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
73 |
4381
|
leinfelder
|
<tr>
|
74 |
|
|
<th>
|
75 |
|
|
Shopping Cart
|
76 |
|
|
<form method="POST" action="<%=SERVLET_URL%>" target="_top" id="searchForm">
|
77 |
|
|
<input name="qformat" value="first-assessment" type="hidden">
|
78 |
|
|
<input name="action" value="squery" type="hidden">
|
79 |
|
|
|
80 |
|
|
<%
|
81 |
|
|
String[] docids =
|
82 |
|
|
SessionService.getRegisteredSession(request.getSession().getId()).getDocumentCart().getDocids() ;
|
83 |
|
|
for (int i = 0; i < docids.length; i++) {
|
84 |
|
|
%>
|
85 |
|
|
<input name="@packageId" value="<%=docids[i] %>" type="hidden">
|
86 |
|
|
<%} %>
|
87 |
|
|
</form>
|
88 |
4387
|
leinfelder
|
</th>
|
89 |
|
|
</tr>
|
90 |
|
|
<tr>
|
91 |
|
|
<td>
|
92 |
|
|
Fields:
|
93 |
|
|
<ul>
|
94 |
|
|
<%
|
95 |
|
|
String[] labels =
|
96 |
|
|
SessionService.getRegisteredSession(request.getSession().getId()).getDocumentCart().getLabels();
|
97 |
|
|
for (int i = 0; i < labels.length; i++) {
|
98 |
|
|
%>
|
99 |
|
|
<li><%=labels[i] %></li>
|
100 |
|
|
<%} %>
|
101 |
|
|
</ul>
|
102 |
4381
|
leinfelder
|
</td>
|
103 |
|
|
</tr>
|
104 |
|
|
<tr>
|
105 |
|
|
<td>
|
106 |
|
|
<div id="ajaxCartResults">Loading Cart...</div>
|
107 |
|
|
</td>
|
108 |
|
|
</tr>
|
109 |
|
|
</table>
|
110 |
|
|
|
111 |
|
|
<script language="JavaScript">
|
112 |
|
|
insertTemplateClosing("<%=CONTEXT_URL%>");
|
113 |
|
|
</script>
|
114 |
|
|
</body>
|
115 |
|
|
</html>
|