ajout de DetailArticle
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<c:forEach items="${articleList}" var="article" varStatus="i">
|
||||
|
||||
<tr>
|
||||
<td><a href="<c:url value="detailArticle.htm"/>">${article.title}</a></td>
|
||||
<td><a href="<c:url value='detailArticle.htm?id=${article.id}'/>">${article.title}</a></td>
|
||||
<form:hidden path="preferences[${i.index}].article.id" />
|
||||
<form:hidden path="preferences[${i.index}].pcMember.login" />
|
||||
<td><fmt:message key="preference.like"/></td>
|
||||
|
||||
32
YACOSWeb/WebContent/WEB-INF/jsp/detailArticle.jsp
Normal file
32
YACOSWeb/WebContent/WEB-INF/jsp/detailArticle.jsp
Normal file
@@ -0,0 +1,32 @@
|
||||
<%@ include file="/WEB-INF/decorators/include.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title><fmt:message key="detail.title"/></title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="article cb">
|
||||
<h2>${article.title}</h2>
|
||||
<p class="author">Author: <b>${article.mainAuthor.firstName} ${article.mainAuthor.lastName}</b></p>
|
||||
<c:if test="${article.secondaryAuthors!=null}">
|
||||
<p class="secondaryAuthors">
|
||||
Secondary Authors:
|
||||
<ul>
|
||||
<c:forEach items="${article.secondaryAuthors}" var="sAuthor">
|
||||
<li>${sAuthor}</li>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
</c:if>
|
||||
|
||||
<p class="topic">Topic: <b>${article.topic}</b></p>
|
||||
<p class="topic">State of article: <b>${article.state}</b></p>
|
||||
<p class="article_url"><a href="
|
||||
<c:url value="/download.htm">
|
||||
<c:param name="articleId" value="${article.id}"/>
|
||||
</c:url>">Download the article</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -79,6 +79,9 @@
|
||||
<prop key="/forgotPassword.htm">
|
||||
ForgotPasswordController
|
||||
</prop>
|
||||
<prop key="/detailArticle.htm">
|
||||
DetailArticleController
|
||||
</prop>
|
||||
</props>
|
||||
</property>
|
||||
</bean>
|
||||
@@ -246,6 +249,11 @@
|
||||
<property name="evaluationManager" ref="evaluationManager" />
|
||||
</bean>
|
||||
|
||||
<bean id="DetailArticleController"
|
||||
class="org.yacos.web.author.controller.DetailArticleController">
|
||||
<property name="articleManager" ref="articleManager" />
|
||||
</bean>
|
||||
|
||||
<!-- Get chosen conference in session context -->
|
||||
<bean id="ChooseConferenceController"
|
||||
class="org.yacos.web.system.controller.ChooseConferenceController">
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user