<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/displaytag-12.tld" prefix="display"%>
  
<h1><bean:message key="prompt.jobDefinitionListForm.title"/></h1>

<div id="COMMANDTAG">
	<table border="0" cellpadding="0" cellspacing="0" valign="top" width="100%">
		<tr>
			<td colspan="6" height="1"><hr/></td>
		</tr>
		<tr>
			<td height="20" width="15%">
				<html:link href="jobDefinitionEdit.do"><bean:message key="prompt.jobDefinitionListForm.addDefinition"/></html:link>
			</td>
			<td height="20" width="15%">
				<html:link href="jobDefinitionDump.do"><bean:message key="prompt.jobDefinitionListForm.dumpDefinition"/></html:link>
			</td>
			<td height="20" width="15%">&nbsp;</td>
			<td height="20">&nbsp;</td>
			<td height="20" width="12%">&nbsp;</td>
		</tr>
	</table>
</div>

<div id="DISPLAYTAG">
<div style="OVERFLOW-Y: auto; " id=DIV1>

	<logic:present name="definitionManager" property="definitionList" scope="application">

		<display:table id="oneDefinition" name="definitionManager" property="definitionList" scope="application">
			<display:column property="name"  width="15%"  titleKey="prompt.jobDefinitionListForm.jobName" href="jobDefinitionEdit.do" paramId="definitionName" paramProperty="name"/>
			<display:column property="description"  width="40%"  titleKey="prompt.jobDefinitionListForm.jobDescription"/>
			<display:column width="10%" titleKey="prompt.jobDefinitionListForm.addToSchedule" href="jobCreate.do" paramId="definitionName" paramProperty="name">
				<bean:message key="prompt.jobDefinitionListForm.addToSchedule"/>
			</display:column>
			<display:column width="25%" titleKey="prompt.jobDefinitionListForm.parameter">
				<logic:iterate id="parameter" name="oneDefinition" property="parameters">
		            <li>
		            	<bean:write name="parameter" property="name"/>&nbsp;&nbsp;<bean:message key="prompt.jobDefinitionListForm.required"/>=<bean:write name="parameter" property="required"/>
		            </li>
		        </logic:iterate>
			</display:column>
			<display:column align="center"  width="10%" titleKey="prompt.jobDefinitionListForm.jobDelete">
				<html:link onclick="javascript:return confirm('Delete Job Defintion');" href="jobDefinitionDelete.do" paramId="definitionName" paramName="oneDefinition" paramProperty="name">
					<bean:message key="prompt.jobDefinitionListForm.jobDelete"/>
				</html:link>
			</display:column>
			
		</display:table>

	</logic:present>
	
</div>
</div>  