Ajout de la liste des délégations dans la liste des évaluations du PCMember
This commit is contained in:
@@ -183,6 +183,14 @@ function showArticleReferee() {
|
||||
<tr>
|
||||
<td align="center" width="25%">${article.title}</td>
|
||||
<td align="center" width="25%">
|
||||
<c:choose>
|
||||
<c:when test="${not empty article.referee}">
|
||||
Delegated to:<br />
|
||||
<c:forEach var="referee" items="${article.referee}">
|
||||
${referee.firstName} ${referee.lastName}<br/>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<c:if test="${article.state == 'SUBMITED'}">
|
||||
To evaluate
|
||||
</c:if>
|
||||
@@ -194,10 +202,13 @@ function showArticleReferee() {
|
||||
</c:if>
|
||||
<c:if test="${article.state == 'ACCEPTED'}">
|
||||
Accepted
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
|
||||
</td>
|
||||
<td align="center" width="25%">
|
||||
<a href="chooseConference.htm?idConf=${listConfForArticlePcMember[i.index].id}">${listConfForArticlePcMember[i.index].title}</a>
|
||||
<a href="chooseConference.htm?idConf=${article.conference.id}">${article.conference.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>
|
||||
@@ -267,7 +278,7 @@ function showArticleReferee() {
|
||||
</c:if>
|
||||
</td>
|
||||
<td align="center" width="25%">
|
||||
<a href="chooseConference.htm?idConf=${listConfForArticleReferee[i.index].id}">${listConfForArticleReferee[i.index].title}</a>
|
||||
<a href="chooseConference.htm?idConf=${article.conference.id}">${article.conference.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>
|
||||
@@ -337,7 +348,7 @@ function showArticleReferee() {
|
||||
</c:if>
|
||||
</td>
|
||||
<td align="center" width="25%">
|
||||
<a href="chooseConference.htm?idConf=${listConfForArticle[i.index].id}">${listConfForArticle[i.index].title}</a>
|
||||
<a href="chooseConference.htm?idConf=${article.conference.id}">${article.conference.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>
|
||||
|
||||
@@ -20,8 +20,10 @@ import org.yacos.core.conferences.IConferenceManager;
|
||||
import org.yacos.core.evaluation.IEvaluationManager;
|
||||
import org.yacos.core.users.IUserManager;
|
||||
import org.yacos.core.users.Role;
|
||||
import org.yacos.core.users.User;
|
||||
import org.yacos.core.users.Role.RoleType;
|
||||
import org.yacos.web.system.controller.NoConferenceSelectedException;
|
||||
import org.yacos.web.system.form.UserBoardArticleBean;
|
||||
import org.yacos.web.system.session.SessionService;
|
||||
|
||||
public class UserBoardController extends SimpleFormController {
|
||||
@@ -101,15 +103,33 @@ public class UserBoardController extends SimpleFormController {
|
||||
List<Article> listAllArticle = articleManager.getArticleOfAuthor(SessionService.getInstance().getCurrentUserLogin());
|
||||
Integer numberArticle = listAllArticle.size();
|
||||
|
||||
// create Article bean from Article object
|
||||
List<UserBoardArticleBean> listAllArticleBean = new ArrayList<UserBoardArticleBean>();
|
||||
|
||||
for (Article a : listAllArticle) {
|
||||
UserBoardArticleBean ab = new UserBoardArticleBean();
|
||||
ab.setAbstractText(a.getAbstractText());
|
||||
ab.setTitle(a.getTitle());
|
||||
ab.setTopic(a.getTopic());
|
||||
ab.setId(a.getId());
|
||||
ab.setState(a.getState());
|
||||
ab.setSecondaryAuthors(a.getSecondaryAuthors());
|
||||
ab.setURL_article(a.getURL_article());
|
||||
ab.setConference(articleManager.getConferenceForArticle(a.getId()));
|
||||
listAllArticleBean.add(ab);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Map<Integer, Object> listConfForArticle = new HashMap<Integer, Object>();
|
||||
List<Conference> listConfForArticle = new ArrayList<Conference>();
|
||||
/*List<Conference> listConfForArticle = new ArrayList<Conference>();
|
||||
for (Article a : listAllArticle) {
|
||||
listConfForArticle.add(articleManager.getConferenceForArticle(a.getId()));
|
||||
}
|
||||
|
||||
model.put("listConfForArticle", listConfForArticle);
|
||||
model.put("listConfForArticle", listConfForArticle);*/
|
||||
model.put("numberArticle", numberArticle);
|
||||
model.put("listAllArticle", listAllArticle);
|
||||
model.put("listAllArticle", listAllArticleBean);
|
||||
|
||||
logger.info("Get the list of conferences of an user");
|
||||
List<Conference> listConfForUser = conferenceManager.getConferences(SessionService.getInstance().getCurrentUser());
|
||||
@@ -120,37 +140,55 @@ public class UserBoardController extends SimpleFormController {
|
||||
logger.info("Get the list of article of all the conference for the user in PCMember");
|
||||
List<Article> listArticlePCMember = new ArrayList<Article>();
|
||||
List<Article> listArticleReferee;
|
||||
List<UserBoardArticleBean> listArticlePCMemberBean = new ArrayList<UserBoardArticleBean>();
|
||||
List<UserBoardArticleBean> listArticleRefereeBean = new ArrayList<UserBoardArticleBean>();
|
||||
List<Conference> listConfPCMember = new ArrayList<Conference>();
|
||||
List<Conference> listConfReferee = new ArrayList<Conference>();
|
||||
|
||||
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()));
|
||||
}
|
||||
|
||||
for (Article a : listArticlePCMember) {
|
||||
UserBoardArticleBean ab = new UserBoardArticleBean();
|
||||
ab.setAbstractText(a.getAbstractText());
|
||||
ab.setTitle(a.getTitle());
|
||||
ab.setTopic(a.getTopic());
|
||||
ab.setId(a.getId());
|
||||
ab.setState(a.getState());
|
||||
ab.setSecondaryAuthors(a.getSecondaryAuthors());
|
||||
ab.setURL_article(a.getURL_article());
|
||||
ab.setConference(articleManager.getConferenceForArticle(a.getId()));
|
||||
List<User> referee = userManager.getRefereesOfPcMemberForArticle(SessionService.getInstance().getCurrentUserLogin(), a.getId());
|
||||
if (referee != null)
|
||||
ab.setReferee(referee);
|
||||
else
|
||||
ab.setReferee(null);
|
||||
listArticlePCMemberBean.add(ab);
|
||||
}
|
||||
|
||||
listArticleReferee = articleManager.getArticlesOfReferee(SessionService.getInstance().getCurrentUserLogin());
|
||||
|
||||
List<Conference> listConfForArticlePcMember = new ArrayList<Conference>();
|
||||
for (Article a : listArticlePCMember) {
|
||||
listConfForArticlePcMember.add(articleManager.getConferenceForArticle(a.getId()));
|
||||
}
|
||||
|
||||
List<Conference> listConfForArticleReferee = new ArrayList<Conference>();
|
||||
for (Article a : listArticleReferee) {
|
||||
listConfForArticleReferee.add(articleManager.getConferenceForArticle(a.getId()));
|
||||
}
|
||||
UserBoardArticleBean ab = new UserBoardArticleBean();
|
||||
ab.setAbstractText(a.getAbstractText());
|
||||
ab.setTitle(a.getTitle());
|
||||
ab.setTopic(a.getTopic());
|
||||
ab.setId(a.getId());
|
||||
ab.setState(a.getState());
|
||||
ab.setSecondaryAuthors(a.getSecondaryAuthors());
|
||||
ab.setURL_article(a.getURL_article());
|
||||
ab.setConference(articleManager.getConferenceForArticle(a.getId()));
|
||||
listArticleRefereeBean.add(ab);
|
||||
}
|
||||
|
||||
model.put("listConfForArticlePcMember", listConfForArticlePcMember);
|
||||
model.put("listArticlePCMember", listArticlePCMember);
|
||||
model.put("listArticlePCMember", listArticlePCMemberBean);
|
||||
model.put("numberArticlePCMember", listArticlePCMember.size());
|
||||
model.put("listConfForArticleReferee", listConfForArticleReferee);
|
||||
model.put("listArticleReferee", listArticleReferee);
|
||||
model.put("listArticleReferee", listArticleRefereeBean);
|
||||
model.put("numberArticleReferee", listArticleReferee.size());
|
||||
|
||||
logger.info("Get the number of conferences the user can create");
|
||||
|
||||
106
YACOSWeb/src/org/yacos/web/system/form/UserBoardArticleBean.java
Normal file
106
YACOSWeb/src/org/yacos/web/system/form/UserBoardArticleBean.java
Normal file
@@ -0,0 +1,106 @@
|
||||
package org.yacos.web.system.form;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.yacos.core.article.Preference;
|
||||
import org.yacos.core.article.Article.State;
|
||||
import org.yacos.core.conferences.Conference;
|
||||
import org.yacos.core.evaluation.Report;
|
||||
import org.yacos.core.users.User;
|
||||
|
||||
public class UserBoardArticleBean {
|
||||
|
||||
private int id;
|
||||
private String title;
|
||||
private String topic;
|
||||
private String abstractText;
|
||||
private String URL_article;
|
||||
private User mainAuthor;
|
||||
private ArrayList<String> secondaryAuthors;
|
||||
private Conference conference;
|
||||
private List<User> pcMembers;
|
||||
private List<User> referee;
|
||||
private List<Preference> preferences;
|
||||
private List<Report> report;
|
||||
|
||||
private State state;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
public String getTopic() {
|
||||
return topic;
|
||||
}
|
||||
public void setTopic(String topic) {
|
||||
this.topic = topic;
|
||||
}
|
||||
public String getAbstractText() {
|
||||
return abstractText;
|
||||
}
|
||||
public void setAbstractText(String abstractText) {
|
||||
this.abstractText = abstractText;
|
||||
}
|
||||
public String getURL_article() {
|
||||
return URL_article;
|
||||
}
|
||||
public void setURL_article(String url_article) {
|
||||
URL_article = url_article;
|
||||
}
|
||||
public User getMainAuthor() {
|
||||
return mainAuthor;
|
||||
}
|
||||
public void setMainAuthor(User mainAuthor) {
|
||||
this.mainAuthor = mainAuthor;
|
||||
}
|
||||
public ArrayList<String> getSecondaryAuthors() {
|
||||
return secondaryAuthors;
|
||||
}
|
||||
public void setSecondaryAuthors(ArrayList<String> secondaryAuthors) {
|
||||
this.secondaryAuthors = secondaryAuthors;
|
||||
}
|
||||
public Conference getConference() {
|
||||
return conference;
|
||||
}
|
||||
public void setConference(Conference conference) {
|
||||
this.conference = conference;
|
||||
}
|
||||
public List<User> getPcMembers() {
|
||||
return pcMembers;
|
||||
}
|
||||
public void setPcMembers(List<User> pcMembers) {
|
||||
this.pcMembers = pcMembers;
|
||||
}
|
||||
public List<Preference> getPreferences() {
|
||||
return preferences;
|
||||
}
|
||||
public void setPreferences(List<Preference> preferences) {
|
||||
this.preferences = preferences;
|
||||
}
|
||||
public List<Report> getReport() {
|
||||
return report;
|
||||
}
|
||||
public void setReport(List<Report> report) {
|
||||
this.report = report;
|
||||
}
|
||||
public State getState() {
|
||||
return state;
|
||||
}
|
||||
public void setState(State state) {
|
||||
this.state = state;
|
||||
}
|
||||
public List<User> getReferee() {
|
||||
return referee;
|
||||
}
|
||||
public void setReferee(List<User> referee) {
|
||||
this.referee = referee;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user