diff --git a/YACOSWeb/WebContent/WEB-INF/classes/messages.properties b/YACOSWeb/WebContent/WEB-INF/classes/messages.properties index 3467d8f..82ccfb1 100644 --- a/YACOSWeb/WebContent/WEB-INF/classes/messages.properties +++ b/YACOSWeb/WebContent/WEB-INF/classes/messages.properties @@ -96,7 +96,6 @@ form.forgotPassword.email=E-Mail address for your account : 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. forgotPassword.title=Reset your password -forgotPassword.submitted=A new password has been successfully generated for your account.\nIt has been sent to your email address. ################### # MESSAGE ERROR @@ -175,8 +174,6 @@ evaluation.choose=Choose an title to evaluation from the list invitation.send=Send an invitation -conference.error.noTokenLeft=You have no conference creation token left !\nPlease contact the administrator - #Validation messages for errors submissionArticle.title=The title should not be null submissionArticle.theme=The theme should not be null @@ -195,4 +192,6 @@ validate.reject=reject report.headPage=Here is the list of the evaluation report.referee=Evaluated by +#detail d'un article +detail.title=Article's detail diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/choosePreference.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/choosePreference.jsp index 496319a..4e663cd 100644 --- a/YACOSWeb/WebContent/WEB-INF/jsp/choosePreference.jsp +++ b/YACOSWeb/WebContent/WEB-INF/jsp/choosePreference.jsp @@ -16,7 +16,7 @@ - ">${article.title} + ${article.title} diff --git a/YACOSWeb/WebContent/WEB-INF/jsp/detailArticle.jsp b/YACOSWeb/WebContent/WEB-INF/jsp/detailArticle.jsp new file mode 100644 index 0000000..28165eb --- /dev/null +++ b/YACOSWeb/WebContent/WEB-INF/jsp/detailArticle.jsp @@ -0,0 +1,32 @@ +<%@ include file="/WEB-INF/decorators/include.jsp"%> + + + +<fmt:message key="detail.title"/> + + + +
+

${article.title}

+

Author: ${article.mainAuthor.firstName} ${article.mainAuthor.lastName}

+ +

+ Secondary Authors: +

    + +
  • ${sAuthor}
  • +
    +
+
+ +

Topic: ${article.topic}

+

State of article: ${article.state}

+

+ + ">Download the article +

+ +
+ + \ No newline at end of file diff --git a/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml b/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml index c3c66e1..fb21436 100644 --- a/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml +++ b/YACOSWeb/WebContent/WEB-INF/yacos-servlet.xml @@ -79,6 +79,9 @@ ForgotPasswordController + + DetailArticleController + @@ -246,6 +249,11 @@ + + + + diff --git a/YACOSWeb/src/org/yacos/web/author/controller/DetailArticleController.java b/YACOSWeb/src/org/yacos/web/author/controller/DetailArticleController.java new file mode 100644 index 0000000..729f939 --- /dev/null +++ b/YACOSWeb/src/org/yacos/web/author/controller/DetailArticleController.java @@ -0,0 +1,42 @@ +package org.yacos.web.author.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; +import org.yacos.core.article.Article; +import org.yacos.core.article.IArticleManager; + +public class DetailArticleController extends SimpleFormController { + + protected final Log logger = LogFactory.getLog(getClass()); + private IArticleManager articleManager; + + public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + + logger.info("Returning main view"); + String id=request.getParameter("id"); + System.out.println("article's id is "+id); + Integer idd=new Integer(Integer.parseInt(id)); + Article article=articleManager.getArticle(idd); + //FIXME + return new ModelAndView("detailArticle","article",article); + } + + public IArticleManager getArticleManager() { + return articleManager; + } + + public void setArticleManager(IArticleManager articleManager) { + this.articleManager = articleManager; + } + + +} \ No newline at end of file