<%@ include file="/includes.jsp" %>
<%@ taglib prefix="smvc" uri="http://www.springframework.org/tags/form"%>
<c:set var="namedLists" value="${dbListForm.databaseNamedLists}"/>
	
	<head>
		<title>Edit database lists</title>
		<link rel="stylesheet" href="../webapp.css" type="text/css" />
		<script src="../js/webapp.js" type="text/javascript"></script>
	</head>
	<body style="margin: 0 0 0 0" onload="window.focus()">
		<table height="100%" width="100%">
			<tr>
				<td valign="top" align="center">
					<br/>
					<smvc:form action="/admin/editList.form" styleId="form">
						<input type="hidden" name="redirectParams" value="<c:out value="${requestScope['javax.servlet.forward.query_string']}" />" />
						<table class="table">
							<tr class="tableColHeader">
							<th class="tableHeader">List name</th>
							<th class="tableHeader">Database table name</th>
							<th class="tableHeader">Key field name</th>
							<th class="tableHeader">Edit</th>
							
							</tr>
							
							<c:forEach var="nl" items="${namedLists}" >
							<tr>
								<td class="tableCell"><c:out value="${nl.name }"/></td>
								<td class="tableCell"><c:out value="${nl.tableName }"/></td>
								<td class="tableCell"><c:out value="${nl.keyFieldName }"/></td>
								<td class="tableCell"><a style="color: blue;" href="javascript:editList('<c:out value="${nl.domain }"/>', '<c:out value="${nl.name }"/>')"><img src="../images/16x16/edit.png" /></a> </td>
							</tr>
							</c:forEach> 
							
						</table>
						<br/>
					</smvc:form>
				</td>
			</tr>
		</table>
	</body>	
