Thu, 15 Oct 2020 20:04:56 +0200
removes trailing slash in version links in projects.jsp
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@131 | 36 | <a href="projects/${projectInfo.project.id}/versions/"> |
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@129 | 41 | <!-- VERSIONS --> |
universe@109 | 42 | <div class="menuEntry level-1"> |
universe@131 | 43 | <a href="projects/${projectInfo.project.id}/versions/"> |
universe@129 | 44 | <fmt:message key="navmenu.versions"/> |
universe@109 | 45 | </a> |
universe@109 | 46 | </div> |
universe@109 | 47 | <div class="menuEntry level-2"> |
universe@129 | 48 | <div class="navmenu-icon" style="background: black"></div> |
universe@131 | 49 | <a href="projects/${projectInfo.project.id}/versions/unassigned"> |
universe@129 | 50 | <fmt:message key="navmenu.unassigned" /> |
universe@109 | 51 | </a> |
universe@109 | 52 | </div> |
universe@109 | 53 | <c:forEach var="version" items="${viewmodel.projectInfo.versions}"> |
universe@109 | 54 | <c:set var="isVersionActive" value="${viewmodel.versionFilter eq version}" /> |
universe@119 | 55 | <div class="menuEntry level-2" <c:if test="${isVersionActive}">data-active</c:if> |
universe@119 | 56 | title="<fmt:message key="version.status.${version.status}" />"> |
universe@129 | 57 | <div class="navmenu-icon version-${version.status}"></div> |
universe@131 | 58 | <a href="projects/${projectInfo.project.id}/versions/${version.id}"> |
universe@109 | 59 | <c:out value="${version.name}"/> |
universe@109 | 60 | </a> |
universe@109 | 61 | </div> |
universe@109 | 62 | </c:forEach> |
universe@131 | 63 | <%-- COMPONENTS |
universe@131 | 64 | TODO: find a way to combine version and component into one URL |
universe@129 | 65 | <div class="menuEntry level-1"> |
universe@131 | 66 | <a href="projects/${projectInfo.project.id}/components/"> |
universe@129 | 67 | <fmt:message key="navmenu.components"/> |
universe@129 | 68 | </a> |
universe@129 | 69 | </div> |
universe@129 | 70 | <div class="menuEntry level-2"> |
universe@129 | 71 | <div class="navmenu-icon" style="background: black"></div> |
universe@131 | 72 | <a href="projects/${projectInfo.project.id}/components/"> |
universe@129 | 73 | <fmt:message key="navmenu.all" /> |
universe@129 | 74 | </a> |
universe@129 | 75 | </div> |
universe@129 | 76 | <div class="menuEntry level-2"> |
universe@129 | 77 | <div class="navmenu-icon" style="background: black"></div> |
universe@131 | 78 | <a href="projects/${projectInfo.project.id}/components/unassigned"> |
universe@129 | 79 | <fmt:message key="navmenu.unassigned" /> |
universe@129 | 80 | </a> |
universe@129 | 81 | </div> |
universe@129 | 82 | <c:forEach var="component" items="${viewmodel.projectInfo.components}"> |
universe@129 | 83 | <c:set var="isComponentActive" value="${viewmodel.componentFilter eq component}" /> |
universe@129 | 84 | <div class="menuEntry level-2" <c:if test="${isVersionActive}">data-active</c:if> > |
universe@129 | 85 | <div class="navmenu-icon" style="background-color: ${component.color}"></div> |
universe@129 | 86 | <a href="projects/view?pid=${projectInfo.project.id}&cid=${component.id}"> |
universe@129 | 87 | <c:out value="${component.name}"/> |
universe@129 | 88 | </a> |
universe@129 | 89 | </div> |
universe@129 | 90 | </c:forEach> |
universe@131 | 91 | --%> |
universe@109 | 92 | </c:if> |
universe@109 | 93 | </c:forEach> |