src/main/webapp/WEB-INF/jsp/site.jsp

Sat, 30 May 2020 18:05:06 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 30 May 2020 18:05:06 +0200
changeset 83
24a3596b8f98
parent 78
bb4c52bf3439
child 86
0a658e53177c
permissions
-rw-r--r--

adds version selection in issue editor

<%-- 
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

Copyright 2018 Mike Becker. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
--%>
<%@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" %>

<%-- Make the base href easily available at request scope --%>
<c:set scope="page" var="baseHref" value="${requestScope[Constants.REQ_ATTR_BASE_HREF]}"/>

<%-- Define an alias for the request path --%>
<c:set scope="page" var="requestPath" value="${requestScope[Constants.REQ_ATTR_PATH]}"/>

<%-- Define an alias for the main menu --%>
<c:set scope="page" var="mainMenu" value="${requestScope[Constants.REQ_ATTR_MENU]}"/>

<%-- Define an alias for the main menu --%>
<c:set scope="page" var="breadcrumbs" value="${requestScope[Constants.REQ_ATTR_BREADCRUMBS]}"/>

<%-- Define an alias for the content page name --%>
<c:set scope="page" var="contentPage" value="${requestScope[Constants.REQ_ATTR_CONTENT_PAGE]}"/>

<%-- Define an alias for the optional redirect location --%>
<c:set scope="page" var="redirectLocation" value="${requestScope[Constants.REQ_ATTR_REDIRECT_LOCATION]}"/>

<%-- Define an alias for the additional stylesheet --%>
<c:set scope="page" var="extraCss" value="${requestScope[Constants.REQ_ATTR_STYLESHEET]}"/>

<%-- Define an alias for the bundle name --%>
<c:set scope="page" var="bundleName" value="${requestScope[Constants.REQ_ATTR_RESOURCE_BUNDLE]}"/>

<%-- Apply the session locale (should always be present, but check nevertheless) --%>
<c:if test="${not empty sessionScope[Constants.SESSION_ATTR_LANGUAGE]}">
    <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]}"/>

<%-- Load resource bundles --%>
<fmt:setBundle scope="request" basename="${bundleName}"/>
<fmt:setBundle scope="request" var="lightpit_bundle" basename="localization.lightpit"/>

<!DOCTYPE html>
<html>
<head>
    <base href="${baseHref}">
    <title>LightPIT - <fmt:message key="pageTitle"/></title>
    <meta charset="UTF-8">
    <c:if test="${not empty redirectLocation}">
        <meta http-equiv="refresh" content="0; URL=${redirectLocation}">
    </c:if>
    <link rel="stylesheet" href="lightpit.css" type="text/css">
    <c:if test="${not empty extraCss}">
        <link rel="stylesheet" href="${extraCss}" type="text/css">
    </c:if>
</head>
<body>
<div id="mainMenu">
    <c:forEach var="menu" items="${mainMenu}">
        <%@include file="../jspf/menu-entry.jsp" %>
    </c:forEach>
</div>
<c:if test="${not empty breadcrumbs}">
    <div id="breadcrumbs">
        <c:forEach var="menu" items="${breadcrumbs}">
            <%@include file="../jspf/menu-entry.jsp" %>
        </c:forEach>
    </div>
</c:if>
<div id="content-area">
    <c:if test="${not empty contentPage}">
        <c:import url="${contentPage}"/>
    </c:if>
</div>
</body>
</html>

mercurial