Project

General

Profile

« Previous | Next » 

Revision 4387

can now select and save metadata fields from a document and use them when merging across documents in the "cart"

View differences:

header.jsp
28 28
<%@ include file="../../common/common-settings.jsp"%>
29 29
<%@ include file="../../common/configure-check.jsp"%>
30 30
<%@page import="edu.ucsb.nceas.metacat.service.SessionService"%>
31
<%@page import="java.util.Map"%>
31 32

  
33

  
32 34
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
35
<%@page import="java.util.Iterator"%>
33 36
<html>
34 37
<head>
35 38
<title>FIRST Data Repository</title>
......
38 41
</head>
39 42

  
40 43
<body>
41
<table width="760" border="0" cellspacing="0" cellpadding="0">
44
<table width="100%" border="0" cellspacing="0" cellpadding="0">
42 45
	<tr valign="top">
43
		<td>
46
		<td width="400">
44 47
			<img src="<%=STYLE_SKINS_URL%>/first/images/first2banner.jpg">	
45 48
		</td>
46 49
		<td>
47
			<table>
50
			<table width="100%">
48 51
				<tr>
49 52
					<th colspan="3" class="title">
50 53
						FIRST Data Repository
......
68 71
						<%
69 72
						String[] docids = 
70 73
							SessionService.getRegisteredSession(request.getSession().getId()).getDocumentCart().getDocids();
74
						Map fields = 
75
							SessionService.getRegisteredSession(request.getSession().getId()).getDocumentCart().getFields();
71 76
						%>
72 77
						<a href="cart.jsp" target="_top">
73
							Cart Items: 
78
							Cart 
74 79
						</a>	
75
							<%=docids.length %>	
80
							(Items: <%=docids.length %>, Fields: <%=fields.size() %>)
76 81
					</td>
77 82
				</tr>
83
				<tr>
84
					<td colspan="3">
85
						<!-- for use when downloading merged data -->
86
						<form id='fieldForm'>
87
						<%
88
						Iterator fieldIter =  fields.keySet().iterator();
89
						while (fieldIter.hasNext()) {
90
							String key = (String) fieldIter.next();
91
							String value = (String) fields.get(key);
92
						%>
93
							<input type="hidden" name="<%=key %>" value="<%=value %>" />
94
						<%	
95
						}
96
						%>	
97
						</form>
98
					</td>
99
				</tr>
78 100
			</table>
79 101
		</td>
80 102
	</tr>

Also available in: Unified diff