Sitemesh : layout des vues integré
pour faire une nouvelle page : creer jsp ds jsp / mettre balise include/html/head/body et le contenu dans body. Sitemesh decorera la page automatiquement suivant le layout main.jsp dans decorators pour tte les url (du moins pour l'instant)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
|
||||
<%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="page" %>
|
||||
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
|
||||
|
||||
<decorator:body />
|
||||
|
||||
@@ -1 +1,11 @@
|
||||
<h1>C'est le footer</h1>
|
||||
<html>
|
||||
<head></head>
|
||||
<body>
|
||||
|
||||
<!-- Footer with credits -->
|
||||
<div id="globalfooter">
|
||||
Copyright Yacos Team 2008
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
30
YACOSWeb/WebContent/WEB-INF/decorators/headermainchoice.jsp
Normal file
30
YACOSWeb/WebContent/WEB-INF/decorators/headermainchoice.jsp
Normal file
@@ -0,0 +1,30 @@
|
||||
<%@ include file="/WEB-INF/decorators/include.jsp"%>
|
||||
|
||||
<html>
|
||||
<head></head>
|
||||
<body>
|
||||
|
||||
<!-- containerheader -->
|
||||
<div id="containerheader">
|
||||
<div id="leftdescription">
|
||||
<p>Application pour g<>rer les conf<6E>rences. Outil libre dans le programme universitaire</p>
|
||||
</div>
|
||||
|
||||
<div id="rightchoice">
|
||||
|
||||
<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><!--containerheader-->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
15
YACOSWeb/WebContent/WEB-INF/decorators/headermenu.jsp
Normal file
15
YACOSWeb/WebContent/WEB-INF/decorators/headermenu.jsp
Normal file
@@ -0,0 +1,15 @@
|
||||
<html>
|
||||
<head></head>
|
||||
<body>
|
||||
|
||||
<!-- Globar bar navigation -->
|
||||
<div id="globalheader">
|
||||
<ul id="globalnav">
|
||||
<li><a href="#">HOME</a></li>
|
||||
<li><a href="#">INFOS</a></li>
|
||||
<li><a href="#">POST</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
3
YACOSWeb/WebContent/WEB-INF/decorators/include.jsp
Normal file
3
YACOSWeb/WebContent/WEB-INF/decorators/include.jsp
Normal file
@@ -0,0 +1,3 @@
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
|
||||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
|
||||
@@ -1,20 +1,44 @@
|
||||
<!-- Include -->
|
||||
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
|
||||
<%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="page" %>
|
||||
<%@ taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %>
|
||||
<%@ taglib prefix="page" uri="http://www.opensymphony.com/sitemesh/page" %>
|
||||
<%@ include file="/WEB-INF/decorators/include.jsp"%>
|
||||
|
||||
<!-- Doctype -->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title><decorator:title default="YACOS" /></title>
|
||||
<title><fmt:message key="title" /></title>
|
||||
<link rel="stylesheet" href="./stylesheets/base.css" type="text/css" />
|
||||
<decorator:head />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
BODY de la page d<>cor<6F>e :
|
||||
<decorator:body />
|
||||
/BODY de la page d<>cor<6F>e
|
||||
|
||||
<!-- headermenu -->
|
||||
<div><page:applyDecorator name="empty" page="/WEB-INF/decorators/headermenu.jsp" /></div>
|
||||
|
||||
<!-- Main bloc -->
|
||||
<div id="container">
|
||||
|
||||
<!-- main header with choice conference -->
|
||||
<page:applyDecorator name="empty" page="/WEB-INF/decorators/headermainchoice.jsp" />
|
||||
|
||||
<div id="main">
|
||||
|
||||
<!-- dynamic menu with session -->
|
||||
<page:applyDecorator name="empty" page="/WEB-INF/decorators/usermenu.jsp" />
|
||||
|
||||
<div id="maincontent">
|
||||
|
||||
<!-- Contents of decorated page -->
|
||||
<decorator:body />
|
||||
|
||||
</div><!--maincontent-->
|
||||
</div><!--main-->
|
||||
</div><!--container-->
|
||||
|
||||
<!-- footer -->
|
||||
<div><page:applyDecorator name="empty" page="/WEB-INF/decorators/footer.jsp" /></div>
|
||||
|
||||
</body>
|
||||
|
||||
30
YACOSWeb/WebContent/WEB-INF/decorators/usermenu.jsp
Normal file
30
YACOSWeb/WebContent/WEB-INF/decorators/usermenu.jsp
Normal file
@@ -0,0 +1,30 @@
|
||||
<%@ include file="/WEB-INF/decorators/include.jsp"%>
|
||||
|
||||
<html>
|
||||
<head></head>
|
||||
<body>
|
||||
|
||||
<div id="mainmenu">
|
||||
<div id="mainmenubloc">
|
||||
<h4>Bloc 1</h4>
|
||||
<ul>
|
||||
<li><a href="<c:url value="listArticle.htm"/>"><fmt:message key="listarticle.title" /></a></li>
|
||||
<li><a href="<c:url value="submissionArticle.htm"/>"><fmt:message key="submission.title" /></a></li>
|
||||
<li><a href="<c:url value="choosePreference.htm"/>"><fmt:message key="preference.title" /></a></li>
|
||||
<li><a href="<c:url value="dispatchArticle.htm"/>"><fmt:message key="dispatch.title" /></a></li>
|
||||
<li><a href="<c:url value="addConference.htm"/>"><fmt:message key="conference.titleMenu" /></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="mainmenubloc">
|
||||
<h4>Bloc 2</h4>
|
||||
<ul>
|
||||
<li><a href="#">Lien 1</a></li>
|
||||
<li><a href="#">Lien 2</a></li>
|
||||
<li><a href="#">Lien 3</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div><!--mainmenu-->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user