UC Choose Conference 75%, can choose, but no filter for member of website

This commit is contained in:
Nicolas Michard
2008-01-10 16:30:52 +00:00
parent 4067e5e96c
commit 184adc8fb3
8 changed files with 160 additions and 3 deletions

View File

@@ -32,3 +32,6 @@ conference.titleMenu=Add a conference
conference.title=Title conference.title=Title
conference.description=Description conference.description=Description
conference.otherInformations=Complementary information conference.otherInformations=Complementary information
conference.linkMenu.title=Adding Conference
conference.linkMenu.choose=Choosing current conference
conference.linkMenu.change=Change current conference

View File

@@ -1,5 +1,4 @@
<%@ include file="/WEB-INF/jsp/include.jsp"%> <%@ include file="/WEB-INF/jsp/include.jsp"%>
<%@ page session="false"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">

View File

@@ -0,0 +1,62 @@
<%@ include file="/WEB-INF/jsp/include.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title><fmt:message key="title" /></title>
<link rel="stylesheet" href="./stylesheets/base.css" type="text/css" />
</head>
<body>
<jsp:include page="/WEB-INF/jsp/header.jsp" />
<div class="mainBloc">
<div class="header">&nbsp;</div>
<div class="content"><jsp:include page="/WEB-INF/jsp/menu.jsp" />
<div id="main_content">
<h2 align="center">Choose a conference</h2>
Choix de la conference <br /><br />
<c:if test="${idCurrentConference!=null}">
La conf<6E>rence courante est : ${idCurrentConference}.<br /><br />
</c:if>
<c:if test="${idCurrentConference==null}">
Il n'y a pas de conf<6E>rence s<>lectionn<6E>.<br /><br />
</c:if>
<c:choose>
<c:when test="${empty listConference}">
Il n'y a pas de conf<6E>rence pr<70>sente.<br />
</c:when>
<c:otherwise>
<c:forEach items="${listConference}" var="conference">
<div class="conferenceBloc">
ID : ${conference.id}<br />
Title : ${conference.title}<br />
Description : ${conference.description}<br />
Other Informations : ${conference.otherInformations}<br />
<center>
<a href="<c:url value="/chooseConference.htm?idConf=${conference.id}" />">Choisir</a><br />
</center>
</div>
</c:forEach>
</c:otherwise>
</c:choose>
<br />
<a href="<c:url value="main"/>">Home</a></div>
</div>
<div class="footer">&nbsp;</div>
</div>
</body>
</html>

View File

@@ -16,7 +16,16 @@
<div class="miniBloc"> <div class="miniBloc">
<div class="header">Status</div> <div class="header">Status</div>
<div class="content"> <div class="content">
Affichage status de connexion <c:choose>
<c:when test="${idCurrentConference!=null}">
La conf<6E>rence courante est : ${idCurrentConference}.<br />
<a href="<c:url value="listConference.htm"/>"><fmt:message key="conference.linkMenu.change" /></a>
</c:when>
<c:otherwise>
Il n'y a pas de conf<6E>rence courante.<br />
<a href="<c:url value="listConference.htm"/>"><fmt:message key="conference.linkMenu.choose" /></a>
</c:otherwise>
</c:choose>
</div> </div>
<div class="footer">&nbsp;</div> <div class="footer">&nbsp;</div>
</div> </div>

View File

@@ -74,6 +74,15 @@
<property name="conferenceManager" ref="conferenceManager" /> <property name="conferenceManager" ref="conferenceManager" />
</bean> </bean>
<!-- List all conference -->
<bean name="/listConference.htm" class="org.yacos.web.system.controller.ListConferenceController">
<property name="conferenceManager" ref="conferenceManager" />
</bean>
<!-- Get chosen conference in session context -->
<bean name="/chooseConference.htm" class="org.yacos.web.system.controller.ChooseConferenceController">
</bean>
<!-- View Resolver --> <!-- View Resolver -->
<bean id="viewResolver" <bean id="viewResolver"

View File

@@ -149,3 +149,8 @@ ul.article .topic {
ul.article .article_url { ul.article .article_url {
font-size: small; font-size: small;
} }
.conferenceBloc {
background-color: #FFE591;
padding: 5px;
}

View File

@@ -0,0 +1,24 @@
package org.yacos.web.system.controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;
public class ChooseConferenceController implements Controller {
public ModelAndView handleRequest(HttpServletRequest request,
HttpServletResponse response) throws Exception {
// get IDConf
int idConf = Integer.parseInt(request.getParameter("idConf"));
// Set idConf in session context
request.getSession().setAttribute("idCurrentConference", idConf);
return new ModelAndView("main");
}
}

View File

@@ -0,0 +1,46 @@
package org.yacos.web.system.controller;
import java.util.HashMap;
import java.util.Map;
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.Controller;
import org.yacos.core.conferences.IConferenceManager;
public class ListConferenceController implements Controller{
protected final Log logger = LogFactory.getLog(getClass());
private IConferenceManager conferenceManager;
public IConferenceManager getConferenceManager() {
return conferenceManager;
}
public void setConferenceManager(IConferenceManager conferenceManager) {
this.conferenceManager = conferenceManager;
}
/**
* Generate list of conference fo can choose
*/
public ModelAndView handleRequest(HttpServletRequest request,
HttpServletResponse response) throws Exception
{
logger.info("Returning listConference view");
// List all conference
Map<String, Object> model = new HashMap<String, Object>();
model.put("listConference", conferenceManager.getConferences());
return new ModelAndView("listConference", model);
}
}