diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/userBoard.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/userBoard.jsp index f61779b..ccaaeb3 100644 --- a/YACOSWeb/WebContent/WEB-INF/jsp/userBoard.jsp +++ b/YACOSWeb/WebContent/WEB-INF/jsp/userBoard.jsp @@ -11,44 +11,58 @@ function showConfAll() { if ($('confList').visible()) - $('confList').style.display = "none"; + $('confList').fade(); else - $('confList').style.display = ""; + $('confList').appear(); } function showArticleAll() { if ($('articleList').visible()) - $('articleList').style.display = "none"; + $('articleList').fade(); else - $('articleList').style.display = ""; + $('articleList').appear(); } function showConfChairman() { if ($('confListChairman').visible()) - $('confListChairman').style.display = "none"; + $('confListChairman').fade(); else - $('confListChairman').style.display = ""; + $('confListChairman').appear(); } function showConfPcmember() { if ($('confListPcmember').visible()) - $('confListPcmember').style.display = "none"; + $('confListPcmember').fade(); else - $('confListPcmember').style.display = ""; + $('confListPcmember').appear(); } function showConfReferee() { if ($('confListReferee').visible()) - $('confListReferee').style.display = "none"; + $('confListReferee').fade(); else - $('confListReferee').style.display = ""; + $('confListReferee').appear(); } function showConfAuthor() { if ($('confListAuthor').visible()) - $('confListAuthor').style.display = "none"; + $('confListAuthor').fade(); else - $('confListAuthor').style.display = ""; + $('confListAuthor').appear(); +} + +function showArticlePcMember() { + if ($('articleListPcMember').visible()) + $('articleListPcMember').fade(); + else + $('articleListPcMember').appear(); +} + +function showArticleReferee() { + if ($('articleListReferee').visible()) + $('articleListReferee').fade(); + else + $('articleListReferee').appear(); } @@ -59,14 +73,15 @@ function showConfAuthor() {

User Board

+

Generals informations

You currently follow ${numberConference} conference(s)

- If you want to see the list of conferences you are registered in, click here. + If you want to see the list of conferences you are registered in, click here. + -
-
+
@@ -97,11 +112,12 @@ function showConfAuthor() { +

- If you want to see the list of conferences you are registered in, click here. + If you want to see the list of conferences you are registered in, click here. + -
-
+
+

PCMember's informations

You are PCMember in ${numberPCMember} conference(s)

- If you want to see the list of conferences you are registered in, click here. + If you want to see the list of conferences you are registered in, click here. + -
-
+ +
+ + +

+ You have ${numberArticlePCMember} article(s) in your evaluation list.

+ + + If you want to see the list of articles you have in your evaluation list, click here. + + + +
+

Referee's informations

You are Referee in ${numberReferee} conference(s)

- If you want to see the list of conferences you are registered in, click here. + If you want to see the list of conferences you are registered in, click here. + -
-
+ +
+ +

+ You have ${numberArticleReferee} article(s) in your evaluation list.

+ + + If you want to see the list of articles you have in your evaluation list, click here. + + + +
+

Author's informations

You are Author in ${numberAuthor} conference(s)

- If you want to see the list of conferences you are registered in, click here. + If you want to see the list of conferences you are registered in, click here. + -
-
+
-
+

You have posted ${numberArticle} article(s).

- If you want to see the list of articles you have submitted, click here. + If you want to see the list of articles you have submitted, click here. + -
-
+
diff --git a/YACOSWeb/src/org/yacos/web/system/controller/UserBoardController.java b/YACOSWeb/src/org/yacos/web/system/controller/UserBoardController.java index f208968..dd5004d 100644 --- a/YACOSWeb/src/org/yacos/web/system/controller/UserBoardController.java +++ b/YACOSWeb/src/org/yacos/web/system/controller/UserBoardController.java @@ -117,6 +117,42 @@ public class UserBoardController extends SimpleFormController { model.put("numberConference", numberConference); model.put("listConfForUser", listConfForUser); + logger.info("Get the list of article of all the conference for the user in PCMember"); + List
listArticlePCMember = new ArrayList
(); + List
listArticleReferee; + List listConfPCMember = new ArrayList(); + List listConfReferee = new ArrayList(); + + for (Conference c : listConfForUser) { + if (userManager.hasRoleForConference(SessionService.getInstance().getCurrentUserLogin(), RoleType.PCMEMBER, c.getId())) + listConfPCMember.add(c); + else if (userManager.hasRoleForConference(SessionService.getInstance().getCurrentUserLogin(), RoleType.REFEREE, c.getId())) + listConfReferee.add(c); + } + + for (Conference c : listConfPCMember) { + listArticlePCMember.addAll(articleManager.getArticlesOfMember(c.getId(), SessionService.getInstance().getCurrentUserLogin())); + } + + listArticleReferee = articleManager.getArticlesOfReferee(SessionService.getInstance().getCurrentUserLogin()); + + List listConfForArticlePcMember = new ArrayList(); + for (Article a : listArticlePCMember) { + listConfForArticlePcMember.add(articleManager.getConferenceForArticle(a.getId())); + } + + List listConfForArticleReferee = new ArrayList(); + for (Article a : listArticleReferee) { + listConfForArticleReferee.add(articleManager.getConferenceForArticle(a.getId())); + } + + model.put("listConfForArticlePcMember", listConfForArticlePcMember); + model.put("listArticlePCMember", listArticlePCMember); + model.put("numberArticlePCMember", listArticlePCMember.size()); + model.put("listConfForArticleReferee", listConfForArticleReferee); + model.put("listArticleReferee", listArticleReferee); + model.put("numberArticleReferee", listArticleReferee.size()); + logger.info("Get the number of conferences the user can create"); Integer numberCreationTokens = conferenceManager.conferenceCreationTokens(SessionService.getInstance().getCurrentUserLogin()); model.put("numberCreationTokens", numberCreationTokens);