1.1 --- a/src/main/webapp/WEB-INF/jsp/site.jsp Tue May 19 18:49:48 2020 +0200 1.2 +++ b/src/main/webapp/WEB-INF/jsp/site.jsp Tue May 19 19:34:57 2020 +0200 1.3 @@ -26,6 +26,7 @@ 1.4 --%> 1.5 <%@page contentType="text/html" pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> 1.6 <%@page import="de.uapcore.lightpit.Constants" %> 1.7 +<%@page import="de.uapcore.lightpit.modules.ProjectsModule" %> 1.8 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 1.9 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 1.10 <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 1.11 @@ -39,9 +40,6 @@ 1.12 <%-- Define an alias for the main menu --%> 1.13 <c:set scope="page" var="mainMenu" value="${requestScope[Constants.REQ_ATTR_MENU]}"/> 1.14 1.15 -<%-- Define an alias for the sub menu --%> 1.16 -<c:set scope="page" var="subMenu" value="${requestScope[Constants.REQ_ATTR_SUB_MENU]}"/> 1.17 - 1.18 <%-- Define an alias for the fragment name --%> 1.19 <c:set scope="page" var="fragment" value="${requestScope[Constants.REQ_ATTR_FRAGMENT]}"/> 1.20 1.21 @@ -59,6 +57,9 @@ 1.22 <fmt:setLocale scope="request" value="${sessionScope[Constants.SESSION_ATTR_LANGUAGE]}"/> 1.23 </c:if> 1.24 1.25 +<%-- Selected project, if any --%> 1.26 +<c:set scope="page" var="selectedProject" value="${sessionScope[ProjectsModule.SESSION_ATTR_SELECTED_PROJECT]}"/> 1.27 + 1.28 <!DOCTYPE html> 1.29 <html> 1.30 <head> 1.31 @@ -80,16 +81,23 @@ 1.32 <body> 1.33 <div id="mainMenu"> 1.34 <c:forEach var="menu" items="${mainMenu}"> 1.35 - <%@ include file="../jspf/menu-entry.jspf" %> 1.36 + <div class="menuEntry" 1.37 + <c:set var="menuPath" value="/${menu.pathName}"/> 1.38 + <c:if test="${fn:startsWith(requestPath, menuPath)}"> 1.39 + data-active 1.40 + </c:if> 1.41 + > 1.42 + <a href="${menu.pathName}"> 1.43 + <fmt:bundle basename="${menu.resourceKey.bundle}"> 1.44 + <fmt:message key="${menu.resourceKey.key}"/> 1.45 + </fmt:bundle> 1.46 + </a> 1.47 + </div> 1.48 </c:forEach> 1.49 </div> 1.50 - <c:if test="${not empty subMenu}"> 1.51 - <div id="subMenu"> 1.52 - <c:forEach var="menu" items="${subMenu}"> 1.53 - <%@ include file="../jspf/menu-entry.jspf" %> 1.54 - </c:forEach> 1.55 - </div> 1.56 - </c:if> 1.57 + <div id="breadcrumbs"> 1.58 + <%-- TODO: find a strategy to define the breadcrumbs --%> 1.59 + </div> 1.60 <div id="content-area"> 1.61 <c:if test="${not empty fragment}"> 1.62 <fmt:setBundle scope="request" basename="${moduleInfo.bundleBaseName}"/>