<%@ page language="java" %>
<%@ include file="inc/taglib.inc.jsp" %>
<%@ include file="inc/helper.inc.jsp" %>
<vkc:init/>
<html:html locale="true">
<head>
    <title><vkc:message key="wf.workflow"/></title>
    <meta http-equiv="content-type"  content="text/html; charset=iso-8859-1" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="pragma"        content="no-cache" />
    <meta http-equiv="expires"       content="0" />
    
	<vkc:cssinclude />
	<link rel="stylesheet" href="<vkc:rewrite page='/templates/${template.name}/workflow/vkc-wf.css'/>" />

</head>
<body>
<table cellspacing="1" cellpadding="2" width="100%" border="0">
 <tr><td></td><td align="left"><h2><vkc:message key="wf.repository"/></h2></td></tr>
 <vkc:hline colspan="2" lineClass="hline" lineHeight="1" topSpace="5" bottomSpace="5"/>
  <tr>
    <td width="200" align="left" valign="top" nowrap="nowrap">
	<jsp:include page="inc/navigation.inc.jsp">
		<jsp:param name="wf-action" value="repository"/>
	</jsp:include>
	</td>
		<td width="100%" align="center" valign="center">
<!-- Packages und Repository -->
		<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
				<tr>
					<td>
					<!-- Packete öffnen/laden -->
					<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
				  		<tr><td colspan="2" align="left"><b>Workflow Pakete</b></td></tr>
			      		<tr><td colspan="2"><hr size="1" noshade="noshade" width="100%" /></td></tr>
<!-- Fehlermeldungen -->
					<jsp:include page="inc/error.inc.jsp">
		      			<jsp:param name="colspan" value="2"/>
		      		</jsp:include>
						<tr><td class="tableheader">Paket</td><td class="tableheader">Aktionen</td></tr>
						<logic:iterate id="pkg" name="package.infos" type="vkc.workflow.model.PackageInfo">
						<tr>
							<td nowrap><vkc:img page='/../templates/${template.name}/gfx/wf-package.png' border="0" alt=""/>&#160;<vkc:write name="pkg" property="path"/></td>
							<td nowrap>
							<logic:equal name="pkg" property="opened" value="false">
								<vkc:link page="/repository.do?action=open" paramId="path" paramName="pkg" paramProperty="path"><vkc:img page='/../templates/${template.name}/gfx/wf-openpackage.png' border="0" alt=""/></vkc:link>
								&#160;<vkc:img page='/../templates/${template.name}/gfx/trans.gif' width="16" height="1" border="0" alt=""/>
							</logic:equal>
							<logic:notEqual name="pkg" property="opened" value="false">
								<vkc:img page='/../templates/${template.name}/gfx/trans.gif' width="16" height="1" border="0" alt=""/>
								&#160;<vkc:link page="/repository.do?action=close" paramId="pkgId" paramName="pkg" paramProperty="packageId"><vkc:img page='/../templates/${template.name}/gfx/wf-close.png' border="0" alt=""/></vkc:link>
							</logic:notEqual>
							&#160;<vkc:link page="/repository.do?action=delete" paramId="path" paramName="pkg" paramProperty="path"><vkc:img page='/../templates/${template.name}/gfx/button-deletecategory.gif' border="0" alt=""/></vkc:link>
							</td>
						</tr>
						</logic:iterate>
					</table>
					</td>
				</tr>
				<tr><td>&#160;</td></tr>
				<tr>
					<td>
					<!-- Workflow importieren -->
					<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
					
			  		<tr><td align="left"><b>Workflow Paket importieren</b></td></tr>
		      		<tr><td><hr size="1" noshade="noshade" width="100%" /></td></tr>
		      		<logic:present name="<%=org.apache.struts.Globals.ERROR_KEY%>">
					   <html:messages id="error" message="false">
					      <tr><td nowrap="nowrap" align="left"><span class="error"><b><vkc:write name="error"/></b></span></td></tr>
					   </html:messages>
					 <tr><td><vkc:img page="/../templates/${template.name}/gfx/trans.gif" alt="" height="5" border="0"/></td></tr>
					 </logic:present>
					 <html:form action="/repository" method="post" enctype="multipart/form-data">
					 	<input type="hidden" name="action" value="upload"/>
						<tr>
							<td nowrap>
								XPDL Datei: <html:file property="wfFile" size="20"/><input type="submit" value="Importieren" />
							</td>
						</tr>
					</html:form>
					</table>
					</td>
				</tr>
			</table>
		</td>
  </tr>
</table>
</body>
</html:html>
