Files
gateway-mnp-dbc/dbcmnpsrc/FE/mnpdev/dbcgo/dbcgo/WebRoot/donorUpload.jsp
2024-05-13 12:54:14 +02:00

223 lines
8.7 KiB
Plaintext

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ page import="it.valueteam.dbcgo.common.Keys" %>
<%@ page import="it.valueteam.dbcgo.common.User" %>
<%
User user = (User)request.getSession().getAttribute("user");
if (user == null) {
%>
<jsp:forward page="<%=Keys.URL_LOGOUTACTION%>"/>
<% } %>
<html:javascript formName="donorUploadActionForm" staticJavascript="false" />
<script type="text/javascript" language="javascript">
<!--
function localValidate(f){
return validateDonorUploadActionForm(f);
}
function goToPage(pageNum){
f = document.getElementsByName('paging.pageNum')[0];
f.value=pageNum;
mySubmitNoCheck('donorUploadGoToPage.do','donorUploadActionForm');
}
-->
</script>
<html:form action="donorUploadAction" method="POST" enctype="multipart/form-data">
<bean:define id="paging" name="donorUploadActionForm" property="paging"></bean:define>
<bean:define id="pageLinkMin" name="paging" property="pageLinkMin" type="Integer"></bean:define>
<bean:define id="pageLinkMax" name="paging" property="pageLinkMax" type="Integer"></bean:define>
<bean:define id="pagePrevious" name="paging" property="pagePrevious" type="Integer"></bean:define>
<bean:define id="pageNext" name="paging" property="pageNext" type="Integer"></bean:define>
<bean:define id="rowFrom" name="paging" property="rowFrom" type="Integer"></bean:define>
<bean:define id="pageRows" name="paging" property="pageRows" type="Integer"></bean:define>
<bean:define id="pageNumber" name="paging" property="pageNum" type="Integer"></bean:define>
<html:hidden property="paging.pageNum"/>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="center">
<table border="0" cellspacing="0" cellpadding="0" width="100%" class="color0">
<tr align="center" height="30"><th class="L"><bean:message key="donorUpload.title"/></th></tr>
<tr>
<td align="center">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="40%">&nbsp;</td>
<td width="20%">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="labelLeft"><bean:message key="donorUpload.file"/></td>
<td><html:file styleClass="file" property="file"></html:file></td>
</tr>
</table>
</td>
<td width="40%">&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<% if (user.checkFunctionPermission("donorUploadAction")){ %>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="40%">&nbsp;</td>
<td width="20%">
<table border="0" cellspacing="4" cellpadding="0" class="button">
<tr>
<td>
<a class="color0" href="#" onclick="javascript:mySubmit('Invio File','donorUploadAction.do','0',true,true,false,false)">
<bean:message key="button.submit"/>
</a>
</td>
<td>
<a class="color1" href="#" onclick="javascript:myHRef('','donorUploadLoad.do', false, false)">
<bean:message key="button.cancel"/>
</a>
</td>
</tr>
</table>
</td>
<td width="40%">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<% } %>
<logic:greaterEqual name="donorUploadActionForm" property="requestNum" value="0">
<tr width="100%">
<td>
<table class="color0" width="100%" valign="top" cellpadding="0" cellspacing="0">
<tr align="center" height="30">
<th class="L"><bean:message key="donorUpload.resultTitle"/></th>
</tr>
<logic:messagesPresent message="true">
<tr align="left">
<td>
<html:messages id="msg" message="true">
<bean:write name="msg"/>
</html:messages>
</td>
</tr>
</logic:messagesPresent>
<logic:notEmpty name="donorUploadActionForm" property="requestItem">
<tr align="center">
<td>
<table class="color1 border" width="70%" cellpadding="1" cellspacing="0">
<tr>
<th align="left">
&nbsp;
</th>
<th width="15%" align="left">
<bean:message key="donorUpload.lineNum"/>
</th>
<th width="20%" align="left">
<bean:message key="donorUpload.ID_RICHIESTA"/>
</th>
<th width="15%" align="left">
<bean:message key="donorUpload.ID_PRIORITA"/>
</th>
<th width="50%" align="left">
<bean:message key="donorUpload.warning"/>
</th>
</tr>
<logic:iterate
id="requestItem"
name="donorUploadActionForm"
property="requestItem"
indexId="index"
offset="rowFrom"
length="pageRows">
<tr>
<th>
<% int index1 = index.intValue()+1; %>
<%=index1%>
</th>
<td>
<bean:write name="requestItem" property="lineNum" />
</td>
<td>
<bean:write name="requestItem" property="request.ID_RICHIESTA" />
</td>
<td>
<bean:write name="requestItem" property="request.ID_PRIORITA" />
</td>
<td>
<bean:write name="requestItem" property="uploadErrorMsg" />
</td>
</tr>
</logic:iterate>
</table>
</td>
</tr>
</logic:notEmpty>
</table>
</td>
</tr>
<logic:greaterThan name="donorUploadActionForm" property="requestNum" value="0">
<tr width="100%" align="center">
<td>
<logic:notEqual name="paging" property="pageLinkMin" value="-1">
<%
int pageLinkMin1 = pageLinkMin.intValue()+1;
String linkTo = "javascript:goToPage('" + pageLinkMin + "')";
%>
<html:link href="<%=linkTo%>">
<%=pageLinkMin1%>
</html:link>
</logic:notEqual>
<logic:notEqual name="paging" property="pagePrevious" value="-1">
<% String linkTo = "javascript:goToPage('" + pagePrevious + "')"; %>
<html:link href="<%=linkTo%>">
&lt;
</html:link>
</logic:notEqual>
<logic:iterate id="pages" name="donorUploadActionForm" property="paging.pages">
<%
int pages1 = ((Integer)pages).intValue()+1;
String linkTo = "javascript:goToPage('" + pages + "')";
String c="";
if(pageNumber.intValue()==((Integer)pages).intValue()) c="selected";
%>
<html:link styleClass="<%=c%>" href="<%=linkTo%>">
<%=pages1%>
</html:link>
</logic:iterate>
<logic:notEqual name="paging" property="pageNext" value="-1">
<% String linkTo = "javascript:goToPage('" + pageNext + "')"; %>
<html:link href="<%=linkTo%>">
&gt;
</html:link>
</logic:notEqual>
<logic:notEqual name="paging" property="pageLinkMax" value="-1">
<%
String linkTo = "javascript:goToPage('" + pageLinkMax + "')";
int pageLinkMax1=pageLinkMax.intValue()+1;
%>
<html:link href="<%=linkTo%>">
<%=pageLinkMax1%>
</html:link>
</logic:notEqual>
</td>
</tr>
</logic:greaterThan>
</logic:greaterEqual>
</table>
</html:form>