<%@ include file="/WEB-INF/decorators/include.jsp"%>

<html>
<head></head>
<body>
<h4 class="title">Validate an article</h4>

<p class="formHelp">
  	Choose whether you want to validate an article (i.e. the article will be featured in the conference) or reject it. 
</p>

<c:forEach items="${listArticleValidate}" var="article">
	<div style="border: 1px solid orange;">
		<table style="width: 100%; text-align: center;">
		<tr>
			<td colspan="3"><b>${article.title}</b></td>
		</tr>
		<tr>
		<td width="25%">
			Author :<br />
			${article.mainAuthor.firstName} ${article.mainAuthor.lastName}
		</td>
		<td  width="50%">
			<a class="download" title="Download" href="<c:url value="/download.htm"><c:param name="articleId" value="${article.id}"/></c:url>">Download</a>
		</td>
		<td width="25%" valign="bottom">
		
			<c:choose>
				<c:when test="${article.state != 'REJECTED' and article.state != 'ACCEPTED'}">
					<a href="<c:url value="validateOrReject.htm?value=valide&id=${article.id}"/>"
						onclick="return confirm('You are about to validate this article. This operation cannot be undone. Do you want to continue ?')">
					<fmt:message key="validate.validate" /><img	src="./images/ok.png" alt="Validate" /></a> 
					<br />
					<a href="<c:url value="validateOrReject.htm?value=reject&id=${article.id}"/>"
						onclick="return confirm('You are about to reject this article. This operation cannot be undone. Do you want to continue ?')">
						<fmt:message key="validate.reject" /><img src="./images/cancel.png" alt="Reject" /></a>
				</c:when>
				<c:otherwise>
					<c:if test="${article.state == 'REJECTED'}">
						<img src="./images/cancel.png" alt="Rejected" />
					</c:if>
					<c:if test="${article.state == 'ACCEPTED'}">
						<img src="./images/ok.png" alt="Validated" />
					</c:if>
					State: ${article.state}
				</c:otherwise>
			</c:choose>
		
		</td>
		</tr>
		<c:if test="${article.state == 'EVALUATED' or article.state == 'REJECTED' or article.state == 'ACCEPTED'}">
			<tr>
				<td colspan="3">
					<a href="<c:url value="listReport.htm?id=${article.id}"/>"><fmt:message	key="validate.report" /></a>
				</td>
			</tr>
		</c:if>
		</table>
	</div>
</c:forEach>

</body>
</html>