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

@@ -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>