Sat, 23 May 2020 13:34:41 +0200
bloat removal 1/3 - configurable resource keys
universe@13 | 1 | <%-- |
universe@13 | 2 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
universe@13 | 3 | |
universe@24 | 4 | Copyright 2018 Mike Becker. All rights reserved. |
universe@13 | 5 | |
universe@13 | 6 | Redistribution and use in source and binary forms, with or without |
universe@13 | 7 | modification, are permitted provided that the following conditions are met: |
universe@13 | 8 | |
universe@13 | 9 | 1. Redistributions of source code must retain the above copyright |
universe@13 | 10 | notice, this list of conditions and the following disclaimer. |
universe@13 | 11 | |
universe@13 | 12 | 2. Redistributions in binary form must reproduce the above copyright |
universe@13 | 13 | notice, this list of conditions and the following disclaimer in the |
universe@13 | 14 | documentation and/or other materials provided with the distribution. |
universe@13 | 15 | |
universe@13 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
universe@13 | 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
universe@13 | 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
universe@13 | 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
universe@13 | 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
universe@13 | 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
universe@13 | 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
universe@13 | 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
universe@13 | 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
universe@13 | 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
universe@13 | 26 | --%> |
universe@39 | 27 | <%@page contentType="text/html" pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> |
universe@13 | 28 | <%@page import="de.uapcore.lightpit.Constants" %> |
universe@70 | 29 | <%@page import="de.uapcore.lightpit.modules.ProjectsModule" %> |
universe@13 | 30 | <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
universe@13 | 31 | <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> |
universe@13 | 32 | <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> |
universe@13 | 33 | |
universe@46 | 34 | <%-- Make the base href easily available at request scope --%> |
universe@71 | 35 | <c:set scope="page" var="baseHref" value="${requestScope[Constants.REQ_ATTR_BASE_HREF]}"/> |
universe@46 | 36 | |
universe@45 | 37 | <%-- Define an alias for the request path --%> |
universe@45 | 38 | <c:set scope="page" var="requestPath" value="${requestScope[Constants.REQ_ATTR_PATH]}"/> |
universe@45 | 39 | |
universe@13 | 40 | <%-- Define an alias for the main menu --%> |
universe@13 | 41 | <c:set scope="page" var="mainMenu" value="${requestScope[Constants.REQ_ATTR_MENU]}"/> |
universe@13 | 42 | |
universe@71 | 43 | <%-- Define an alias for the main menu --%> |
universe@71 | 44 | <c:set scope="page" var="breadcrumbs" value="${requestScope[Constants.REQ_ATTR_BREADCRUMBS]}"/> |
universe@71 | 45 | |
universe@74 | 46 | <%-- Define an alias for the content page name --%> |
universe@74 | 47 | <c:set scope="page" var="contentPage" value="${requestScope[Constants.REQ_ATTR_CONTENT_PAGE]}"/> |
universe@13 | 48 | |
universe@47 | 49 | <%-- Define an alias for the optional redirect location --%> |
universe@47 | 50 | <c:set scope="page" var="redirectLocation" value="${requestScope[Constants.REQ_ATTR_REDIRECT_LOCATION]}"/> |
universe@47 | 51 | |
universe@13 | 52 | <%-- Define an alias for the additional stylesheet --%> |
universe@13 | 53 | <c:set scope="page" var="extraCss" value="${requestScope[Constants.REQ_ATTR_STYLESHEET]}"/> |
universe@13 | 54 | |
universe@13 | 55 | <%-- Define an alias for the module info --%> |
universe@13 | 56 | <c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/> |
universe@13 | 57 | |
universe@15 | 58 | <%-- Apply the session locale (should always be present, but check nevertheless) --%> |
universe@15 | 59 | <c:if test="${not empty sessionScope[Constants.SESSION_ATTR_LANGUAGE]}"> |
universe@71 | 60 | <fmt:setLocale scope="request" value="${sessionScope[Constants.SESSION_ATTR_LANGUAGE]}"/> |
universe@15 | 61 | </c:if> |
universe@15 | 62 | |
universe@70 | 63 | <%-- Selected project, if any --%> |
universe@70 | 64 | <c:set scope="page" var="selectedProject" value="${sessionScope[ProjectsModule.SESSION_ATTR_SELECTED_PROJECT]}"/> |
universe@70 | 65 | |
universe@13 | 66 | <!DOCTYPE html> |
universe@13 | 67 | <html> |
universe@71 | 68 | <head> |
universe@71 | 69 | <base href="${baseHref}"> |
universe@71 | 70 | <title>LightPIT - |
universe@71 | 71 | <fmt:bundle basename="${moduleInfo.bundleBaseName}"> |
universe@77 | 72 | <fmt:message key="pageTitle"/> |
universe@71 | 73 | </fmt:bundle> |
universe@71 | 74 | </title> |
universe@71 | 75 | <meta charset="UTF-8"> |
universe@71 | 76 | <c:if test="${not empty redirectLocation}"> |
universe@47 | 77 | <meta http-equiv="refresh" content="0; URL=${redirectLocation}"> |
universe@71 | 78 | </c:if> |
universe@71 | 79 | <link rel="stylesheet" href="lightpit.css" type="text/css"> |
universe@71 | 80 | <c:if test="${not empty extraCss}"> |
universe@13 | 81 | <link rel="stylesheet" href="${extraCss}" type="text/css"> |
universe@71 | 82 | </c:if> |
universe@71 | 83 | </head> |
universe@71 | 84 | <body> |
universe@71 | 85 | <div id="mainMenu"> |
universe@71 | 86 | <c:forEach var="menu" items="${mainMenu}"> |
universe@71 | 87 | <%@include file="../jspf/menu-entry.jsp" %> |
universe@71 | 88 | </c:forEach> |
universe@71 | 89 | </div> |
universe@71 | 90 | <c:if test="${not empty breadcrumbs}"> |
universe@71 | 91 | <div id="breadcrumbs"> |
universe@71 | 92 | <c:forEach var="menu" items="${breadcrumbs}"> |
universe@71 | 93 | <%@include file="../jspf/menu-entry.jsp" %> |
universe@71 | 94 | </c:forEach> |
universe@71 | 95 | </div> |
universe@71 | 96 | </c:if> |
universe@71 | 97 | <div id="content-area"> |
universe@74 | 98 | <c:if test="${not empty contentPage}"> |
universe@71 | 99 | <fmt:setBundle scope="request" basename="${moduleInfo.bundleBaseName}"/> |
universe@71 | 100 | <fmt:setBundle scope="request" var="lightpit_bundle" basename="localization.lightpit"/> |
universe@74 | 101 | <c:import url="${contentPage}"/> |
universe@71 | 102 | </c:if> |
universe@71 | 103 | </div> |
universe@71 | 104 | </body> |
universe@13 | 105 | </html> |