- Le report après la création d'une conf est fini (presque en fait ;) )

- Correction de bug (suppression de getServletContext pour des request.getSession())
This commit is contained in:
Frederic Debuire
2008-02-19 15:36:55 +00:00
parent 3e50a4f897
commit 006d4c9172
8 changed files with 61 additions and 50 deletions

View File

@@ -27,10 +27,10 @@ conference.detail.description=Description
conference.detail.other=Others informations conference.detail.other=Others informations
conference.detail.nosuppl=No supplementary informations. conference.detail.nosuppl=No supplementary informations.
conference.detail.date.title=Important dates conference.detail.date.title=Important dates
conference.detail.date.start=Conference start : conference.detail.date.start=Conference start:
conference.detail.date.end=Conference end : conference.detail.date.end=Conference end:
conference.detail.date.article=Limit for submission of articles : conference.detail.date.article=Limit for submission of articles:
conference.detail.date.evaluation=Limit for evaluation of articles : conference.detail.date.evaluation=Limit for evaluation of articles:
conference.detail.link.submit=Submit an article conference.detail.link.submit=Submit an article
################### ###################
@@ -113,7 +113,7 @@ form.register.error.lastNameEmpty=Last name is required
form.register.error.passwordEmpty=The password can't be empty form.register.error.passwordEmpty=The password can't be empty
form.register.error.alreadyExists=A user with this login already exists. Please check you haven't already registered or change your login. form.register.error.alreadyExists=A user with this login already exists. Please check you haven't already registered or change your login.
form.link.back=Back form.link.back=Back
form.label.newaccount=You want to post an article and participate to one conference? Create your account ! form.label.newaccount=You want to post an article and participate to one conference? Create your account!
form.label.message=If you already have an account you can connect using the form.label.message=If you already have an account you can connect using the
form.label.linkPage=opening session page form.label.linkPage=opening session page
form.field.account=Your account form.field.account=Your account
@@ -128,7 +128,7 @@ form.edit.txt=Access and edit all your personal informations.
# FORGOT USER # FORGOT USER
form.forgotPassword.error.emailInvalid=This email is invalid form.forgotPassword.error.emailInvalid=This email is invalid
form.forgotPassword.error.unknownEmail=This email is not registered in our system form.forgotPassword.error.unknownEmail=This email is not registered in our system
form.forgotPassword.email=E-Mail address for your account : form.forgotPassword.email=E-Mail address for your account:
form.forgotPassword.submit=Request new password form.forgotPassword.submit=Request new password
form.forgotPassword.help=Please enter the email address you used for your YACOS account.\nA new password will be generated and sent into your mailbox. form.forgotPassword.help=Please enter the email address you used for your YACOS account.\nA new password will be generated and sent into your mailbox.
forgotPassword.title=Reset your password forgotPassword.title=Reset your password
@@ -140,7 +140,7 @@ message.error.noconferenceforthisid=This conference doesn't exist. Please try ag
message.error.noconferenceid=No conference selected message.error.noconferenceid=No conference selected
message.error.conferenceerror=Error. Please try again.<br/>Sorry for the inconvenience. message.error.conferenceerror=Error. Please try again.<br/>Sorry for the inconvenience.
message.error.page404.title=Page not found message.error.page404.title=Page not found
message.error.page404.content=Sorry, the page where you looking for could not be found. message.error.page404.content=Sorry, the page you where looking for could not be found.
message.error.page403.title=Access denied message.error.page403.title=Access denied
message.error.page403.content=Sorry, you can't access this page. message.error.page403.content=Sorry, you can't access this page.
@@ -210,7 +210,7 @@ conference.linkMenu.title=Adding Conference
conference.linkMenu.choose=Select a conference conference.linkMenu.choose=Select a conference
conference.linkMenu.change=Change conference conference.linkMenu.change=Change conference
noCurrentConferenceText=No conference selected noCurrentConferenceText=No conference selected
currentConferenceText=You have selected : currentConferenceText=You have selected:
conference.errors.dateStartNonValid=This date is not valid conference.errors.dateStartNonValid=This date is not valid
conference.errors.dateStartSuperiorEnd=The start date must be earlier than the end date conference.errors.dateStartSuperiorEnd=The start date must be earlier than the end date
@@ -221,8 +221,8 @@ conference.errors.pageNumberNotValid=It should be a number
conference2.title=Calendar conference2.title=Calendar
conference2.date=Conference's date conference2.date=Conference's date
conference2.start=Begins on : conference2.start=Begins on:
conference2.end=Ends on : conference2.end=Ends on:
conference2.abstract=Abstract deadline conference2.abstract=Abstract deadline
conference2.article=Submission deadline conference2.article=Submission deadline
conference2.evaluation=Evaluation deadline conference2.evaluation=Evaluation deadline

View File

@@ -9,50 +9,55 @@
<p class="formOk"> <p class="formOk">
Your conference has been successfully created.<br/> Your conference has been successfully created.<br/>
Here is a report of the conference's informations.<br/><br/> Here is a report of the conference's informations.<br/><br/>
Any moment you can edit the configuration of the conference using the item menu "Modify this conference".<br/> At any moment you can edit the configuration of the conference using the item menu "Modify this conference".<br/>
If you want to modify it now, just click <a href="addConference.htm?action=modify" title="Modify the conference">here</a><br/> If you want to modify it now, just click <a href="addConference.htm?action=modify" title="Modify the conference">here</a><br/>
</p> </p>
<div id="account_data">
<fieldset> <center><h2 class="maintitle">${conferenceReport.title}</h2></center>
${conferenceReport.title}<br /> <h3 class="descriptionTitle"><fmt:message key="conference.detail.description" /></h3>
${conferenceReport.description}<br /> <div class="textBox">
${conferenceReport.otherInformations}<br /> ${conferenceReport.description }
</div>
<h3 class="descriptionTitle"><fmt:message key="conference.detail.other" /></h3>
<div class="textBox">
<c:choose>
<c:when test="${conferenceReport.otherInformations != null}">
<c:if test="${conferenceReport.otherInformations == ''}">
<fmt:message key="conference.detail.nosuppl" />
</c:if>
${conferenceReport.otherInformations }
</c:when>
</c:choose>
</div>
<h3 class="dateTitle"><fmt:message key="conference.detail.date.title" /></h3>
<div class="textBox">
<b><fmt:message key="conference.detail.date.start" /></b>&nbsp;<fmt:formatDate value="${conferenceReport.dateStart }" dateStyle="long" /><br />
<b><fmt:message key="conference.detail.date.end" /></b>&nbsp;<fmt:formatDate value="${conferenceReport.dateEnd }" dateStyle="long" /><br /><br />
<b><fmt:message key="conference.detail.date.article" /></b>&nbsp;<fmt:formatDate value="${conferenceReport.dateArticle }" dateStyle="long" /><br />
<b><fmt:message key="conference.detail.date.evaluation" /></b>&nbsp;<fmt:formatDate value="${conferenceReport.dateEvaluation }" dateStyle="long" /><br />
</div>
<br /> <h3 class="descriptionTitle"></h3>
<div class="textBox">
Chairman: <b>${conferenceReport.chairman.firstName} ${conferenceReport.chairman.lastName}</b><br />
<br />
<b>Important dates</b>
${conferenceReport.dateArticle}<br />
${conferenceReport.dateEvaluation}<br />
${conferenceReport.dateStart}<br />
${conferenceReport.dateEnd}<br />
<br />
<c:if test="${not empty criterionReport}"> <c:if test="${not empty criterionReport}">
<b>Criterion's list </b><br /> <b>Criterion's list </b><br />
</c:if> </c:if>
<c:forEach items="${criterionReport}" var="crit"> <c:forEach items="${criterionReport}" var="crit">
${crit.name} ${crit.min_rating} ${crit.max_rating}<br /> ${crit.name} From ${crit.min_rating} to ${crit.max_rating}<br />
</c:forEach> </c:forEach>
</div>
<h3 class="descriptionTitle"></h3>
<div class="textBox">
<b>Chairman:</b> ${conferenceReport.chairman.firstName} ${conferenceReport.chairman.lastName}<br /><br />
<c:if test="${not empty userReport}"> <c:if test="${not empty userReport}">
<b>PCmember's list </b><br /> <b>PCmember's list </b><br />
</c:if> </c:if>
<c:forEach items="${userReport}" var="user"> <c:forEach items="${userReport}" var="user">
<b>${user.firstName} ${user.lastName}</b><br /> ${user.firstName} ${user.lastName}<br />
</c:forEach> </c:forEach>
</div>
</fieldset>
</div>
<a href="<c:url value="main.htm"/>">Home</a>
</body> </body>
</html> </html>

View File

@@ -31,7 +31,7 @@ public class ListArticleController extends SimpleFormController {
List<Article> listArticle; List<Article> listArticle;
try { try {
listArticle = articleManager.getArticles(SessionService.getInstance().getCurrentConferenceId()); listArticle = articleManager.getArticles(SessionService.getInstance().getCurrentConferenceId());
getServletContext().setAttribute("listArticle", listArticle); request.getSession().setAttribute("listArticle", listArticle);
} catch (ConferenceDoesntExistException e) { } catch (ConferenceDoesntExistException e) {
logger.error(e.getMessage()); logger.error(e.getMessage());
} }

View File

@@ -31,7 +31,7 @@ public class ListEvaluationController extends SimpleFormController {
List<Article> listArticle; List<Article> listArticle;
try { try {
listArticle = articleManager.getArticles(SessionService.getInstance().getCurrentConferenceId()); listArticle = articleManager.getArticles(SessionService.getInstance().getCurrentConferenceId());
getServletContext().setAttribute("listArticle", listArticle); request.getSession().setAttribute("listArticle", listArticle);
} catch (ConferenceDoesntExistException e) { } catch (ConferenceDoesntExistException e) {
logger.error(e.getMessage()); logger.error(e.getMessage());
} }

View File

@@ -1,7 +1,9 @@
package org.yacos.web.PCmember.controller; package org.yacos.web.PCmember.controller;
import java.io.IOException; import java.io.IOException;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@@ -32,12 +34,15 @@ public class ListReportController extends SimpleFormController {
String id=request.getParameter("id"); String id=request.getParameter("id");
int idd=Integer.parseInt(id); int idd=Integer.parseInt(id);
Map <String, Object> model = new HashMap<String, Object>();
listReport = evaluationManager.getReportsForArticle(idd); listReport = evaluationManager.getReportsForArticle(idd);
getServletContext().setAttribute("listReport", listReport); model.put("listReport", listReport);
List<Rating> ratings=evaluationManager.getRatingForReport(listReport.get(listReport.size()-1).getId()); List<Rating> ratings=evaluationManager.getRatingForReport(listReport.get(listReport.size()-1).getId());
getServletContext().setAttribute("rtgs", ratings); model.put("rtgs", ratings);
return new ModelAndView("listReport");
return new ModelAndView("listReport", model);
} }
public IEvaluationManager getEvaluationManager() { public IEvaluationManager getEvaluationManager() {

View File

@@ -26,14 +26,11 @@ public class ValidateArticleController extends SimpleFormController {
throws ServletException, IOException{ throws ServletException, IOException{
logger.info("Returning validateArticle view"); logger.info("Returning validateArticle view");
//FIXME user "toto" a remplacer par le vrai PCmembre
List<Article> listArticleValidate; List<Article> listArticleValidate;
//listArticleValidate = articleManager.getArticlesOfMember(SessionService.getInstance().getCurrentConferenceId(),"toto");
try { try {
listArticleValidate = articleManager.getArticles(SessionService.getInstance().getCurrentConferenceId()); listArticleValidate = articleManager.getArticles(SessionService.getInstance().getCurrentConferenceId());
getServletContext().setAttribute("listArticleValidate", listArticleValidate); request.getSession().setAttribute("listArticleValidate", listArticleValidate);
} catch (ConferenceDoesntExistException e) { } catch (ConferenceDoesntExistException e) {
// TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }

View File

@@ -57,6 +57,9 @@ public class ArticleDownloadController implements Controller {
} }
int length = (int) llength; int length = (int) llength;
if (!file.exists())
return new ModelAndView(new RedirectView("404error.htm"));
// We use a BufferedReader to avoid loading the whole file in memory at once // We use a BufferedReader to avoid loading the whole file in memory at once
BufferedInputStream in = new BufferedInputStream( BufferedInputStream in = new BufferedInputStream(
new FileInputStream(file)); new FileInputStream(file));

View File

@@ -1,4 +1,5 @@
package org.yacos.web.system.controller; package org.yacos.web.system.controller;
import java.io.IOException; import java.io.IOException;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;