Modification de la validation : mise en page et test d'erreur
Modification de l'évaluation : mise en page, ajout d'image pour chaque état de l'article.
This commit is contained in:
@@ -246,7 +246,7 @@ evaluation.headPage=Here is a report of the evaluation
|
|||||||
evaluation.titleArticle=The title of article is
|
evaluation.titleArticle=The title of article is
|
||||||
evaluation.note=The note for the criterion
|
evaluation.note=The note for the criterion
|
||||||
evaluation.thisArticle=evaluate this article
|
evaluation.thisArticle=evaluate this article
|
||||||
evaluation.choose=Choose a article to evaluate
|
evaluation.choose=Choose an article to evaluate
|
||||||
evaluation.help=Choose an article that you would like to evaluate
|
evaluation.help=Choose an article that you would like to evaluate
|
||||||
|
|
||||||
invitation.send=Send an invitation
|
invitation.send=Send an invitation
|
||||||
@@ -273,8 +273,8 @@ delegateArticles.help=Click to an article to delegate it to the referees
|
|||||||
#valider les articles
|
#valider les articles
|
||||||
validate.download=download the article
|
validate.download=download the article
|
||||||
validate.report=View the result of the evaluation
|
validate.report=View the result of the evaluation
|
||||||
validate.validate=validate
|
validate.validate=Validate
|
||||||
validate.reject=reject
|
validate.reject=Reject
|
||||||
|
|
||||||
#report des evaluations
|
#report des evaluations
|
||||||
report.headPage=Here is the list of the evaluation
|
report.headPage=Here is the list of the evaluation
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<h1>
|
<h1>
|
||||||
<a href="main.htm">
|
<a href="main.htm">
|
||||||
|
|
||||||
<img src="./images/404.jpg" alt="404" /><br/>
|
<img border="0" src="./images/404.jpg" alt="404" /><br/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,39 +6,44 @@
|
|||||||
|
|
||||||
<h4 class="title"><fmt:message key="evaluation.title"/>: ${evaluationForm.title}</h4>
|
<h4 class="title"><fmt:message key="evaluation.title"/>: ${evaluationForm.title}</h4>
|
||||||
|
|
||||||
<form:form method="post" commandName="evaluationForm">
|
<form:form method="post" commandName="evaluationForm" id="account_data">
|
||||||
|
|
||||||
|
<p class="legend">Rating</p>
|
||||||
|
<fieldset>
|
||||||
|
|
||||||
<table>
|
|
||||||
<c:forEach items="${evaluationForm.simpleRatings}" var="criterion" varStatus="j">
|
<c:forEach items="${evaluationForm.simpleRatings}" var="criterion" varStatus="j">
|
||||||
|
<div>
|
||||||
<tr>
|
<form:label path="title">${criterion.name}</form:label>
|
||||||
<td>${criterion.name}</td>
|
<form:hidden path="simpleRatings[${j.index}].name"></form:hidden>
|
||||||
<form:hidden path="simpleRatings[${j.index}].name"></form:hidden>
|
<form:label path="simpleRatings[${j.index}].name"><form:select path="simpleRatings[${j.index}].value">
|
||||||
<td>
|
<c:forEach var="i" begin="${criterion.min_rating}" end="${criterion.max_rating}" step="1">
|
||||||
<c:forEach var="i" begin="${criterion.min_rating}" end="${criterion.max_rating}" step="1">
|
<form:option value="${i}"></form:option>
|
||||||
<c:out value="${i}"/>
|
</c:forEach>
|
||||||
<form:radiobutton path="simpleRatings[${j.index}].value" value="${i}" />
|
</form:select></form:label>
|
||||||
</c:forEach>
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
|
|
||||||
<tr>
|
</fieldset>
|
||||||
<td><fmt:message key="evaluation.commentAuthor"/></td>
|
|
||||||
<td><form:textarea path="commentAuthor"/></td>
|
<p class="legend">Commentary</p>
|
||||||
</tr>
|
<fieldset>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<form:label path="commentAuthor"><fmt:message key="evaluation.commentAuthor"/></form:label>
|
||||||
|
<form:textarea path="commentAuthor" cols="60" rows="10"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<tr>
|
<div>
|
||||||
<td><fmt:message key="evaluation.commentPCMember"/></td>
|
<form:label path="commentPCMember"><fmt:message key="evaluation.commentPCMember"/></form:label>
|
||||||
<td><form:textarea path="commentPCMember"/></td>
|
<form:textarea path="commentPCMember" cols="60" rows="10"/>
|
||||||
<tr>
|
</div>
|
||||||
</table>
|
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<input type="submit" name="submit" value="<fmt:message key="button.OK"/>"/>
|
||||||
<input type="submit" name="submit" value="<fmt:message key="button.OK"/>"/>
|
|
||||||
|
|
||||||
</form:form>
|
</form:form>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<%@ include file="/WEB-INF/decorators/include.jsp"%>
|
<%@ include file="/WEB-INF/decorators/include.jsp"%>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head></head>
|
<head></head>
|
||||||
@@ -12,29 +12,39 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<c:forEach items="${listArticle}" var="article">
|
<c:forEach items="${listArticle}" var="article">
|
||||||
<ul class="article">
|
<div style="border: 1px solid orange;">
|
||||||
<li class="title">Title: <a href="<c:url value="${article.URL_article}"/>">${article.title}</a></li>
|
<table style="width: 100%">
|
||||||
<li class="author">Author: <b>${article.mainAuthor.firstName} ${article.mainAuthor.lastName}</b></li>
|
<tr>
|
||||||
<li class="topic">Topic: <b>${article.topic}</b></li>
|
<td colspan="2" align="center">
|
||||||
<c:choose>
|
<a title="Download" href="<c:url value="/download.htm"><c:param name="articleId" value="${article.id}"/></c:url>"><b>${article.title}</b></a> by ${article.mainAuthor.firstName} ${article.mainAuthor.lastName}
|
||||||
|
</td>
|
||||||
<c:when test="${article.state eq 'SUBMITED'}">
|
</tr>
|
||||||
<li class="article_url"><a title="Click to evaluate" href="<c:url value="evaluation.htm?id=${article.id}"/>"><img src="./images/cc-kedit-128x128.png" alt="Click to evaluate" /></a></li>
|
<tr>
|
||||||
</c:when>
|
<td align="left">
|
||||||
|
Topic: <b>${article.topic}</b><br/>
|
||||||
|
Abstract: ${article.abstractText}
|
||||||
|
</td>
|
||||||
|
<td align="right">
|
||||||
|
<c:if test="${article.state eq 'SUBMITED'}">
|
||||||
|
<a title="Click to evaluate" href="<c:url value="evaluation.htm?id=${article.id}"/>">Evaluate <img src="./images/button_follow_32x32.png" alt="Click to evaluate" /></a>
|
||||||
|
</c:if>
|
||||||
|
|
||||||
<c:otherwise>
|
<c:if test="${article.state eq 'EVALUATED'}">
|
||||||
<li class="article_url"><a title="Click to modify evaluation" href="<c:url value="evaluation.htm?id=${article.id}"/>"><img src="./images/cc-button_ok-128x128.png" alt="Click to modify evaluation" /></a></li>
|
<a title="Click to modify evaluation" href="<c:url value="evaluation.htm?id=${article.id}"/>">Modify the evaluation <img src="./images/cc-kedit-32x32.png" alt="Click to modify evaluation" /></a>
|
||||||
</c:otherwise>
|
</c:if>
|
||||||
</c:choose>
|
|
||||||
|
|
||||||
|
<c:if test="${article.state eq 'REJECTED'}">
|
||||||
|
Rejected <img src="./images/cancel32.png" alt="This article has been rejected" />
|
||||||
|
</c:if>
|
||||||
|
|
||||||
|
<c:if test="${article.state eq 'ACCEPTED'}">
|
||||||
</ul>
|
Accepted <img src="./images/ok32.png" alt="This article has been accepted" />
|
||||||
<br />
|
</c:if>
|
||||||
<hr />
|
</td>
|
||||||
<br />
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
<span class="formError"><form:errors path="theme" /></span>
|
<span class="formError"><form:errors path="theme" /></span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<form:label path="theme"><fmt:message key="form.submission.article.abstractText" /></form:label>
|
<form:label path="abstractText"><fmt:message key="form.submission.article.abstractText" /></form:label>
|
||||||
<form:textarea path="abstractText" cols="60" rows="10" />*<br />
|
<form:textarea path="abstractText" cols="60" rows="10" />*<br />
|
||||||
<span class="abstractText"><form:errors path="theme" /></span>
|
<span class="abstractText"><form:errors path="theme" /></span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,22 +2,37 @@
|
|||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head></head>
|
<head></head>
|
||||||
<body>
|
<body>
|
||||||
<h4 class="title">NO NAME</h4>
|
<h4 class="title">Validate an article</h4>
|
||||||
<br>
|
|
||||||
|
<p class="formHelp">
|
||||||
|
Choose whether you want to validate an article (i.e. the article will take part in the conference) or reject it.
|
||||||
|
</p>
|
||||||
|
|
||||||
<c:forEach items="${listArticleValidate}" var="article">
|
<c:forEach items="${listArticleValidate}" var="article">
|
||||||
<ul class="article">
|
<div style="border: 1px solid orange;">
|
||||||
<li class="title">TiTle: ${article.title} </li>
|
<table style="width: 100%; text-align: center;">
|
||||||
<li class="author">Author: ${article.mainAuthor}</li>
|
<tr>
|
||||||
<li class="topic">Topic: ${article.topic}</li>
|
<td><b>${article.title}</b></td>
|
||||||
<li class="state">State: ${article.state} <a href="<c:url value="validateOrReject.htm?value=valide&id=${article.id}"/>"><fmt:message key="validate.validate"/></a>
|
<td>${article.mainAuthor.firstName} ${article.mainAuthor.lastName}</td>
|
||||||
<a href="<c:url value="validateOrReject.htm?value=reject&id=${article.id}"/>"><fmt:message key="validate.reject"/></a> </li>
|
</tr>
|
||||||
<li class="article_url"><a href="<c:url value="${article.URL_article}"/>"><fmt:message key="validate.download"/></a> <a href="<c:url value="listReport.htm?id=${article.id}"/>"><fmt:message key="validate.report"/></a></li>
|
<tr>
|
||||||
|
<td colspan="2">State: ${article.state}
|
||||||
|
<a href="<c:url value="validateOrReject.htm?value=valide&id=${article.id}"/>">
|
||||||
</ul>
|
<fmt:message key="validate.validate" /><img src="./images/ok.png" alt="Validate" /></a>
|
||||||
|
<a href="<c:url value="validateOrReject.htm?value=reject&id=${article.id}"/>">
|
||||||
|
<fmt:message key="validate.reject" /><img src="./images/cancel.png" alt="Reject" /></a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a 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>
|
||||||
|
<td><a href="<c:url value="listReport.htm?id=${article.id}"/>"><fmt:message key="validate.report" /></a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
|
|
||||||
|
|
||||||
<a href="<c:url value="main.htm"/>">Home</a>
|
<a href="<c:url value="main.htm"/>">Home</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
BIN
YACOSWeb/WebContent/images/cancel.png
Normal file
BIN
YACOSWeb/WebContent/images/cancel.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
YACOSWeb/WebContent/images/cancel32.png
Normal file
BIN
YACOSWeb/WebContent/images/cancel32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
YACOSWeb/WebContent/images/ok.png
Normal file
BIN
YACOSWeb/WebContent/images/ok.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1019 B |
BIN
YACOSWeb/WebContent/images/ok32.png
Normal file
BIN
YACOSWeb/WebContent/images/ok32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@@ -1,11 +1,11 @@
|
|||||||
package org.yacos.web.PCmember.controller;
|
package org.yacos.web.PCmember.controller;
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import javax.servlet.ServletException;
|
import javax.servlet.ServletException;
|
||||||
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.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
@@ -26,16 +26,14 @@ public class ValidateArticleController extends SimpleFormController {
|
|||||||
throws ServletException, IOException{
|
throws ServletException, IOException{
|
||||||
|
|
||||||
logger.info("Returning validateArticle view");
|
logger.info("Returning validateArticle view");
|
||||||
List<Article> listArticleValidate;
|
List<Article> listArticleValidate = new ArrayList<Article>();
|
||||||
try {
|
try {
|
||||||
listArticleValidate = articleManager.getArticles(SessionService.getInstance().getCurrentConferenceId());
|
listArticleValidate = articleManager.getArticles(SessionService.getInstance().getCurrentConferenceId());
|
||||||
request.getSession().setAttribute("listArticleValidate", listArticleValidate);
|
|
||||||
} catch (ConferenceDoesntExistException e) {
|
} catch (ConferenceDoesntExistException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return new ModelAndView("validateArticle", "listArticleValidate", listArticleValidate);
|
||||||
return new ModelAndView("validateArticle");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IArticleManager getArticleManager() {
|
public IArticleManager getArticleManager() {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ 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.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import org.springframework.web.servlet.ModelAndViewDefiningException;
|
||||||
import org.springframework.web.servlet.mvc.SimpleFormController;
|
import org.springframework.web.servlet.mvc.SimpleFormController;
|
||||||
import org.springframework.web.servlet.view.RedirectView;
|
import org.springframework.web.servlet.view.RedirectView;
|
||||||
import org.yacos.core.article.Article;
|
import org.yacos.core.article.Article;
|
||||||
@@ -17,42 +18,51 @@ import org.yacos.core.article.Article.State;
|
|||||||
|
|
||||||
public class ValidateOrRejectController extends SimpleFormController {
|
public class ValidateOrRejectController extends SimpleFormController {
|
||||||
|
|
||||||
protected final Log logger = LogFactory.getLog(getClass());
|
protected final Log logger = LogFactory.getLog(getClass());
|
||||||
|
|
||||||
private IArticleManager articleManager;
|
private IArticleManager articleManager;
|
||||||
|
|
||||||
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
|
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
|
||||||
throws ServletException{
|
throws ServletException{
|
||||||
|
|
||||||
logger.info("Returning ValidateOrReject view");
|
logger.info("Returning ValidateOrReject view");
|
||||||
String id=(String)request.getParameter("id");
|
String articleId = request.getParameter("id");
|
||||||
Article art=articleManager.getArticle(Integer.parseInt(id));
|
|
||||||
String value=request.getParameter("value");
|
try {
|
||||||
if (value.equals("valide"))
|
Integer id = new Integer(articleId);
|
||||||
{
|
|
||||||
|
Article a = articleManager.getArticle(id);
|
||||||
art.setState(State.ACCEPTED);
|
|
||||||
}
|
|
||||||
else if (value.equals("reject"))
|
|
||||||
{
|
|
||||||
|
|
||||||
art.setState(State.REJECTED);
|
|
||||||
|
|
||||||
}
|
if (a == null)
|
||||||
|
throw new ModelAndViewDefiningException(new ModelAndView("404error"));
|
||||||
try {
|
|
||||||
articleManager.updateArticle(art);
|
String value = request.getParameter("value");
|
||||||
} catch (UndeclaredThrowableException e) {
|
|
||||||
e.printStackTrace();
|
if (value.equals("valide")) {
|
||||||
System.out.println(e.getUndeclaredThrowable().toString());
|
a.setState(State.ACCEPTED);
|
||||||
|
}
|
||||||
|
else if (value.equals("reject")) {
|
||||||
|
a.setState(State.REJECTED);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
throw new ModelAndViewDefiningException(new ModelAndView("404error"));
|
||||||
|
|
||||||
|
try {
|
||||||
|
articleManager.updateArticle(a);
|
||||||
|
} catch (UndeclaredThrowableException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (NumberFormatException e) {
|
||||||
|
throw new ModelAndViewDefiningException(new ModelAndView("404error"));
|
||||||
}
|
}
|
||||||
return new ModelAndView(new RedirectView("validateArticle.htm"));
|
return new ModelAndView(new RedirectView("validateArticle.htm"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public IArticleManager getArticleManager() {
|
public IArticleManager getArticleManager() {
|
||||||
return articleManager;
|
return articleManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setArticleManager(IArticleManager articleManager) {
|
public void setArticleManager(IArticleManager articleManager) {
|
||||||
this.articleManager = articleManager;
|
this.articleManager = articleManager;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user