Continuation de tableau de bord, ajout de la liste des conférences par rôle.

This commit is contained in:
Frederic Debuire
2008-02-19 22:24:52 +00:00
parent 815328104b
commit b2783d8c18
2 changed files with 210 additions and 2 deletions

View File

@@ -3,6 +3,55 @@
<html>
<head>
<script type='text/javascript' src='./javascripts/prototype.js'></script>
<script type='text/javascript' src='./javascripts/scriptaculous.js'></script>
<script type='text/javascript' src='./javascripts/effects.js'></script>
<script type="text/javascript">
function showConfAll() {
if ($('confList').visible())
$('confList').style.display = "none";
else
$('confList').style.display = "";
}
function showArticleAll() {
if ($('articleList').visible())
$('articleList').style.display = "none";
else
$('articleList').style.display = "";
}
function showConfChairman() {
if ($('confListChairman').visible())
$('confListChairman').style.display = "none";
else
$('confListChairman').style.display = "";
}
function showConfPcmember() {
if ($('confListPcmember').visible())
$('confListPcmember').style.display = "none";
else
$('confListPcmember').style.display = "";
}
function showConfReferee() {
if ($('confListReferee').visible())
$('confListReferee').style.display = "none";
else
$('confListReferee').style.display = "";
}
function showConfAuthor() {
if ($('confListAuthor').visible())
$('confListAuthor').style.display = "none";
else
$('confListAuthor').style.display = "";
}
</script>
</head>
@@ -14,7 +63,24 @@
<div class="textBox">
You currently follow <b>${numberConference}</b> conference(s)<br /><br />
If you want to see the list of conferences you are registered in, click here.
<c:if test="${not empty listConfForUser}">
If you want to see the list of conferences you are registered in, click <a href="#" onclick="showConfAll();">here</a>.
<div id="confListDiv" class="dynamicFredList">
<div id="confList" style="display: none;">
<table width="100%" align="center">
<tbody>
<c:forEach var="conf" items="${listConfForUser}">
<tr>
<td align="center">${conf.title}</td>
<td align="center"><a href="chooseConference.htm?idConf=${conf.id}">Select</a></td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
</c:if>
</div>
<h3 class="descriptionTitle">Chairman's informations</h3>
@@ -30,24 +96,157 @@
You can't create a conference at the moment. If you want to create a conference, you should address to the <a href="mailto:admin@yacos.org">administrator</a> of this site.
</c:otherwise>
</c:choose>
<br /><br />
<c:if test="${not empty listConfForUser}">
If you want to see the list of conferences you are registered in, click <a href="#" onclick="showConfChairman();">here</a>.
<div id="confListChairmanDiv" class="dynamicFredList">
<div id="confListChairman" style="display: none;">
<table width="100%" align="center">
<tbody>
<c:forEach items="${listConfForUser}" var="conf">
<c:forEach items="${listRole}" var="role">
<c:if test="${conf.id == role.conference.id and role.type == 'CHAIRMAN'}">
<tr>
<td align="center">${conf.title}</td>
<td align="center"><a href="chooseConference.htm?idConf=${conf.id}">Select</a></td>
</tr>
</c:if>
</c:forEach>
</c:forEach>
</tbody>
</table>
</div>
</div>
</c:if>
</div>
<h3 class="descriptionTitle">PCMember's informations</h3>
<div class="textBox">
You are PCMember in <b>${numberPCMember}</b> conference(s)<br /><br />
<c:if test="${not empty listConfForUser}">
If you want to see the list of conferences you are registered in, click <a href="#" onclick="showConfPcmember();">here</a>.
<div id="confListPcmemberDiv" class="dynamicFredList">
<div id="confListPcmember" style="display: none;">
<table width="100%" align="center">
<tbody>
<c:forEach items="${listConfForUser}" var="conf">
<c:forEach items="${listRole}" var="role">
<c:if test="${conf.id == role.conference.id and role.type == 'PCMEMBER'}">
<tr>
<td align="center">${conf.title}</td>
<td align="center"><a href="chooseConference.htm?idConf=${conf.id}">Select</a></td>
</tr>
</c:if>
</c:forEach>
</c:forEach>
</tbody>
</table>
</div>
</div>
</c:if>
</div>
<h3 class="descriptionTitle">Referee's informations</h3>
<div class="textBox">
You are Referee in <b>${numberReferee}</b> conference(s)<br /><br />
<c:if test="${not empty listConfForUser}">
If you want to see the list of conferences you are registered in, click <a href="#" onclick="showConfReferee();">here</a>.
<div id="confListRefereeDiv" class="dynamicFredList">
<div id="confListReferee" style="display: none;">
<table width="100%" align="center">
<tbody>
<c:forEach items="${listConfForUser}" var="conf">
<c:forEach items="${listRole}" var="role">
<c:if test="${conf.id == role.conference.id and role.type == 'REFEREE'}">
<tr>
<td align="center">${conf.title}</td>
<td align="center"><a href="chooseConference.htm?idConf=${conf.id}">Select</a></td>
</tr>
</c:if>
</c:forEach>
</c:forEach>
</tbody>
</table>
</div>
</div>
</c:if>
</div>
<h3 class="descriptionTitle">Author's informations</h3>
<div class="textBox">
You are Author in <b>${numberAuthor}</b> conference(s)<br /><br />
<c:if test="${not empty listConfForUser}">
If you want to see the list of conferences you are registered in, click <a href="#" onclick="showConfAuthor();">here</a>.
<div id="confListAuthorDiv" class="dynamicFredList">
<div id="confListAuthor" style="display: none;">
<table width="100%" align="center">
<tbody>
<c:forEach items="${listConfForUser}" var="conf">
<c:forEach items="${listRole}" var="role">
<c:if test="${conf.id == role.conference.id and role.type == 'AUTHOR'}">
<tr>
<td align="center">${conf.title}</td>
<td align="center"><a href="chooseConference.htm?idConf=${conf.id}">Select</a></td>
</tr>
</c:if>
</c:forEach>
</c:forEach>
</tbody>
</table>
</div>
</div>
</c:if>
<br />
You have posted <b>${numberArticle}</b> article(s).<br /><br />
If you want to see the list of articles you have submited, click here.
<c:if test="${not empty listConfForUser}">
If you want to see the list of articles you have submitted, click <a href="#" onclick="showArticleAll();">here</a>.
<div id="articleListDiv" class="dynamicFredList">
<div id="articleList" style="display: none;">
<table width="100%" align="center">
<tbody>
<c:forEach var="article" items="${listAllArticle}" varStatus="i">
<tr>
<td align="center" width="25%">${article.title}</td>
<td align="center" width="25%">
<c:if test="${article.state == 'SUBMITED'}">
Submitted
</c:if>
<c:if test="${article.state == 'EVALUATED'}">
Evaluated
</c:if>
<c:if test="${article.state == 'REJECTED'}">
Rejected
</c:if>
<c:if test="${article.state == 'ACCEPTED'}">
Accepted
</c:if>
</td>
<td align="center" width="25%">
<a href="chooseConference.htm?idConf=${listConfForArticle[i.index].id}">${listConfForArticle[i.index].title}</a>
</td>
<td align="center" width="25%">
<a class="manage_link" id="articleURL" title="Download" href="<c:url value="/download.htm"><c:param name="articleId" value="${article.id}"/></c:url>">Download<img src="./images/cc-download_manager-32x32.png" alt="Download" /></a>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
</c:if>
</div>
</body>

View File

@@ -1,6 +1,7 @@
package org.yacos.web.system.controller;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -94,11 +95,19 @@ public class UserBoardController extends SimpleFormController {
model.put("numberPCMember", numberPCMember);
model.put("numberReferee", numberReferee);
model.put("numberAuthor", numberAuthor);
model.put("listRole", listRole);
logger.info("Get the list of articles of an author");
List<Article> listAllArticle = articleManager.getArticleOfAuthor(SessionService.getInstance().getCurrentUserLogin());
Integer numberArticle = listAllArticle.size();
//Map<Integer, Object> listConfForArticle = new HashMap<Integer, Object>();
List<Conference> listConfForArticle = new ArrayList<Conference>();
for (Article a : listAllArticle) {
listConfForArticle.add(articleManager.getConferenceForArticle(a.getId()));
}
model.put("listConfForArticle", listConfForArticle);
model.put("numberArticle", numberArticle);
model.put("listAllArticle", listAllArticle);