<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html-el" %>
<%@ taglib uri="/tags/struts-bean-el" prefix="bean-el" %>
<%@ taglib uri="/tags/displaytag" prefix="display" %>
<%@ taglib uri="/tags/esr-core" prefix="esrcore" %>
<%@ taglib uri="/tags/valuelist" prefix="vlh" %>
<%@ taglib uri="/tags/fw" prefix="fw" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/tags/authz" prefix="auth" %>
<%@ page import='gov.va.med.esr.common.model.lookup.Capability' %>

<c:set var="canResubmit" value="false"/>
<auth:authorize ifAnyGranted="<%=Capability.MANAGE_ACA_COMMUNICATIONS.getName()%>">
  <c:set var="canResubmit" value="true"/>
</auth:authorize>

<table width="100%" border="0" cellpadding="0" cellspacing="0" class="moduleShell">
<tr>
 <td>
   <table width="100%" border="0" cellpadding="0" cellspacing="0" class="moduleShellTable">
    <tr>
     <td>
      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="moduleShellTableHead">
       <tr>
         <td class="moduleBlueBox"><img alt=""  src="../images/spacer.gif" width="25" height="15"/></td>
         <th nowrap style="padding-left: 7">
         <esrcore:displayValue name="commsLogForm" property="selectedFormNumber" nullText=""/> -
         <esrcore:displayValue name="commsLogForm" property="selectedFormName" nullText=""/></th>
         <c:if test="${canResubmit == true && commsLogForm.selectedCorrespondence.correspondenceStatus.description == 'QUEUED FOR TRANSMISSION TO CMS DURING NEXT AVAILABLE TRANSFER'}">
			<td width="100%"><img alt=""  src="../images/spacer.gif"></td>
	        	<td nowrap class="moduleBlueLink"
				style="padding: 1px 8px 1px 8px">
				<fw:link action="/commslog.do?methodName=Cancel ACA&amp;submissionId=${commsLogForm.selectedCommsLogId}">
				<bean-el:message key="text.cancelACAMail" />
			</fw:link></td>
			<td><img alt=""  src="../images/spacer.gif" width="5"/></td>
		</c:if>
         <c:if test="${canResubmit == true && commsLogForm.selectedFormName == 'ACA TAX FORM 1095B'}">
			<td width="100%"><img alt=""  src="../images/spacer.gif"></td>
	        	<td nowrap class="moduleBlueLink"
				style="padding: 1px 8px 1px 8px">
				<fw:link action="/commslog.do?methodName=Remail ACA&amp;submissionId=${commsLogForm.selectedCommsLogId}">
				<bean-el:message key="text.remailACA" />
			</fw:link></td>
			<td><img alt=""  src="../images/spacer.gif" width="5"/></td>
		</c:if>
         <td width="100%"><img alt=""  src="../images/spacer.gif"></td>
        	<td nowrap class="moduleBlueLink"
			style="padding: 1px 8px 1px 8px">
			<fw:link
			action="/commslog.do?methodName=ACA Reporting">
			<bean-el:message key="text.returnACA" />
		</fw:link></td>

       </tr>
      </table>
     </td>
    </tr>
    <tr>
     <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="moduleShellTableBody">

		<tr valign="top">
		  <th width="172" class="moduleLabel"><div align="left">ID Number:</div></th>
		  <td class="moduleValue"><div align="left"><esrcore:displayValue name="commsLogForm" property="selectedCommsLogId" nullText=""/></div></td>
		  <th class="moduleLabel"></th>
		  <td class="moduleValue"></td>
		</tr>
		<tr valign="top">
		  <th class="moduleLabel"><div align="left">Correspondence Type:</div></th>
		  <td class="moduleValue"><div align="left"><esrcore:displayValue name="commsLogForm" property="selectedCorrespondence.correspondenceType.description" nullText=""/></div></td>
		  <th class="moduleLabel"></th>
		  <td class="moduleValue"></td>
		</tr>
		<tr valign="top">
		  <th class="moduleLabel"><div align="left">Tax Year:</div></th>
		  <td class="moduleValue"><div align="left"><esrcore:displayValue name="commsLogForm" property="selectedCorrespondence.taxYear" nullText=""/></div></td>
		  <th class="moduleLabel"></th>
		  <td class="moduleValue"></td>
		</tr>
		<tr valign="top">
		  <th class="moduleLabel"><div align="left">Correction Ind:</div></th>
		  <td class="moduleValue"><div align="left"><esrcore:displayValue name="commsLogForm" property="selectedCorrespondence.correctionInd" nullText=""/></div></td>
		  <th class="moduleLabel"></th>
		  <td class="moduleValue"></td>
		</tr>
		<tr valign="top">
		  <th class="moduleLabel"><div align="left">Communication Status:</div></th>
		  <td class="moduleValue"><div align="left"><esrcore:displayValue name="commsLogForm" property="selectedCorrespondence.correspondenceStatus.name" nullText=""/></div></td>
		  <th class="moduleLabel"></th>
		  <td class="moduleValue"></td>
		</tr>
		<tr valign="top">
		  <th class="moduleLabel"><div align="left">Status Description:</div></th>
		  <td class="moduleValue"><div align="left"><esrcore:displayValue name="commsLogForm" property="selectedCorrespondence.correspondenceStatus.description" nullText=""/></div></td>
		  <th class="moduleLabel"></th>
		  <td class="moduleValue"></td>
		</tr>
		<tr valign="top">
		  <th class="moduleLabel"><div align="left">Status Date/Time:</div></th>
		  <td class="moduleValue"><div align="left"><esrcore:displayDate name="commsLogForm" dateProperty="selectedCorrespondence.statusDate" format="MM/dd/yyyy h:mm:ss a"/></div></td>
		  <th class="moduleLabel"></th>
		  <td class="moduleValue"></td>
		</tr>
		<tr valign="top">
		  <th class="moduleLabel"><div align="left">Error Description:</div></th>
		  <td class="moduleValue"><div align="left"><esrcore:displayValue name="commsLogForm" property="selectedCorrespondence.errorDescription" nullText=""/></div></td>
		  <th class="moduleLabel"></th>
		  <td class="moduleValue"></td>
		</tr>
		<tr valign="top">
		  <th class="moduleLabel"><div align="left">Mailing Address:</div></th>
		  <td class="moduleValue"><div align="left"><esrcore:displayValue name="commsLogForm" property="selectedCorrespondence.mailingAddressText"/></div></td>
		  <th class="moduleLabel"></th>
		  <td class="moduleValue">&quot;</td>
		</tr>
	</table>
	<!-- module shell table body-->
	</td>
</tr>

</table>
<!-- module shell table  -->
</td>
</tr>
</table>
<!-- module shell -->

<br/>



<table width="100%" border="0" cellpadding="0" cellspacing="0" class="moduleShell">
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="moduleShellTable">
<tr>
  <td>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="moduleShellTableHead">
      <tr>
        <td class="moduleBlueBox">&nbsp;</td>
        <td width="80%" class="moduleHeadline">Status History</td>
        <td width="18%" class="moduleHeadline">&nbsp;</td>
      </tr>
    </table>
  </td>
</tr>
<tr>
  <td>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="moduleShellTableBody">
        <tr valign="top">
          <td vAlign="top" align="center">
            <div id="corrStatus" style="border-width:0px;">
              <table id="corrStatusResult" align="center" width="100%" border="0" cellpadding="0" cellspacing="0" class="moduleTable" role="presentation">
                <vlh:root id="corrStatusTableId" value="vlhStatusList" url="?" includeParameters="*" configName="valueListConfigBeanLookAndFeel">
                  <vlh:addParam name="checkboxName" value="Select" temp="false"/>
                  <tr>
                    <td colspan="5">
                      <table class="pagelinks">
                        <tr>
                          <td width="45%"><img alt=""  src="../images/spacer.gif"></td>
                          <td width="5%" nowrap="true">
		                          <span class="pagebanner"><c:out value="${vlhStatusList.valueListInfo.totalNumberOfEntries}"/> Total
		                          - Page (<c:out value="${vlhStatusList.valueListInfo.pagingPage}"/> of <c:out value="${vlhStatusList.valueListInfo.totalNumberOfPages}"/>).
		                          &nbsp;</span>
                          </td>
                          <td width="5%">
                            <c:choose>
                              <c:when test="${vlhStatusList.valueListInfo.totalNumberOfPages > 1}">
                                <vlh:paging attributes="class=\"pagelinks\"" pages="10"><c:out value="${pagefutureEGTSettingsTableId}"/>&nbsp;</vlh:paging>
                              </c:when>
                              <c:otherwise>
                                &nbsp;
                              </c:otherwise>
                            </c:choose>
                          </td>
                          <td width="45%"><img alt=""  src="../images/spacer.gif"></td>
                        </tr>
                      </table>
                    </td>
                  </tr>
                  <tr vAlign="top">
                    <td vAlign="top" align="center">
                      <table summary="List of Status Dates and Descriptions" rules="all" class="TableDisplay">
                        <tr>
                          <vlh:row bean="statusLog">
                            <vlh:column titleKey="table.statusDate" property="statusDate" sortable="asc" format="MM/dd/yyyy h:mm:ss a" attributes="width='200' align=\"left\" scope='col'" default="">
                              <vlh:attribute name="scope">row</vlh:attribute>
                              <esrcore:displayDate name="Correspondence" dateProperty="statusDate" format="MM/dd/yyyy h:mm:ss a"/>
                            </vlh:column>
                             <vlh:column titleKey="table.status" property="correspondenceStatus.name" sortable="asc" attributes="align=\"left\" scope='col'" default="">
                              <esrcore:displayValue name="Correspondence" property="correspondenceStatus.name" nullText=""/>
                            </vlh:column>
                           <vlh:column titleKey="table.statusDescription" property="correspondenceStatus.description" sortable="asc" attributes="align=\"left\" scope='col'" default="">
                              <esrcore:displayValue name="Correspondence" property="correspondenceStatus.description" nullText=""/>
                            </vlh:column>
                          </vlh:row>
                        </tr>
                      </table>
                    </td>
                  </tr>
                </vlh:root>
              </table>
            </div>
          </td>
        </tr>

    </table>
    <!-- module shell table body-->
  </td>
</tr>

</table>
<!-- module shell table  -->
</td>
</tr>
</table>
<!-- module shell -->


