Thu, 08 Oct 2020 20:16:47 +0200
adds versions overview
includes major refactoring of side menu generation
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@109 | 27 | <%@page pageEncoding="UTF-8" %> |
universe@109 | 28 | <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
universe@109 | 29 | <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> |
universe@109 | 30 | |
universe@109 | 31 | <jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.ProjectView" scope="request"/> |
universe@109 | 32 | |
universe@109 | 33 | <c:forEach var="projectInfo" items="${viewmodel.projectList}"> |
universe@109 | 34 | <c:set var="isActive" value="${viewmodel.projectInfo.project eq projectInfo.project}" /> |
universe@109 | 35 | <div class="menuEntry level-0" <c:if test="${isActive}">data-active</c:if> > |
universe@109 | 36 | <a href="projects/versions?pid=${projectInfo.project.id}"> |
universe@109 | 37 | <c:out value="${projectInfo.project.name}"/> |
universe@109 | 38 | </a> |
universe@109 | 39 | </div> |
universe@109 | 40 | <c:if test="${isActive}"> |
universe@109 | 41 | <div class="menuEntry level-1"> |
universe@109 | 42 | <a href="projects/versions?pid=${projectInfo.project.id}"> |
universe@109 | 43 | <fmt:message key="menu.versions"/> |
universe@109 | 44 | </a> |
universe@109 | 45 | </div> |
universe@109 | 46 | <div class="menuEntry level-2"> |
universe@109 | 47 | <a href="projects/view?pid=${projectInfo.project.id}&vid=-1"> |
universe@109 | 48 | <fmt:message key="menu.versions.unassigned" /> |
universe@109 | 49 | </a> |
universe@109 | 50 | </div> |
universe@109 | 51 | <c:forEach var="version" items="${viewmodel.projectInfo.versions}"> |
universe@109 | 52 | <c:set var="isVersionActive" value="${viewmodel.versionFilter eq version}" /> |
universe@109 | 53 | <div class="menuEntry level-2" <c:if test="${isVersionActive}">data-active</c:if> > |
universe@109 | 54 | <a href="projects/view?pid=${projectInfo.project.id}&vid=${version.id}"> |
universe@109 | 55 | <c:out value="${version.name}"/> |
universe@109 | 56 | </a> |
universe@109 | 57 | </div> |
universe@109 | 58 | </c:forEach> |
universe@109 | 59 | </c:if> |
universe@109 | 60 | </c:forEach> |