<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/WEB-INF/jspf/include/taglibs.jsp"%>
<c:if test="${not empty dataMap['memoList']}">
	<div class="report">
		<table cellspacing='1' width="100%">
  		<thead>
  			<tr>
  	  			<td width="40">ID</td>
  	  			<td width="130">Дата</td>
  	  			<td>Заголовок</td>
  	  		</tr>
  		</thead>
  		<tbody>
  			<c:forEach var="item" items="${dataMap['memoList']}">
			<tr valign="top">
				<td style="text-align: right;">${item.id}</td>				
				<td><fmt:formatDate value="${item.time}" pattern="dd.MM.yyyy HH:mm:ss"/></td>
				<td style="text-align: left;"><a href="?action=Memo&module=contract&id=${item.id}">${item.subject}</a></td>
			</tr>
  			</c:forEach>
  		</tbody>
		</table>
	</div>
</c:if>
<c:if test="${not empty dataMap['contractMemo']}">
	<c:set var="contractMemo" value="${dataMap['contractMemo']}" />
	<div class="MemoDate"><span>Дата:</span> <fmt:formatDate value="${contractMemo.time}" pattern="dd.MM.yyyy HH:mm:ss"/></div>
	<div class="MemoTitle"><span>Заголовок:</span> ${contractMemo.subject}</div>
	<div class="MemoComment"><textarea style="width: 100%; height: 300px; font-size: 10pt; padding: 5px;">${contractMemo.comment}</textarea></div>
	<c:url var="url" value="">
		<c:param name="action" value="MemoTable" />
		<c:param name="module" value="contract" />
	</c:url>
	<div style="margin-top: 10px;"><input type="button" value="К списку ..." onclick="document.location='${url}'"></div>	
</c:if>