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

<html>
<head></head>
<body>

<h4 class="title"><fmt:message key="report.headPage" /></h4>

<c:choose>
	<c:when test="${(empty listReport) and ( empty rpt) }">
		<div class="warningBox">There is no report for this article at
		the moment.</div>
	</c:when>

	<c:otherwise>
<c:choose>
<c:when test="${not empty listReport }">

               <div id="account_data">
				<p class="legend">Statistic of averages</p>
				<fieldset>
				<authz:authorize ifAllGranted="ROLE_CHAIRMAN">
					<table>
						<c:set var="OneRatings" value="${container[0]}" />
						<c:forEach items="${OneRatings}" var="rating" varStatus="i">
							<tr>
								<td>The average for <b>${rating.criterion.name}</b> is
								<font color="green">${listMoyenne[i.index]}</font></td>
							</tr>
						</c:forEach>

					</table>
				</authz:authorize>
				</fieldset>
				</div>

<c:forEach items="${listReport}" var="report" varStatus="current">

<div id="account_data">
	<p class="legend"><fmt:message key="report.referee" />: ${report.referee.firstName} ${report.referee.lastName}</p>
	<fieldset>
		<div>
			<label><fmt:message key="evaluation.titleArticle" /></label>
			<span class="content">${report.article.title}</span>
		</div>
	<br />
		<c:forEach items="${container[current.index]}" var="rating">
			<label><fmt:message key="evaluation.note" /> <b>${rating.criterion.name}</b> is : </label>
			<span class="content">${rating.value}</span><br />
		</c:forEach>

		
		<div>
			<label><fmt:message key="evaluation.commentPCMember" /></label>
			<span class="content">${report.commentPCMember}</span>
		</div>
		<div>
			<label><fmt:message key="evaluation.commentAuthor" /></label>
			<span class="content">${report.commentAuthor}</span>
		</div>
	</fieldset>

</div>
</c:forEach>

				
			</c:when>
<c:otherwise>

<div id="account_data">
	<p class="legend"><fmt:message key="report.referee" />: ${rpt.referee.firstName} ${rpt.referee.lastName}</p>
	<fieldset>
		<div>
			<label><fmt:message key="evaluation.titleArticle" /></label>
			<span class="content">${rpt.article.title}</span>
		</div>
	<br />
		<c:forEach items="${rtgs}" var="rating">
			<label><fmt:message key="evaluation.note" /> <b>${rating.criterion.name}</b> is : </label>
			<span class="content">${rating.value}</span><br />
		</c:forEach>

		
		<div>
			<label><fmt:message key="evaluation.commentPCMember" /></label>
			<span class="content">${rpt.commentPCMember}</span>
		</div>
		<div>
			<label><fmt:message key="evaluation.commentAuthor" /></label>
			<span class="content">${rpt.commentAuthor}</span>
		</div>
	</fieldset>

</div>			

			</c:otherwise>
		</c:choose>

	</c:otherwise>

</c:choose>

<br />
<a class="back_link" href="<c:url value="${whereIcome}"/>"><fmt:message
	key="form.link.back" /></a>

</body>
</html>
