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

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

mercurial