diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/secure/userinformation.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/secure/userinformation.jsp index 9ebe671..f03f5cc 100644 --- a/YACOSWeb/WebContent/WEB-INF/jsp/secure/userinformation.jsp +++ b/YACOSWeb/WebContent/WEB-INF/jsp/secure/userinformation.jsp @@ -5,7 +5,7 @@
- ${ currentUser.firstName } ${ currentUser.lastName }
+ ${ currentUser.firstName } ${ currentUser.lastName }
diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/tableBord.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/tableBord.jsp deleted file mode 100644 index 72d2c29..0000000 --- a/YACOSWeb/WebContent/WEB-INF/jsp/tableBord.jsp +++ /dev/null @@ -1,89 +0,0 @@ -<%@ include file="/WEB-INF/decorators/include.jsp"%> - - - - - - - -
- - - - - - - -
-

-
- -
- - - - -
-

- - -
-
- - - -
-

- - -
-
- - - -
-

- - -
-
- - - -
-

- - -
-
- - - - -
- - - \ No newline at end of file diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/userBoard.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/userBoard.jsp new file mode 100644 index 0000000..214f03e --- /dev/null +++ b/YACOSWeb/WebContent/WEB-INF/jsp/userBoard.jsp @@ -0,0 +1,54 @@ +<%@ include file="/WEB-INF/decorators/include.jsp"%> + + + + + + + + + +

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. +
+ +

Chairman's informations

+
+ You are Chairman in ${numberChairman} conference(s)

+ + + + You can create ${numberCreationTokens} conference(s). Click + here to create one now. + + + You can't create a conference at the moment. If you want to create a conference, you should address to the administrator of this site. + + +
+ +

PCMember's informations

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

+
+ +

Referee's informations

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

+
+ +

Author's informations

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

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

+ + If you want to see the list of articles you have submited, click here. +
+ + + \ No newline at end of file diff --git a/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml b/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml index b0628c7..920eb15 100644 --- a/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml +++ b/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml @@ -44,7 +44,7 @@ ListReportController ForgotPasswordController DetailArticleController - TableBordController + UserBoardController StateArticleController AdminController @@ -138,8 +138,12 @@ - + + + + + model = new HashMap(); + + logger.info("Get the list of roles of an user"); + List listRole = userManager.getRolesForUser(SessionService.getInstance().getCurrentUserLogin()); + + Integer numberChairman = 0; + Integer numberPCMember = 0; + Integer numberReferee = 0; + Integer numberAuthor = 0; + + for (Role r : listRole) { + if (r.getType() == RoleType.CHAIRMAN) + numberChairman++; + else if (r.getType() == RoleType.PCMEMBER) + numberPCMember++; + else if (r.getType() == RoleType.REFEREE) + numberReferee++; + else if (r.getType() == RoleType.AUTHOR) + numberAuthor++; + } + + model.put("numberChairman", numberChairman); + model.put("numberPCMember", numberPCMember); + model.put("numberReferee", numberReferee); + model.put("numberAuthor", numberAuthor); + + logger.info("Get the list of articles of an author"); + List
listAllArticle = articleManager.getArticleOfAuthor(SessionService.getInstance().getCurrentUserLogin()); + Integer numberArticle = listAllArticle.size(); + + model.put("numberArticle", numberArticle); + model.put("listAllArticle", listAllArticle); + + logger.info("Get the list of conferences of an user"); + List listConfForUser = conferenceManager.getConferences(SessionService.getInstance().getCurrentUser()); + Integer numberConference = listConfForUser.size(); + model.put("numberConference", numberConference); + model.put("listConfForUser", listConfForUser); + + logger.info("Get the number of conferences the user can create"); + Integer numberCreationTokens = conferenceManager.conferenceCreationTokens(SessionService.getInstance().getCurrentUserLogin()); + model.put("numberCreationTokens", numberCreationTokens); + + return new ModelAndView("userBoard", model); + } +} \ No newline at end of file