Ajout de la page about

Modification du droit pr modifier une conf.
Ajout de la liste des articles pr le chairman, il peut voir les évaluations à partir de ca.
This commit is contained in:
Frederic Debuire
2008-02-23 21:28:14 +00:00
parent 7ab701fc42
commit e94fdffded
14 changed files with 111 additions and 36 deletions

View File

@@ -102,14 +102,14 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schem
PATTERN_TYPE_APACHE_ANT PATTERN_TYPE_APACHE_ANT
/secure/**=ROLE_ADMIN,ROLE_AUTHOR,ROLE_PCMEMBER /secure/**=ROLE_ADMIN,ROLE_AUTHOR,ROLE_PCMEMBER
/secure/**=IS_AUTHENTICATED_REMEMBERED /secure/**=IS_AUTHENTICATED_REMEMBERED
/listarticle.htm=ROLE_USER /listarticle.htm=ROLE_CHAIRMAN
/managearticle.htm=ROLE_USER /managearticle.htm=ROLE_USER
/registeruser.htm=ROLE_ANONYMOUS,ROLE_USER /registeruser.htm=ROLE_ANONYMOUS,ROLE_USER
/submissionarticle.htm=ROLE_USER /submissionarticle.htm=ROLE_USER
/choosepreference.htm=ROLE_PCMEMBER /choosepreference.htm=ROLE_PCMEMBER
/dispatcharticlelist.htm=ROLE_PCMEMBER /dispatcharticlelist.htm=ROLE_PCMEMBER
/dispatcharticle.htm=ROLE_PCMEMBER /dispatcharticle.htm=ROLE_PCMEMBER
/addconference.htm=ROLE_CONFERENCE_CREATOR /addconference.htm=ROLE_CHAIRMAN,ROLE_CONFERENCE_CREATOR
/evaluation.htm=ROLE_PCMEMBER,ROLE_REFEREE /evaluation.htm=ROLE_PCMEMBER,ROLE_REFEREE
/createreport.htm=ROLE_PCMEMBER,ROLE_REFEREE /createreport.htm=ROLE_PCMEMBER,ROLE_REFEREE
/listconference.htm=ROLE_USER /listconference.htm=ROLE_USER

View File

@@ -63,6 +63,7 @@ user.information.followconference={0,choice, 0#You don''t have any conference |
menu.chairman.title=Chairman menu.chairman.title=Chairman
menu.chairman.conference.create=Create new conference menu.chairman.conference.create=Create new conference
menu.chairman.conference.modify=Modify this conference menu.chairman.conference.modify=Modify this conference
menu.chairman.article.list=Article's list
menu.chairman.article.dispatch=Dispatch articles menu.chairman.article.dispatch=Dispatch articles
menu.chairman.article.validate=Validate articles menu.chairman.article.validate=Validate articles
menu.chairman.article.conflict=Manage the conflict list menu.chairman.article.conflict=Manage the conflict list

View File

@@ -8,7 +8,7 @@
<!-- Footer with credits --> <!-- Footer with credits -->
<div id="globalfooter"> <div id="globalfooter">
<hr /> <hr />
<fmt:message key="disclaimer.text" /> - <a href="#"><fmt:message key="disclaimer.link.about" /></a> <fmt:message key="disclaimer.text" /> - <a href="about.htm"><fmt:message key="disclaimer.link.about" /></a>
</div> </div>
</body> </body>

View File

@@ -21,6 +21,7 @@
<li><a href="<c:url value="addConference.htm"/>"><fmt:message key="menu.chairman.conference.create" /></a></li> <li><a href="<c:url value="addConference.htm"/>"><fmt:message key="menu.chairman.conference.create" /></a></li>
</authz:authorize> </authz:authorize>
<li><a href="<c:url value="addConference.htm?action=modify"/>"><fmt:message key="menu.chairman.conference.modify" /></a></li> <li><a href="<c:url value="addConference.htm?action=modify"/>"><fmt:message key="menu.chairman.conference.modify" /></a></li>
<li><a href="<c:url value="listArticle.htm"/>"><fmt:message key="menu.chairman.article.list" /></a></li>
<li><a href="<c:url value="dispatchArticle.htm"/>"><fmt:message key="menu.chairman.article.dispatch" /></a></li> <li><a href="<c:url value="dispatchArticle.htm"/>"><fmt:message key="menu.chairman.article.dispatch" /></a></li>
<li><a href="<c:url value="validateArticle.htm"/>"><fmt:message key="menu.chairman.article.validate" /></a></li> <li><a href="<c:url value="validateArticle.htm"/>"><fmt:message key="menu.chairman.article.validate" /></a></li>
<li><a href="<c:url value="conflictList.htm"/>"><fmt:message key="menu.chairman.article.conflict" /></a></li> <li><a href="<c:url value="conflictList.htm"/>"><fmt:message key="menu.chairman.article.conflict" /></a></li>
@@ -36,8 +37,7 @@
<ul> <ul>
<li><a href="<c:url value="choosePreference.htm"/>"><fmt:message key="menu.pcmember.article.preference" /></a></li> <li><a href="<c:url value="choosePreference.htm"/>"><fmt:message key="menu.pcmember.article.preference" /></a></li>
<li><a href="<c:url value="delegateArticle.htm"/>"><fmt:message key="menu.pcmember.article.delegate" /></a></li> <li><a href="<c:url value="delegateArticle.htm"/>"><fmt:message key="menu.pcmember.article.delegate" /></a></li>
<li><a href="<c:url value="listEvaluation.htm?role=pcmember"/>"><fmt:message key="menu.pcmember.article.evaluation" /></a></li> <li><a href="<c:url value="listEvaluation.htm?role=pcmember"/>"><fmt:message key="menu.pcmember.article.evaluation.modify" /></a></li>
<li><a href="<c:url value="#"/>"><fmt:message key="menu.pcmember.article.evaluation.modify" /></a></li>
<li><a href="<c:url value="#"/>"><fmt:message key="menu.pcmember.article.discussion" /></a></li> <li><a href="<c:url value="#"/>"><fmt:message key="menu.pcmember.article.discussion" /></a></li>
</ul> </ul>
<div id="footer"></div> <div id="footer"></div>
@@ -49,8 +49,7 @@
<div id="mainmenubloc"> <div id="mainmenubloc">
<h4><fmt:message key="menu.referee.title" /></h4> <h4><fmt:message key="menu.referee.title" /></h4>
<ul> <ul>
<li><a href="<c:url value="listEvaluation.htm?role=referee"/>"><fmt:message key="menu.referee.article.evaluation" /></a></li> <li><a href="<c:url value="listEvaluation.htm?role=referee"/>"><fmt:message key="menu.referee.article.evaluation.modify" /></a></li>
<li><a href="<c:url value="#"/>"><fmt:message key="menu.referee.article.evaluation.modify" /></a></li>
</ul> </ul>
<div id="footer"></div> <div id="footer"></div>
</div> </div>

View File

@@ -0,0 +1,26 @@
<%@ include file="/WEB-INF/decorators/include.jsp"%>
<html>
<head>
</head>
<body>
<!-- About page for Yacos.com -->
<h4 class="title"><fmt:message key="title" /> : <fmt:message
key="title.detail" /></h4>
<center>
<h1 class="maintitle"><fmt:message key="title" /></h1>
<h3 class="subtitle"><fmt:message key="title.detail" /></h3>
</center>
<h3 class="subtitle"><fmt:message key="home.whatis" /></h3>
<p><fmt:message key="home.whatis.txt" /></p>
<h3 class="subtitle"><fmt:message key="home.author" /></h3>
<p><fmt:message key="home.author.txt" /></p>
<h3 class="subtitle"><fmt:message key="home.referee" /></h3>
<p><fmt:message key="home.referee.txt" /></p>
</body>
</html>

View File

@@ -35,9 +35,10 @@
</tr> </tr>
<tr> <tr>
<td class="formLabel">Authorized file types</td> <td class="formLabel">Authorized file types</td>
<td><form:checkbox path="typePDF" /> Tex/Latec <form:checkbox <td>PDF <form:checkbox path="typePDF" />
path="typeLatec" /> Word <form:checkbox path="typeWord" /> Tex/Latec <form:checkbox path="typeLatec" />
OpenOffice <form:checkbox path="typeODT" /></td> Word <form:checkbox path="typeWord" />
OpenOffice <form:checkbox path="typeODT" /></td>
</tr> </tr>
</tbody> </tbody>
<thead> <thead>

View File

@@ -1,30 +1,33 @@
<%@ include file="/WEB-INF/decorators/include.jsp"%> <%@ include file="/WEB-INF/decorators/include.jsp"%>
<html> <html>
<head></head> <head>
<body> </head>
<h4 class="title">NO NAME</h4> <body>
<h4 class="title">Article's list</h4>
<c:forEach items="${listArticle}" var="article"> <c:forEach items="${listArticle}" var="article">
<div class="article cbb"> <div class="article cbb">
<h2>${article.title}</h2> <h2>${article.title}</h2>
<p class="author">Author: <b>${article.mainAuthor.firstName} ${article.mainAuthor.lastName}</b></p> <p>Author: <b>${article.mainAuthor.firstName} ${article.mainAuthor.lastName}</b></p>
<p class="secondaryAuthors"> <p>
<c:if test="${not empty article.secondaryAuthors}">
Secondary Authors: Secondary Authors:
<ul> <ul>
<c:forEach items="${article.secondaryAuthors}" var="sAuthor"> <c:forEach items="${article.secondaryAuthors}" var="sAuthor">
<li>${sAuthor}</li> <li>${sAuthor}</li>
</c:forEach> </c:forEach>
</ul> </ul>
<p class="topic">Topic: <b>${article.topic}</b></p> </c:if>
<p class="article_url"><a href=" <p>Topic: <b>${article.topic}</b></p>
<c:url value="/download.htm"> <p>State: <b>${article.state}</b></p>
<c:param name="articleId" value="${article.id}"/> <p><a href="<c:url value="/download.htm"><c:param name="articleId" value="${article.id}"/></c:url>">Download</a>
</c:url>">Download the article</a>
</p> </p>
</div> <c:if test="${article.state == 'EVALUATED' or article.state == 'REJECTED' or article.state == 'ACCEPTED'}">
<br /> <p><a href="<c:url value="listReport.htm?id=${article.id}"/>"><fmt:message key="validate.report" /></a></p>
<hr /> </c:if>
<br /> </div>
</c:forEach> </c:forEach>

View File

@@ -6,6 +6,14 @@
<h4 class="title"><fmt:message key="report.headPage" /></h4> <h4 class="title"><fmt:message key="report.headPage" /></h4>
<c:choose>
<c:when test="${empty listReport}">
<div class="warningBox">
There is no report for this article at the moment.
</div>
</c:when>
<c:otherwise>
<c:forEach items="${listReport}" var="report"> <c:forEach items="${listReport}" var="report">
<table> <table>
<tr> <tr>
@@ -36,7 +44,12 @@
</table> </table>
<hr> <hr>
</c:forEach> </c:forEach>
</c:otherwise>
</c:choose>
<br />
<a class="back_link" href="<c:url value="${whereIcome}"/>"><fmt:message key="form.link.back" /></a>
<a href="<c:url value="main.htm"/>">Home</a>
</body> </body>
</html> </html>

View File

@@ -22,6 +22,7 @@
<property name="mappings"> <property name="mappings">
<props> <props>
<prop key="/main.htm">MainController</prop> <prop key="/main.htm">MainController</prop>
<prop key="/about.htm">AboutController</prop>
<prop key="/listArticle.htm">ListArticleController</prop> <prop key="/listArticle.htm">ListArticleController</prop>
<prop key="/manageArticle.htm">ManageArticleController</prop> <prop key="/manageArticle.htm">ManageArticleController</prop>
<prop key="/registerUser.htm">SUserRegistrationController</prop> <prop key="/registerUser.htm">SUserRegistrationController</prop>
@@ -54,6 +55,9 @@
<bean id="MainController" <bean id="MainController"
class="org.yacos.web.author.controller.MainController" /> class="org.yacos.web.author.controller.MainController" />
<bean id="AboutController"
class="org.yacos.web.system.controller.AboutController" />
<bean id="ListArticleController" <bean id="ListArticleController"
class="org.yacos.web.PCmember.controller.ListArticleController"> class="org.yacos.web.PCmember.controller.ListArticleController">

View File

@@ -1,6 +1,7 @@
package org.yacos.web.PCmember.controller; package org.yacos.web.PCmember.controller;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.servlet.ServletException; import javax.servlet.ServletException;
@@ -28,15 +29,14 @@ public class ListArticleController extends SimpleFormController {
logger.info("Returning listArticle view"); logger.info("Returning listArticle view");
List<Article> listArticle; List<Article> listArticle = new ArrayList<Article>();
try { try {
listArticle = articleManager.getArticles(SessionService.getInstance().getCurrentConferenceId()); listArticle = articleManager.getArticles(SessionService.getInstance().getCurrentConferenceId());
request.getSession().setAttribute("listArticle", listArticle);
} catch (ConferenceDoesntExistException e) { } catch (ConferenceDoesntExistException e) {
logger.error(e.getMessage()); logger.error(e.getMessage());
} }
return new ModelAndView("listArticle"); return new ModelAndView("listArticle", "listArticle", listArticle);
} }
public IArticleManager getArticleManager() { public IArticleManager getArticleManager() {

View File

@@ -49,6 +49,7 @@ public class ListReportController extends SimpleFormController {
List<Rating> ratings = evaluationManager.getRatingForReport(listReport.get(listReport.size() - 1).getId()); List<Rating> ratings = evaluationManager.getRatingForReport(listReport.get(listReport.size() - 1).getId());
model.put("rtgs", ratings); model.put("rtgs", ratings);
model.put("whereIcome", request.getHeader("REFERER"));
return new ModelAndView("listReport", model); return new ModelAndView("listReport", model);
} }

View File

@@ -8,10 +8,8 @@ import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.mail.MailSendException; import org.springframework.mail.MailSendException;
@@ -34,7 +32,6 @@ import org.yacos.web.chairman.form.FormConference;
import org.yacos.web.chairman.validation.ConferenceValidator; import org.yacos.web.chairman.validation.ConferenceValidator;
import org.yacos.web.system.controller.MailSenderService; import org.yacos.web.system.controller.MailSenderService;
import org.yacos.web.system.session.SessionService; import org.yacos.web.system.session.SessionService;
import org.acegisecurity.annotation.Secured;
public class AddConferenceController extends AbstractWizardFormController { public class AddConferenceController extends AbstractWizardFormController {
@@ -243,8 +240,6 @@ public class AddConferenceController extends AbstractWizardFormController {
setPages(new String[] {"addConference", "addConference2", "addConference3", "addConference4", "addConference5"}); setPages(new String[] {"addConference", "addConference2", "addConference3", "addConference4", "addConference5"});
} }
// TODO : comment modifier la conf ?
@Secured({"ROLE_CONFERENCE_CREATOR"})
protected Object formBackingObject(HttpServletRequest request) throws ModelAndViewDefiningException { protected Object formBackingObject(HttpServletRequest request) throws ModelAndViewDefiningException {
logger.info(this.getClass().toString() + " dans le formBackingObject"); logger.info(this.getClass().toString() + " dans le formBackingObject");
@@ -252,9 +247,9 @@ public class AddConferenceController extends AbstractWizardFormController {
String action = request.getParameter("action"); String action = request.getParameter("action");
if (action == null || action.equals("")) if (action == null || action.equals(""))
{ {
// TODO : tester ici si le gars a le droit d'<27>tre ici if (! conferenceManager.canCreateConference(SessionService.getInstance().getCurrentUserLogin()))
// a-t-il le droit de cr<63>er une conf<6E>rence ? throw new ModelAndViewDefiningException(new ModelAndView("denied"));
criteria = new HashSet<CriterionBean>(); criteria = new HashSet<CriterionBean>();
criteriaAll = new HashSet<CriterionBean>(); criteriaAll = new HashSet<CriterionBean>();
@@ -502,6 +497,12 @@ public class AddConferenceController extends AbstractWizardFormController {
conf.setDateEnd(conference.getDateEndParsed()); conf.setDateEnd(conference.getDateEndParsed());
conf.setDateStart(conference.getDateStartParsed()); conf.setDateStart(conference.getDateStartParsed());
conf.setDateEvaluation(conference.getDateEvaluationParsed()); conf.setDateEvaluation(conference.getDateEvaluationParsed());
conf.setPageNumber(conference.getPageNumberChecked());
conf.setTypePDF(conference.isTypePDF());
conf.setTypeLatec(conference.isTypeLatec());
conf.setTypeWord(conference.isTypeWord());
conf.setTypeODT(conference.isTypeODT());
conf.setSendInfo(conference.getSendInfo());
conferenceManager.update(conf); conferenceManager.update(conf);

View File

@@ -49,6 +49,7 @@ public class DispatchArticleController implements Controller{
this.conferenceManager = conferenceManager; this.conferenceManager = conferenceManager;
} }
// FIXME : c'est interdit de faire ca ;)
Conference conf; Conference conf;
public ModelAndView handleRequest(HttpServletRequest arg0, public ModelAndView handleRequest(HttpServletRequest arg0,

View File

@@ -0,0 +1,25 @@
package org.yacos.web.system.controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.SimpleFormController;
public class AboutController extends SimpleFormController {
protected final Log logger = LogFactory.getLog(getClass());
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
logger.info("Returning about view");
return new ModelAndView("about");
}
}