<?xml version="1.0" encoding="ISO-8859-1" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html" version="2.0">
	<jsp:directive.page language="java"
		contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" />
	<jsp:text>
		<![CDATA[ <?xml version="1.0" encoding="ISO-8859-1" ?> ]]>
	</jsp:text>
	<jsp:text>
		<![CDATA[ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ]]>
	</jsp:text>
	<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<jsp:include page='../includes/header.jsp'>
		<jsp:param name="title" value="preview details page" />
	</jsp:include>
	</head>
	<body>	
	<f:view>
		<jsp:include page='../includes/header_body.jsp' />
		<jsp:include page='../includes/topMenu.jsp' />
		<jsp:include page='../includes/leftMenu.jsp' />	
		<div id="CONTENT" >		
		<h:form>
			<h:panelGrid border="0" columns="1">
				<f:facet name="header">
					<h:outputText value="#{resources['reviewDetailsPage.form.label']}"></h:outputText>
				</f:facet>
				
				<h:dataTable border="1" value="#{reviewDetailsBean.questions}"
					 var="question">					 					 
					<h:column >		
						<h:outputText value="#{question.question}"></h:outputText>				
						<h:dataTable border="0" value="#{question.selectedAnswersList}" var="answer">
							<h:column>
								<h:outputText value=" - #{answer.answer}"></h:outputText>	
							</h:column>
						</h:dataTable>																																	
					</h:column>
				</h:dataTable>			
				
				<h:panelGroup >
					<h:outputText value="#{resources['addReviewPage.field.label.grade']}: " />
					<h:outputText value="#{visitBean.currentReview.grade}"></h:outputText>
				</h:panelGroup>
				
				<h:panelGroup>
					<h:outputText value="#{resources['addReviewPage.field.label.commentForAuthor']}: " />
					<h:outputText  value="#{visitBean.currentReview.commentsToAuthor}" />				
				</h:panelGroup>
				
				<h:panelGroup rendered="#{visitBean.user.role == 3 || visitBean.user.role == 1}">
					<h:outputText value="#{resources['addReviewPage.field.label.commentForOrganizator']}: "/>
					<h:outputText  value="#{visitBean.currentReview.commentsToOrganisator}" />					
				</h:panelGroup>
								
			</h:panelGrid>
		</h:form>	
		</div>
		<jsp:include page='../includes/footer.jsp' />
	</f:view>
	</body>
	</html>
</jsp:root>