Files
yacos/YACOSWeb/WebContent/WEB-INF/jsp/dispatchArticle.jsp
Maxime Dagnicourt 395fc62081
2008-02-12 11:44:01 +00:00

81 lines
2.1 KiB
Plaintext

<%@ include file="/WEB-INF/decorators/include.jsp"%>
<html>
<head>
<script type='text/javascript' src='./dwr/engine.js'></script>
<script type='text/javascript' src='./dwr/util.js'></script>
<script type='text/javascript' src='./dwr/interface/DispatchArticlesJS.js'></script>
<script type='text/javascript' src='./javascripts/prototype.js'></script>
<script type='text/javascript'>
function addMember(memberId, articleId){
DispatchArticlesJS.addMember(memberId, articleId, fillTable);
}
function removeMember(memberId, articleId){
DispatchArticlesJS.removeMember(memberId, articleId, fillTable);
}
function fillTable(data) {
//dwr.util.removeAllRows('members');
//dwr.util.addRows('members',data, cellFuncs);
}
</script>
</head>
<body>
<h4 class="title">NO NAME</h4>
<h4 class="title"><fmt:message key="disptachArticle.choose" /></h4>
<input type="button" value="hello" onclick="sayHello('max');"/>
<p>
Article's description :
<br/>title : ${article.title}
<br/> theme: ${article.topic}
<br/> main author: ${article.mainAuthor.firstName}{article.mainAuthor.lastName}
<br/><a href="${article.URL_article}">download the article</a>
</p>
<br/>
<b>members of the conference</b>
<table border="1px" id="members">
<tr>
<th>name</th>
<th>preference</th>
<th>nb of articles for this conference</th>
<th></th>
</tr>
<c:forEach var="m" items="${members}">
<tr>
<td>${m.firstName} ${m.lastName}</td>
<td>${m.preference}</td>
<td>${m.nbArticles}</td>
<td><input type="button" value="add" onclick="addMember('${m.login}','${article.id}');"/></td>
</tr>
</c:forEach>
</table>
<table border="1px" id="articleMembers">
<tr>
<th>name</th>
<th>preference</th>
</tr>
<c:forEach var="am" items="${articleMembers}">
<tr>
<td>${am.firstName} ${am.lastName}</td>
<td>${m.preference}</td>
<td><input type="button" value="delete" onclick="removeMember('${am.login}','${article.id}');"/></td>
</tr>
</c:forEach>
</table>
</body>
</html>