Ajout du forum

This commit is contained in:
Frederic Debuire
2008-02-24 10:28:28 +00:00
parent 271b1761bb
commit 04e92cd65e
9 changed files with 314 additions and 2 deletions

View File

@@ -72,6 +72,7 @@ menu.chairman.article.list=Article's list
menu.chairman.article.dispatch=Dispatch articles
menu.chairman.article.validate=Validate articles
menu.chairman.article.conflict=Manage the conflict list
menu.chairman.article.discussion=Article's discussion
menu.pcmember.title=PC Member
menu.pcmember.article.preference=Article's preference

View File

@@ -39,6 +39,7 @@
<li><a href="<c:url value="dispatchArticle.htm"/>"><fmt:message key="menu.chairman.article.dispatch" /></a></li>
<li><a href="<c:url value="validateArticle.htm"/>"><fmt:message key="menu.chairman.article.validate" /></a></li>
<li><a href="<c:url value="conflictList.htm"/>"><fmt:message key="menu.chairman.article.conflict" /></a></li>
<li><a href="<c:url value="forum.htm?role=chairman"/>"><fmt:message key="menu.chairman.article.discussion" /></a></li>
</ul>
<div id="footer"></div>
</div>
@@ -52,7 +53,7 @@
<li><a href="<c:url value="choosePreference.htm"/>"><fmt:message key="menu.pcmember.article.preference" /></a></li>
<li><a href="<c:url value="delegateArticle.htm"/>"><fmt:message key="menu.pcmember.article.delegate" /></a></li>
<li><a href="<c:url value="listEvaluation.htm?role=pcmember"/>"><fmt:message key="menu.pcmember.article.evaluation.modify" /></a></li>
<li><a href="<c:url value="#"/>"><fmt:message key="menu.pcmember.article.discussion" /></a></li>
<li><a href="<c:url value="forum.htm?role=pcmember"/>"><fmt:message key="menu.pcmember.article.discussion" /></a></li>
</ul>
<div id="footer"></div>
</div>

View File

@@ -0,0 +1,30 @@
<%@ include file="/WEB-INF/decorators/include.jsp"%>
<html>
<head>
</head>
<body>
<h4 class="title">Forum</h4>
<table style="width: 100%; border: 1px solid orange;">
<tr>
<th>Article</th>
<th>Message's number</th>
</tr>
<c:forEach items="${listArticle}" var="article">
<tr>
<td><a href="<c:url value="/forumArticle.htm"><c:param name="articleId" value="${article.id}"/></c:url>"><b>${article.title}</b></a></td>
<td>Afficher le nombre ici</td>
</tr>
</c:forEach>
</table>
</body>
</html>

View File

@@ -0,0 +1,61 @@
<%@ include file="/WEB-INF/decorators/include.jsp"%>
<html>
<head>
</head>
<body>
<h4 class="title"></h4>
<table style="width: 100%; border: 1px solid orange;">
<tr>
<th>Message</th>
<th>Author</th>
<th>Date</th>
</tr>
<c:choose>
<c:when test="${empty listMessage}">
<div class="warningBox">
There is no message for this article at the moment.
You can post a message if you want using the form below.
</div>
</c:when>
<c:otherwise>
<c:forEach items="${listMessage}" var="message">
<tr>
<td>${message.message}</td>
<td>${message.user.firstName} ${message.user.lastName}</td>
<td>${message.dateMessage}</td>
</tr>
</c:forEach>
</c:otherwise>
</c:choose>
</table>
<form:form method="post" commandName="addMessage" id="account_data">
<p class="legend">Add a message</p>
<fieldset>
<div>
<form:label path="title">Title</form:label>
<form:input path="title"/>
</div>
<div>
<form:label path="message">Your message</form:label>
<form:textarea path="message" cols="60" rows="10" />
</div>
</fieldset>
<input type="submit" value="Send" />
</form:form>
</body>
</html>

View File

@@ -49,6 +49,8 @@
<prop key="/userBoard.htm">UserBoardController</prop>
<prop key="/stateArticle.htm">StateArticleController</prop>
<prop key="/admin.htm">AdminController</prop>
<prop key="/forum.htm">ForumController</prop>
<prop key="/forumArticle.htm">ForumArticleController</prop>
</props>
</property>
</bean>
@@ -62,6 +64,22 @@
<bean id="ListArticleController"
class="org.yacos.web.PCmember.controller.ListArticleController">
<property name="articleManager" ref="articleManager" />
</bean>
<bean id="ForumController"
class="org.yacos.web.PCmember.controller.ForumController">
<property name="articleManager" ref="articleManager" />
<property name="userManager" ref="userManager" />
</bean>
<bean id="ForumArticleController"
class="org.yacos.web.PCmember.controller.ForumArticleController">
<property name="sessionForm" value="true" />
<property name="commandName" value="addMessage" />
<property name="commandClass" value="org.yacos.web.PCmember.form.FormArticleMessage" />
<property name="formView" value="forumArticle" />
<property name="messageManager" ref="messageManager" />
<property name="articleManager" ref="articleManager" />
</bean>
<bean id="AdminController"
@@ -371,7 +389,9 @@
<jee:jndi-lookup id="conferenceManager"
jndi-name="ConferenceManagerBean/remote" cache="true" />
<jee:jndi-lookup id="evaluationManager"
jndi-name="EvaluationManagerBean/remote" cache="true" />
jndi-name="EvaluationManagerBean/remote" cache="true" />
<jee:jndi-lookup id="messageManager"
jndi-name="MessageManagerBean/remote" cache="true" />
<!-- Configuration Properties-->
<bean id="configproperties"