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

Sat, 17 Oct 2020 19:56:50 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 17 Oct 2020 19:56:50 +0200
changeset 134
f47e82cd6077
parent 131
67df332e3146
child 140
ac35e58efa44
permissions
-rw-r--r--

completes feature: project components

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@134 27 <%@page pageEncoding="UTF-8" import="de.uapcore.lightpit.viewmodel.ProjectView" %>
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@134 36 <a href="projects/${projectInfo.project.node}/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@134 42 <c:set var="componentNode" value="${not empty viewmodel.componentFilter ? viewmodel.componentFilter.node : 'all-components'}"/>
universe@134 43 <div class="menuEntry level-1" <c:if test="${viewmodel.selectedPage eq ProjectView.SELECTED_PAGE_VERSIONS}">data-active</c:if> >
universe@134 44 <a href="projects/${projectInfo.project.node}/versions/">
universe@129 45 <fmt:message key="navmenu.versions"/>
universe@109 46 </a>
universe@109 47 </div>
universe@134 48 <div class="menuEntry level-2" <c:if test="${viewmodel.versionFilter eq ProjectView.ALL_VERSIONS}">data-active</c:if>>
universe@129 49 <div class="navmenu-icon" style="background: black"></div>
universe@134 50 <a href="projects/${projectInfo.project.node}/${componentNode}/all-versions/issues/">
universe@134 51 <fmt:message key="navmenu.all" />
universe@134 52 </a>
universe@134 53 </div>
universe@134 54 <div class="menuEntry level-2" <c:if test="${viewmodel.versionFilter eq ProjectView.NO_VERSION}">data-active</c:if>>
universe@134 55 <div class="navmenu-icon" style="background: black"></div>
universe@134 56 <a href="projects/${projectInfo.project.node}/${componentNode}/no-version/issues/">
universe@129 57 <fmt:message key="navmenu.unassigned" />
universe@109 58 </a>
universe@109 59 </div>
universe@109 60 <c:forEach var="version" items="${viewmodel.projectInfo.versions}">
universe@109 61 <c:set var="isVersionActive" value="${viewmodel.versionFilter eq version}" />
universe@119 62 <div class="menuEntry level-2" <c:if test="${isVersionActive}">data-active</c:if>
universe@119 63 title="<fmt:message key="version.status.${version.status}" />">
universe@129 64 <div class="navmenu-icon version-${version.status}"></div>
universe@134 65 <a href="projects/${projectInfo.project.node}/${componentNode}/${version.node}/issues/">
universe@109 66 <c:out value="${version.name}"/>
universe@109 67 </a>
universe@109 68 </div>
universe@109 69 </c:forEach>
universe@134 70 <!-- COMPONENTS -->
universe@134 71 <c:set var="versionNode" value="${not empty viewmodel.versionFilter ? viewmodel.versionFilter.node : 'all-versions'}"/>
universe@134 72 <div class="menuEntry level-1" <c:if test="${viewmodel.selectedPage eq ProjectView.SELECTED_PAGE_COMPONENTS}">data-active</c:if>>
universe@134 73 <a href="projects/${projectInfo.project.node}/components/">
universe@129 74 <fmt:message key="navmenu.components"/>
universe@129 75 </a>
universe@129 76 </div>
universe@134 77 <div class="menuEntry level-2" <c:if test="${viewmodel.componentFilter eq ProjectView.ALL_COMPONENTS}">data-active</c:if>>
universe@129 78 <div class="navmenu-icon" style="background: black"></div>
universe@134 79 <a href="projects/${projectInfo.project.node}/all-components/${versionNode}/issues/">
universe@129 80 <fmt:message key="navmenu.all" />
universe@129 81 </a>
universe@129 82 </div>
universe@134 83 <div class="menuEntry level-2" <c:if test="${viewmodel.componentFilter eq ProjectView.NO_COMPONENT}">data-active</c:if>>
universe@129 84 <div class="navmenu-icon" style="background: black"></div>
universe@134 85 <a href="projects/${projectInfo.project.node}/no-component/${versionNode}/issues/">
universe@129 86 <fmt:message key="navmenu.unassigned" />
universe@129 87 </a>
universe@129 88 </div>
universe@129 89 <c:forEach var="component" items="${viewmodel.projectInfo.components}">
universe@129 90 <c:set var="isComponentActive" value="${viewmodel.componentFilter eq component}" />
universe@134 91 <div class="menuEntry level-2" <c:if test="${isComponentActive}">data-active</c:if> >
universe@129 92 <div class="navmenu-icon" style="background-color: ${component.color}"></div>
universe@134 93 <a href="projects/${projectInfo.project.node}/${component.node}/${versionNode}/issues/">
universe@129 94 <c:out value="${component.name}"/>
universe@129 95 </a>
universe@129 96 </div>
universe@129 97 </c:forEach>
universe@109 98 </c:if>
universe@109 99 </c:forEach>

mercurial