--- a/src/main/webapp/WEB-INF/jsp/site.jsp Tue May 19 18:49:48 2020 +0200 +++ b/src/main/webapp/WEB-INF/jsp/site.jsp Tue May 19 19:34:57 2020 +0200 @@ -26,6 +26,7 @@ --%> <%@page contentType="text/html" pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> <%@page import="de.uapcore.lightpit.Constants" %> +<%@page import="de.uapcore.lightpit.modules.ProjectsModule" %> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> @@ -39,9 +40,6 @@ <%-- Define an alias for the main menu --%> <c:set scope="page" var="mainMenu" value="${requestScope[Constants.REQ_ATTR_MENU]}"/> -<%-- Define an alias for the sub menu --%> -<c:set scope="page" var="subMenu" value="${requestScope[Constants.REQ_ATTR_SUB_MENU]}"/> - <%-- Define an alias for the fragment name --%> <c:set scope="page" var="fragment" value="${requestScope[Constants.REQ_ATTR_FRAGMENT]}"/> @@ -59,6 +57,9 @@ <fmt:setLocale scope="request" value="${sessionScope[Constants.SESSION_ATTR_LANGUAGE]}"/> </c:if> +<%-- Selected project, if any --%> +<c:set scope="page" var="selectedProject" value="${sessionScope[ProjectsModule.SESSION_ATTR_SELECTED_PROJECT]}"/> + <!DOCTYPE html> <html> <head> @@ -80,16 +81,23 @@ <body> <div id="mainMenu"> <c:forEach var="menu" items="${mainMenu}"> - <%@ include file="../jspf/menu-entry.jspf" %> + <div class="menuEntry" + <c:set var="menuPath" value="/${menu.pathName}"/> + <c:if test="${fn:startsWith(requestPath, menuPath)}"> + data-active + </c:if> + > + <a href="${menu.pathName}"> + <fmt:bundle basename="${menu.resourceKey.bundle}"> + <fmt:message key="${menu.resourceKey.key}"/> + </fmt:bundle> + </a> + </div> </c:forEach> </div> - <c:if test="${not empty subMenu}"> - <div id="subMenu"> - <c:forEach var="menu" items="${subMenu}"> - <%@ include file="../jspf/menu-entry.jspf" %> - </c:forEach> - </div> - </c:if> + <div id="breadcrumbs"> + <%-- TODO: find a strategy to define the breadcrumbs --%> + </div> <div id="content-area"> <c:if test="${not empty fragment}"> <fmt:setBundle scope="request" basename="${moduleInfo.bundleBaseName}"/>