<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/displaytag" prefix="display" %>
<%@ taglib uri="/tags/esr-core" prefix="esrcore" %>								 							 
<%@ taglib uri="/tags/valuelist" prefix="vlh" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html-el" %>
<%@ taglib uri="/tags/struts-bean-el" prefix="bean-el" %>
<%@ taglib uri="/tags/fw" prefix="fw" %>


<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>
        <td nowrap style="padding-left: 7">Letters Eligible to be Mailed on behalf of Veteran</td>
        <td width="100%"><img alt=""  src="../images/spacer.gif"></td>
        <td nowrap class="moduleBlueLink" style="padding: 1 8 1 8"><fw:link forward="updateAddr"><bean:message key="button.updateVeteranAddress"/></fw:link></td>
       </tr>
      </table>
     </td>
    </tr>
    <tr> 
     <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="moduleShellTableBody">
		       <c:choose>
		        <c:when test="${vlhlist.valueListInfo.totalNumberOfEntries == 0}">
		         <tr>
		          <td class="darkValue" style="padding:10 0 10 10; text-align: left"><bean-el:message key="label.noDataAvailable"/></td>
		         </tr>
		        </c:when>
		        <c:otherwise>
			      <tr valign="top" width="100%">
			        <td vAlign="top" align="center">
			          <div id="commsAvailMail" style="border-width:0px;">
			            <table id="commsAvailMailResult" align="center" width="100%" border="0" cellpadding="0" cellspacing="0" class="moduleTable" role="presentation">
			              <vlh:root id="commsAvailMailTableId" value="vlhlist" 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="${vlhlist.valueListInfo.totalNumberOfEntries}"/> Total
			                          - Page (<c:out value="${vlhlist.valueListInfo.pagingPage}"/> of <c:out value="${vlhlist.valueListInfo.totalNumberOfPages}"/>).
			                          &nbsp;</span>
			                        </td>
			                        <td width="5%">
			                      <c:choose>
			                      <c:when test="${vlhlist.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 Letters Eligible to be Mailed on behalf of Veteran  " rules="all" class="TableDisplay">
			                    <tr>
			                      <vlh:row bean="commsTemplate">
								  
									<vlh:column titleKey="table.name" property="commsTemplateName" sortable="asc" attributes="align=\"left\" scope='col'" default="">
										<vlh:attribute name="scope">row</vlh:attribute>
			                          <esrcore:displayValue name="commsTemplate" property="commsTemplateName" nullText=""/>
			                        </vlh:column>

			                        <vlh:column titleKey="table.type" property="letterType.description" sortable="asc" attributes="align=\"left\" scope='col'" default="">
			                          <esrcore:displayValue name="commsTemplate" property="letterType.description" nullText=""/>
			                        </vlh:column>

					               <vlh:column titleKey="table.formNumber" property="commsTemplateFormNumber" sortable="asc" attributes="align=\"left\" scope='col'" default="">
			                          <esrcore:displayValue name="commsTemplate" property="commsTemplateFormNumber" nullText=""/>
			                        </vlh:column>

			                        <vlh:column titleKey="table.mail" property="name" attributes="align=\"left\" scope='col'" default="">
	                                  <a href="/esr/comms/commslog.do?methodName=mail&selectedFormNumber=<c:out value="${commsTemplate.commsTemplateFormNumber}"/>"> Mail</a>
			                        </vlh:column> 
			
			                      </vlh:row>
			                    </tr>
			                  </table>
			                </td>
			               </tr>
			              </vlh:root>
			            </table>
			          </div>
			        </td>
			      </tr>
	            </c:otherwise>
	           </c:choose>            
			
			
			
			
			
				</table>
			 <!-- module shell table body-->
	   </td>
	  </tr>
	 
	 </table>	
	 <!-- module shell table  -->
   </td>
</tr>
</table>
<!-- module shell -->
