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

Thu, 15 Oct 2020 14:01:49 +0200

author
Mike Becker <universe@uap-core.de>
date
Thu, 15 Oct 2020 14:01:49 +0200
changeset 129
a09d5c59351a
parent 119
9970690a1e42
child 131
67df332e3146
permissions
-rw-r--r--

add components to navmenu

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@129 41 <!-- VERSIONS -->
universe@109 42 <div class="menuEntry level-1">
universe@109 43 <a href="projects/versions?pid=${projectInfo.project.id}">
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@109 49 <a href="projects/view?pid=${projectInfo.project.id}&vid=-1">
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@109 58 <a href="projects/view?pid=${projectInfo.project.id}&vid=${version.id}">
universe@109 59 <c:out value="${version.name}"/>
universe@109 60 </a>
universe@109 61 </div>
universe@109 62 </c:forEach>
universe@129 63 <!-- COMPONENTS -->
universe@129 64 <div class="menuEntry level-1">
universe@129 65 <a href="projects/components?pid=${projectInfo.project.id}">
universe@129 66 <fmt:message key="navmenu.components"/>
universe@129 67 </a>
universe@129 68 </div>
universe@129 69 <div class="menuEntry level-2">
universe@129 70 <div class="navmenu-icon" style="background: black"></div>
universe@129 71 <a href="projects/view?pid=${projectInfo.project.id}&cid=0">
universe@129 72 <fmt:message key="navmenu.all" />
universe@129 73 </a>
universe@129 74 </div>
universe@129 75 <div class="menuEntry level-2">
universe@129 76 <div class="navmenu-icon" style="background: black"></div>
universe@129 77 <a href="projects/view?pid=${projectInfo.project.id}&cid=-1">
universe@129 78 <fmt:message key="navmenu.unassigned" />
universe@129 79 </a>
universe@129 80 </div>
universe@129 81 <c:forEach var="component" items="${viewmodel.projectInfo.components}">
universe@129 82 <c:set var="isComponentActive" value="${viewmodel.componentFilter eq component}" />
universe@129 83 <div class="menuEntry level-2" <c:if test="${isVersionActive}">data-active</c:if> >
universe@129 84 <div class="navmenu-icon" style="background-color: ${component.color}"></div>
universe@129 85 <a href="projects/view?pid=${projectInfo.project.id}&cid=${component.id}">
universe@129 86 <c:out value="${component.name}"/>
universe@129 87 </a>
universe@129 88 </div>
universe@129 89 </c:forEach>
universe@109 90 </c:if>
universe@109 91 </c:forEach>

mercurial