Ajout du forum
This commit is contained in:
30
YACOSWeb/WebContent/WEB-INF/jsp/forum.jsp
Normal file
30
YACOSWeb/WebContent/WEB-INF/jsp/forum.jsp
Normal 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>
|
||||
61
YACOSWeb/WebContent/WEB-INF/jsp/forumArticle.jsp
Normal file
61
YACOSWeb/WebContent/WEB-INF/jsp/forumArticle.jsp
Normal 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>
|
||||
Reference in New Issue
Block a user