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

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



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


<c:if test="${empty articleList }">
    <div class="warningBox">
    	<fmt:message key="warning.articleList.empty" />
    	<a href="<c:url value="listConference.htm"/>"><fmt:message key="home.link.choose" /></a>
    </div>
</c:if>

<c:if test="${not empty articleList}">
	<p class="formHelp">
  		<fmt:message key="preference.help"/>
	</p>
	<form:form method="post" commandName="choosePreference">
	<table width="100%">
		<tr>
			<td width="40%">&nbsp;</td>
			<td width="20%" align="center"><img src="./images/smiley_dislike.png" alt="dislike "title="<fmt:message key="preference.dislike"/>"/></td>
			<td width="20%" align="center"><img src="./images/smiley_indifferent.png" alt="indifferent "title="<fmt:message key="preference.indifferent"/>"/></td>
			<td width="20%" align="center"><img src="./images/smiley_like.png" alt="like "title="<fmt:message key="preference.like"/>"/></td>
		</tr>
		<tr><td colspan="4" height="2"></td></tr>
    <c:forEach items="${articleList}" var="article" varStatus="i">
    <tr>
        <td>
        	<a href="<c:url value='detailArticle.htm?id=${article.id}'/>">${article.title}</a>
        </td>
        <form:hidden path="preferences[${i.index}].article.id" />
        <form:hidden path="preferences[${i.index}].pcMember.login" />
	    <td  align="center">
	    	<form:radiobutton path="preferences[${i.index}].preferenceType" value="DISLIKE"/>
	    </td>
	    <td  align="center">
	    	<form:radiobutton path="preferences[${i.index}].preferenceType" value="INDIFFERENT"/>
	    </td>
	    <td  align="center">
	    	<form:radiobutton path="preferences[${i.index}].preferenceType" value="LIKE"/>
	    </td> 
   </tr>
   </c:forEach>
   </table>
   <br />
   <center><input type="submit" name="submit" value="<fmt:message key="button.OK"/>"/></center>
   </form:form>
</c:if>


<c:if test="${param['message'] eq 'done'}">
<p class="formOk">
	You have successfully updated the preference.<br/>
	You can modify your choices immediately or later.<br/>
</p>
</c:if>

  </body>
</html>
