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:
Frederic Debuire
2008-02-22 23:06:05 +00:00
parent 8ce437a1d3
commit 25c6db06a2
12 changed files with 140 additions and 102 deletions

View File

@@ -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

View File

@@ -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/>

View File

@@ -6,35 +6,40 @@
<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>
<td> <form:label path="simpleRatings[${j.index}].name"><form:select path="simpleRatings[${j.index}].value">
<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">
<c:out value="${i}"/> <form:option value="${i}"></form:option>
<form:radiobutton path="simpleRatings[${j.index}].value" value="${i}" />
</c:forEach> </c:forEach>
</td> </form:select></form:label>
</tr> </div>
</c:forEach> </c:forEach>
<tr> </fieldset>
<td><fmt:message key="evaluation.commentAuthor"/></td>
<td><form:textarea path="commentAuthor"/></td>
</tr>
<tr> <p class="legend">Commentary</p>
<td><fmt:message key="evaluation.commentPCMember"/></td> <fieldset>
<td><form:textarea path="commentPCMember"/></td>
<tr>
</table>
<div>
<form:label path="commentAuthor"><fmt:message key="evaluation.commentAuthor"/></form:label>
<form:textarea path="commentAuthor" cols="60" rows="10"/>
</div>
<div>
<form:label path="commentPCMember"><fmt:message key="evaluation.commentPCMember"/></form:label>
<form:textarea path="commentPCMember" cols="60" rows="10"/>
</div>
</fieldset>
<input type="submit" name="submit" value="<fmt:message key="button.OK"/>"/> <input type="submit" name="submit" value="<fmt:message key="button.OK"/>"/>

View File

@@ -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>
</tr>
<tr>
<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:when test="${article.state eq 'SUBMITED'}"> <c:if test="${article.state eq 'EVALUATED'}">
<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> <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:when> </c:if>
<c:otherwise> <c:if test="${article.state eq 'REJECTED'}">
<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> Rejected <img src="./images/cancel32.png" alt="This article has been rejected" />
</c:otherwise> </c:if>
</c:choose>
<c:if test="${article.state eq 'ACCEPTED'}">
Accepted <img src="./images/ok32.png" alt="This article has been accepted" />
</ul> </c:if>
<br /> </td>
<hr /> </tr>
<br /> </table>
</div>
</c:forEach> </c:forEach>
</body> </body>
</html> </html>

View File

@@ -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>

View File

@@ -3,21 +3,36 @@
<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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1019 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -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() {

View File

@@ -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;
@@ -25,26 +26,35 @@ public class ValidateOrRejectController extends SimpleFormController {
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");
if (value.equals("valide"))
{
art.setState(State.ACCEPTED);
}
else if (value.equals("reject"))
{
art.setState(State.REJECTED);
}
try { try {
articleManager.updateArticle(art); Integer id = new Integer(articleId);
Article a = articleManager.getArticle(id);
if (a == null)
throw new ModelAndViewDefiningException(new ModelAndView("404error"));
String value = request.getParameter("value");
if (value.equals("valide")) {
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) { } catch (UndeclaredThrowableException e) {
e.printStackTrace(); e.printStackTrace();
System.out.println(e.getUndeclaredThrowable().toString()); }
}
catch (NumberFormatException e) {
throw new ModelAndViewDefiningException(new ModelAndView("404error"));
} }
return new ModelAndView(new RedirectView("validateArticle.htm")); return new ModelAndView(new RedirectView("validateArticle.htm"));
} }