Soumission article : apres erreur de validation, les auteurs secondaires ne se remplissent pas
Corriger le texte du main Faire le lien admin Corriger page warning quand log sans conf selectionée Corriger anglais dans conference list et passer à un tick au lieu d'un ? (apres creation user) Notification email (presque fini - a tester) => article accepté => article refusé Comment : c'est "for author" et pas "of author" Afficher le menu addConference quand l'utilisateur a le droit (dés qu'il est loggé) Accueil : choose a conference a remplacer par register
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
download.dir.path=../server/default/data/uploadedFiles/
|
||||
mailService.fromEmailAddress=system@yacos.dreamhosters.com
|
||||
mailService.replyToEmailAddress=no-reply@yacos.dreamhosters.com
|
||||
mailService.replyToEmailAddress=no-reply@yacos.dreamhosters.com
|
||||
mailService.host=smtp.univ-lille1.fr
|
||||
mailService.username=
|
||||
mailService.password=
|
||||
mailService.port=25
|
||||
@@ -17,12 +17,13 @@ home.author.txt=Simple ! With Yacos you can take a look on all open conferences
|
||||
home.referee=I am a program committee member. How Yacos can help me ?
|
||||
home.referee.txt=If you are the chairman, a PC member or simply a referee, thanks to yacos you can follow articles posted by authors.<br />As chairman, you can dispatch articles to your members for review and rating, manage your conference, the deadlines...<br />As the PC member or referee, you can review an article, post your comments and rate it, express your preference toward the submitted articles,...
|
||||
home.youknow=So now you know...
|
||||
home.link.choose=Choose one conference
|
||||
home.link.choose=Browse the conferences
|
||||
home.link.register=Create an account
|
||||
home.link.userBoard=Go to your dashboard
|
||||
|
||||
connected.noconference.title=No conference selected
|
||||
connected.noconference.warning=You must choose a conference to access all your features :
|
||||
connected.noconference.warning=Or you can see a recap of your current involvement in the conferences available in the system :
|
||||
connected.noconference.warning.userBoard=Or you can see a recap of your current involvement in the conferences available in the system :
|
||||
article.post.noconference=You must choose a conference before post or edit an article.
|
||||
|
||||
conference.detail.description=Description
|
||||
@@ -67,6 +68,9 @@ menu.general.title=Main
|
||||
menu.general.userBoard=User Board
|
||||
menu.general.confInfo=Conference's informations
|
||||
|
||||
menu.admin.title=Administrator
|
||||
menu.admin.manageUsers=Manage users
|
||||
|
||||
menu.chairman.title=Chairman
|
||||
menu.chairman.conference.create=Create new conference
|
||||
menu.chairman.conference.modify=Modify this conference
|
||||
@@ -129,8 +133,8 @@ form.label.linkPage=opening session page
|
||||
form.field.account=Your account
|
||||
form.field.personal=Personal details
|
||||
form.field.necessary=* Required informations
|
||||
message.account.validate=Account created successfully. You can now connect at this.
|
||||
message.account.maj=Your account was indeed updated.
|
||||
message.account.validate=Account created successfully. You can now use the system.
|
||||
message.account.maj=Your account was successfully updated.
|
||||
form.edit.title=Edit your account
|
||||
form.edit.txt=Access and edit all your personal informations.
|
||||
|
||||
@@ -250,10 +254,10 @@ conference.error.noTokenLeft=You have no conference creation token left !\nPleas
|
||||
|
||||
|
||||
evaluation.title=You are evaluating
|
||||
evaluation.commentPCMember=Comment of PC Member
|
||||
evaluation.commentAuthor=Comment of author
|
||||
evaluation.commentPCMember=Comment for PC Member
|
||||
evaluation.commentAuthor=Comment for author
|
||||
evaluation.headPage=Report of the evaluation
|
||||
evaluation.titleArticle=The title of article is
|
||||
evaluation.titleArticle=The title of this article is
|
||||
evaluation.note=The note for the criterion
|
||||
evaluation.thisArticle=evaluate this article
|
||||
evaluation.choose=Choose an article to evaluate
|
||||
@@ -265,7 +269,7 @@ invitation.send=Send an invitation
|
||||
ConflictList.list1=Members of the conference
|
||||
ConflictList.list2=ConflictList of the article
|
||||
ConflictList.choose=manage the conflict list of the conference's articles
|
||||
ConflictList.help=Click to an article to edit the conclict list
|
||||
ConflictList.help=Click to an article to edit the conflict list
|
||||
|
||||
#DispatchMembers
|
||||
members.list1=Members of the conference
|
||||
@@ -277,7 +281,7 @@ disptachArticle.help=Click to an article to dispatch the members
|
||||
#DelegateArticles
|
||||
delegateArticles.choose=delegate the articles between to the referees
|
||||
delegateArticles.list1= referees of the conference
|
||||
delegateArticles.list2= referees aassociate to the article
|
||||
delegateArticles.list2= referees associated to this article
|
||||
delegateArticles.help=Click to an article to delegate it to the referees
|
||||
|
||||
#valider les articles
|
||||
|
||||
@@ -8,11 +8,6 @@
|
||||
|
||||
<div id="mainmenu">
|
||||
|
||||
<!-- On affiche les menus seulement si une conference est deja active -->
|
||||
|
||||
<c:if test="${currentConferenceId != null}">
|
||||
|
||||
|
||||
<!-- MENU : ROLE_USER for general option -->
|
||||
<authz:authorize ifAllGranted="ROLE_USER">
|
||||
<div class="mainmenubloc">
|
||||
@@ -27,6 +22,17 @@
|
||||
</authz:authorize>
|
||||
|
||||
|
||||
<!-- MENU : ROLE_ADMIN -->
|
||||
<authz:authorize ifAllGranted="ROLE_ADMIN">
|
||||
<div class="mainmenubloc">
|
||||
<h4><fmt:message key="menu.admin.title" /></h4>
|
||||
<ul>
|
||||
<li><a href="<c:url value="admin.htm"/>"><fmt:message key="menu.admin.manageUsers" /></a></li>
|
||||
</ul>
|
||||
<div class="footer"></div>
|
||||
</div>
|
||||
</authz:authorize>
|
||||
|
||||
<!-- MENU : CHAIRMAN -->
|
||||
<authz:authorize ifAnyGranted="ROLE_CHAIRMAN,ROLE_CONFERENCE_CREATOR">
|
||||
<div class="mainmenubloc">
|
||||
@@ -35,12 +41,14 @@
|
||||
<authz:authorize ifAllGranted="ROLE_CONFERENCE_CREATOR">
|
||||
<li><a href="<c:url value="addConference.htm"/>"><fmt:message key="menu.chairman.conference.create" /></a></li>
|
||||
</authz:authorize>
|
||||
<authz:authorize ifAllGranted="ROLE_CHAIRMAN">
|
||||
<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="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="forum.htm?role=chairman"/>"><fmt:message key="menu.chairman.article.discussion" /></a></li>
|
||||
</authz:authorize>
|
||||
</ul>
|
||||
<div class="footer"></div>
|
||||
</div>
|
||||
@@ -96,9 +104,6 @@
|
||||
</div>
|
||||
</authz:authorize>
|
||||
|
||||
</c:if>
|
||||
|
||||
|
||||
</div><!--mainmenu-->
|
||||
|
||||
</body>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<h4 class="title">Conference's list</h4>
|
||||
|
||||
<c:if test="${ac != null}">
|
||||
<p class="formHelp">
|
||||
<p class="formOk">
|
||||
<c:choose>
|
||||
<c:when test="${ac == 2}"><fmt:message key="message.account.validate" /></c:when>
|
||||
<c:when test="${ac == 1}"><fmt:message key="message.account.maj" /></c:when>
|
||||
|
||||
@@ -106,7 +106,13 @@
|
||||
<h3 class="subtitle"><fmt:message key="home.referee" /></h3>
|
||||
<p><fmt:message key="home.referee.txt" /></p>
|
||||
|
||||
<h3 class="subtitle"><fmt:message key="home.youknow" /> <a href="<c:url value="listConference.htm"/>" class="register_link"><fmt:message key="home.link.choose" /> !</a></h3>
|
||||
<h3 class="subtitle"><fmt:message key="home.youknow" /> </h3>
|
||||
<p>
|
||||
<a href="<c:url value="listConference.htm"/>" class="register_link"><fmt:message key="home.link.choose" /></a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="<c:url value="registerUser.htm"/>" class="register_link"><fmt:message key="home.link.register" /></a>
|
||||
</p>
|
||||
</authz:authorize>
|
||||
</c:otherwise>
|
||||
|
||||
|
||||
@@ -233,7 +233,8 @@
|
||||
<property name="userManager" ref="userManager" />
|
||||
<property name="evaluationManager" ref="evaluationManager" />
|
||||
<property name="validator" ref="ConferenceValidator" />
|
||||
</bean>
|
||||
</bean>
|
||||
|
||||
<bean id="ReportConfCreateController"
|
||||
class="org.yacos.web.chairman.controller.ReportConfCreateController">
|
||||
<property name="conferenceManager" ref="conferenceManager" />
|
||||
@@ -376,7 +377,10 @@
|
||||
</bean>
|
||||
|
||||
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
|
||||
<property name="host" value="smtp.univ-lille1.fr"/>
|
||||
<property name="host" value="${mailService.host}"/>
|
||||
<property name="username" value="${mailService.username}"/>
|
||||
<property name="password" value="${mailService.password}"/>
|
||||
<property name="port" value="${mailService.port}"/>
|
||||
</bean>
|
||||
|
||||
<bean id="mailSenderService"
|
||||
|
||||
@@ -15,6 +15,11 @@ import org.springframework.web.servlet.view.RedirectView;
|
||||
import org.yacos.core.article.Article;
|
||||
import org.yacos.core.article.IArticleManager;
|
||||
import org.yacos.core.article.Article.State;
|
||||
import org.yacos.core.conferences.Conference;
|
||||
import org.yacos.core.users.User;
|
||||
import org.yacos.web.system.controller.MailSenderService;
|
||||
import org.yacos.web.system.session.SessionService;
|
||||
import org.yacos.web.system.session.YACOSUtils;
|
||||
|
||||
public class ValidateOrRejectController extends SimpleFormController {
|
||||
|
||||
@@ -37,12 +42,33 @@ public class ValidateOrRejectController extends SimpleFormController {
|
||||
throw new ModelAndViewDefiningException(new ModelAndView("404error"));
|
||||
|
||||
String value = request.getParameter("value");
|
||||
|
||||
|
||||
Conference conf = SessionService.getInstance().getCurrentConference();
|
||||
String userLogin = a.getMainAuthor().getLogin();
|
||||
User author = SessionService.getInstance().getUserManager().getUser(userLogin);
|
||||
if (value.equals("valide")) {
|
||||
a.setState(State.ACCEPTED);
|
||||
// Sending email
|
||||
String mailSubject = "YACOS : Your article has been accepted";
|
||||
String mailBody = "Your article entitled "+a.getTitle();
|
||||
mailBody += " has been accepted by the program committee.\n";
|
||||
mailBody += "It's content will be featured on the program of the upcoming conference :\n";
|
||||
mailBody += conf.getTitle()+"\n";
|
||||
mailBody += "Please mark on your calendar the dates for this conference :";
|
||||
mailBody += "Starts on "+conf.getDateStart()+" and ends on "+conf.getDateEnd()+"\n";
|
||||
mailBody += "Thank you for your participation.\n";
|
||||
MailSenderService.getInstance().sendEMail(author.getEmail(), mailSubject, mailBody);
|
||||
}
|
||||
else if (value.equals("reject")) {
|
||||
a.setState(State.REJECTED);
|
||||
// Sending email
|
||||
String mailSubject = "YACOS : Your submission has been declined";
|
||||
String mailBody = "Your article entitled "+a.getTitle();
|
||||
mailBody += " has not been accepted by the program committee.\n";
|
||||
mailBody += "You can view the comments leaved by the evaluators on your personnal space :\n";
|
||||
mailBody += YACOSUtils.fullURL("userBoard.htm")+"\n";
|
||||
mailBody += "Thank you for your participation.\n";
|
||||
MailSenderService.getInstance().sendEMail(author.getEmail(), mailSubject, mailBody);
|
||||
}
|
||||
else
|
||||
throw new ModelAndViewDefiningException(new ModelAndView("404error"));
|
||||
|
||||
@@ -57,13 +57,16 @@ public class SArticleController extends SimpleFormController {
|
||||
}
|
||||
|
||||
String action = request.getParameter("action");
|
||||
|
||||
// We're creating a new article, in opposition of modifying one
|
||||
if (action == null || action.equals(""))
|
||||
{
|
||||
|
||||
// Try to save the file
|
||||
String nomFile="";
|
||||
|
||||
try {
|
||||
MultipartFile file = ((FormSubmission) command).getFile();
|
||||
// No file
|
||||
if (file == null || file.isEmpty()) {
|
||||
errors.rejectValue("file", "form.submitArticle.noFile");
|
||||
try {
|
||||
@@ -73,7 +76,7 @@ public class SArticleController extends SimpleFormController {
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
// Checking the extension
|
||||
String extension = file.getOriginalFilename().substring(file.getOriginalFilename().length() - 4).toLowerCase();
|
||||
logger.info("The file extension is: " + extension);
|
||||
|
||||
@@ -123,11 +126,12 @@ public class SArticleController extends SimpleFormController {
|
||||
}
|
||||
}
|
||||
|
||||
// Creates the article
|
||||
// Actually creates the article
|
||||
Article newArticle = articleManager.addArticle(
|
||||
title, theme, abstractText, nomFile, user.getLogin(),
|
||||
listSecondaryAuthor, Article.State.SUBMITED, conf.getId());
|
||||
|
||||
|
||||
// We had a persistence error, stop and return
|
||||
if(newArticle==null){
|
||||
errors.reject("article.errors.didNotSave");
|
||||
try {
|
||||
@@ -138,17 +142,21 @@ public class SArticleController extends SimpleFormController {
|
||||
}
|
||||
|
||||
byte b[] = file.getBytes();
|
||||
|
||||
|
||||
// Create the file name
|
||||
String path = "conference"+conf.getId()+"/";
|
||||
// Ensure we have the correct file hierarchy
|
||||
(new File(downloadDirPath+path)).mkdirs();
|
||||
// Complete the path so it is valid, relative to the JBoss working dir
|
||||
path += newArticle.getId()+"_"+file.getOriginalFilename();
|
||||
// Create the actual output file
|
||||
File uploadedFile = new File(downloadDirPath+path);
|
||||
|
||||
// Write the data
|
||||
FileOutputStream fos = new FileOutputStream(uploadedFile);
|
||||
|
||||
fos.write(b);
|
||||
fos.close();
|
||||
|
||||
|
||||
// Save the file URL in the database, now it's saved
|
||||
newArticle.setURL_article(path);
|
||||
articleManager.updateArticle(newArticle);
|
||||
}
|
||||
@@ -163,20 +171,28 @@ public class SArticleController extends SimpleFormController {
|
||||
// The role author might have been added, refresh the credentials
|
||||
SessionService.getInstance().refreshAuthentication();
|
||||
}
|
||||
// Case of a modification of an existing article
|
||||
else if (action.equals("modify")) {
|
||||
String articleID = request.getParameter("articleID");
|
||||
|
||||
try {
|
||||
Integer id = new Integer(articleID);
|
||||
|
||||
// TODO : v<>rifier que l'id de l'article appartient <20> l'auteur... vive les GET...
|
||||
|
||||
Article old = articleManager.getArticle(id);
|
||||
// In case of an error, we want the secondary authors to be filled on the page
|
||||
request.setAttribute("listSecondaryAuthors", old.getSecondaryAuthors());
|
||||
old.setTitle(title);
|
||||
old.setTopic(theme);
|
||||
old.setSecondaryAuthors(listSecondaryAuthor);
|
||||
old.setAbstractText(abstractText);
|
||||
|
||||
// Check that the user owns this article
|
||||
String login = SessionService.getInstance().getCurrentUserLogin();
|
||||
if(! old.getMainAuthor().getLogin().equals(login)){
|
||||
// Throw a denied page
|
||||
throw new ModelAndViewDefiningException(new ModelAndView("denied"));
|
||||
}
|
||||
|
||||
MultipartFile file = ((FormSubmission) command).getFile();
|
||||
if (file == null || file.isEmpty()) {
|
||||
articleManager.updateArticle(old);
|
||||
@@ -269,6 +285,11 @@ public class SArticleController extends SimpleFormController {
|
||||
|
||||
// date verification
|
||||
Conference conf = SessionService.getInstance().getCurrentConference();
|
||||
|
||||
if(conf == null){
|
||||
throw new ModelAndViewDefiningException(new ModelAndView("main"));
|
||||
}
|
||||
|
||||
if(conf.getDateArticle().before(new Date())){
|
||||
throw new ModelAndViewDefiningException(new ModelAndView("main","end","submission"));
|
||||
}
|
||||
@@ -286,22 +307,25 @@ public class SArticleController extends SimpleFormController {
|
||||
try {
|
||||
Integer id = new Integer(articleID);
|
||||
|
||||
// TODO : v<>rifier que l'id de l'article appartient <20> l'auteur... vive les GET...
|
||||
|
||||
Article a = articleManager.getArticle(id);
|
||||
|
||||
if (a == null)
|
||||
throw new ModelAndViewDefiningException(new ModelAndView("denied", "message", getMessageSourceAccessor().getMessage("submission.modify.denied")));
|
||||
|
||||
// Check that the user owns this article
|
||||
String login = SessionService.getInstance().getCurrentUserLogin();
|
||||
if(! a.getMainAuthor().getLogin().equals(login)){
|
||||
throw new ModelAndViewDefiningException(new ModelAndView("denied"));
|
||||
}
|
||||
|
||||
FormSubmission myArticle = new FormSubmission();
|
||||
|
||||
myArticle.setAbstractText(a.getAbstractText());
|
||||
myArticle.setTitle(a.getTitle());
|
||||
//myArticle.setListe(a.getSecondaryAuthors());
|
||||
myArticle.setTheme(a.getTopic());
|
||||
|
||||
request.getSession().setAttribute("listSecondaryAuthors", a.getSecondaryAuthors());
|
||||
|
||||
|
||||
request.setAttribute("listSecondaryAuthors", a.getSecondaryAuthors());
|
||||
|
||||
return myArticle;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user