src/main/webapp/WEB-INF/jsp/project-navmenu.jsp

Mon, 21 Dec 2020 18:29:34 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 21 Dec 2020 18:29:34 +0100
changeset 167
3f30adba1c63
parent 140
ac35e58efa44
child 180
009700915269
permissions
-rw-r--r--

major refactoring of DAO architecture - also fixes #114

universe@109 1 <%--
universe@109 2 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
universe@109 3
universe@109 4 Copyright 2020 Mike Becker. All rights reserved.
universe@109 5
universe@109 6 Redistribution and use in source and binary forms, with or without
universe@109 7 modification, are permitted provided that the following conditions are met:
universe@109 8
universe@109 9 1. Redistributions of source code must retain the above copyright
universe@109 10 notice, this list of conditions and the following disclaimer.
universe@109 11
universe@109 12 2. Redistributions in binary form must reproduce the above copyright
universe@109 13 notice, this list of conditions and the following disclaimer in the
universe@109 14 documentation and/or other materials provided with the distribution.
universe@109 15
universe@109 16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
universe@109 17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
universe@109 18 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
universe@109 19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
universe@109 20 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
universe@109 21 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
universe@109 22 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
universe@109 23 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
universe@109 24 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
universe@109 25 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
universe@109 26 --%>
universe@140 27 <%@page pageEncoding="UTF-8"
universe@140 28 import="de.uapcore.lightpit.viewmodel.ProjectView"
universe@167 29 import="de.uapcore.lightpit.types.VersionStatus"
universe@140 30 %>
universe@109 31 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
universe@109 32 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
universe@109 33
universe@109 34 <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.ProjectView" scope="request"/>
universe@109 35
universe@109 36 <c:forEach var="projectInfo" items="${viewmodel.projectList}">
universe@109 37 <c:set var="isActive" value="${viewmodel.projectInfo.project eq projectInfo.project}" />
universe@109 38 <div class="menuEntry level-0" <c:if test="${isActive}">data-active</c:if> >
universe@134 39 <a href="projects/${projectInfo.project.node}/versions/">
universe@109 40 <c:out value="${projectInfo.project.name}"/>
universe@109 41 </a>
universe@109 42 </div>
universe@109 43 <c:if test="${isActive}">
universe@129 44 <!-- VERSIONS -->
universe@134 45 <c:set var="componentNode" value="${not empty viewmodel.componentFilter ? viewmodel.componentFilter.node : 'all-components'}"/>
universe@134 46 <div class="menuEntry level-1" <c:if test="${viewmodel.selectedPage eq ProjectView.SELECTED_PAGE_VERSIONS}">data-active</c:if> >
universe@134 47 <a href="projects/${projectInfo.project.node}/versions/">
universe@129 48 <fmt:message key="navmenu.versions"/>
universe@109 49 </a>
universe@109 50 </div>
universe@134 51 <div class="menuEntry level-2" <c:if test="${viewmodel.versionFilter eq ProjectView.ALL_VERSIONS}">data-active</c:if>>
universe@129 52 <div class="navmenu-icon" style="background: black"></div>
universe@134 53 <a href="projects/${projectInfo.project.node}/${componentNode}/all-versions/issues/">
universe@134 54 <fmt:message key="navmenu.all" />
universe@134 55 </a>
universe@134 56 </div>
universe@134 57 <div class="menuEntry level-2" <c:if test="${viewmodel.versionFilter eq ProjectView.NO_VERSION}">data-active</c:if>>
universe@134 58 <div class="navmenu-icon" style="background: black"></div>
universe@134 59 <a href="projects/${projectInfo.project.node}/${componentNode}/no-version/issues/">
universe@129 60 <fmt:message key="navmenu.unassigned" />
universe@109 61 </a>
universe@109 62 </div>
universe@109 63 <c:forEach var="version" items="${viewmodel.projectInfo.versions}">
universe@109 64 <c:set var="isVersionActive" value="${viewmodel.versionFilter eq version}" />
universe@140 65 <c:if test="${version.status ne VersionStatus.Deprecated or isVersionActive}">
universe@119 66 <div class="menuEntry level-2" <c:if test="${isVersionActive}">data-active</c:if>
universe@119 67 title="<fmt:message key="version.status.${version.status}" />">
universe@129 68 <div class="navmenu-icon version-${version.status}"></div>
universe@134 69 <a href="projects/${projectInfo.project.node}/${componentNode}/${version.node}/issues/">
universe@109 70 <c:out value="${version.name}"/>
universe@109 71 </a>
universe@109 72 </div>
universe@140 73 </c:if>
universe@109 74 </c:forEach>
universe@134 75 <!-- COMPONENTS -->
universe@134 76 <c:set var="versionNode" value="${not empty viewmodel.versionFilter ? viewmodel.versionFilter.node : 'all-versions'}"/>
universe@134 77 <div class="menuEntry level-1" <c:if test="${viewmodel.selectedPage eq ProjectView.SELECTED_PAGE_COMPONENTS}">data-active</c:if>>
universe@134 78 <a href="projects/${projectInfo.project.node}/components/">
universe@129 79 <fmt:message key="navmenu.components"/>
universe@129 80 </a>
universe@129 81 </div>
universe@134 82 <div class="menuEntry level-2" <c:if test="${viewmodel.componentFilter eq ProjectView.ALL_COMPONENTS}">data-active</c:if>>
universe@129 83 <div class="navmenu-icon" style="background: black"></div>
universe@134 84 <a href="projects/${projectInfo.project.node}/all-components/${versionNode}/issues/">
universe@129 85 <fmt:message key="navmenu.all" />
universe@129 86 </a>
universe@129 87 </div>
universe@134 88 <div class="menuEntry level-2" <c:if test="${viewmodel.componentFilter eq ProjectView.NO_COMPONENT}">data-active</c:if>>
universe@129 89 <div class="navmenu-icon" style="background: black"></div>
universe@134 90 <a href="projects/${projectInfo.project.node}/no-component/${versionNode}/issues/">
universe@129 91 <fmt:message key="navmenu.unassigned" />
universe@129 92 </a>
universe@129 93 </div>
universe@129 94 <c:forEach var="component" items="${viewmodel.projectInfo.components}">
universe@129 95 <c:set var="isComponentActive" value="${viewmodel.componentFilter eq component}" />
universe@134 96 <div class="menuEntry level-2" <c:if test="${isComponentActive}">data-active</c:if> >
universe@129 97 <div class="navmenu-icon" style="background-color: ${component.color}"></div>
universe@134 98 <a href="projects/${projectInfo.project.node}/${component.node}/${versionNode}/issues/">
universe@129 99 <c:out value="${component.name}"/>
universe@129 100 </a>
universe@129 101 </div>
universe@129 102 </c:forEach>
universe@109 103 </c:if>
universe@109 104 </c:forEach>

mercurial