Thu, 08 Oct 2020 20:16:47 +0200
adds versions overview
includes major refactoring of side menu generation
1.1 --- a/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java Thu Oct 08 18:28:16 2020 +0200 1.2 +++ b/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java Thu Oct 08 20:16:47 2020 +0200 1.3 @@ -230,12 +230,12 @@ 1.4 /** 1.5 * Sets the navigation menu. 1.6 * 1.7 - * @param req the servlet request object 1.8 - * @param navigationItems the menu entries for the navigation menu 1.9 + * @param req the servlet request object 1.10 + * @param jspName the name of the menu's jsp file 1.11 * @see Constants#REQ_ATTR_NAVIGATION 1.12 */ 1.13 - protected void setNavigationMenu(HttpServletRequest req, List<MenuEntry> navigationItems) { 1.14 - req.setAttribute(Constants.REQ_ATTR_NAVIGATION, navigationItems); 1.15 + protected void setNavigationMenu(HttpServletRequest req, String jspName) { 1.16 + req.setAttribute(Constants.REQ_ATTR_NAVIGATION, Functions.jspPath(jspName)); 1.17 } 1.18 1.19 /**
2.1 --- a/src/main/java/de/uapcore/lightpit/Constants.java Thu Oct 08 18:28:16 2020 +0200 2.2 +++ b/src/main/java/de/uapcore/lightpit/Constants.java Thu Oct 08 20:16:47 2020 +0200 2.3 @@ -72,7 +72,7 @@ 2.4 public static final String REQ_ATTR_MENU = fqn(AbstractLightPITServlet.class, "mainMenu"); 2.5 2.6 /** 2.7 - * Key for the request attribute containing the navigation menu. 2.8 + * Key for the request attribute containing the optional navigation menu jsp. 2.9 */ 2.10 public static final String REQ_ATTR_NAVIGATION = fqn(AbstractLightPITServlet.class, "navMenu"); 2.11
3.1 --- a/src/main/java/de/uapcore/lightpit/MenuEntry.java Thu Oct 08 18:28:16 2020 +0200 3.2 +++ b/src/main/java/de/uapcore/lightpit/MenuEntry.java Thu Oct 08 20:16:47 2020 +0200 3.3 @@ -50,33 +50,12 @@ 3.4 */ 3.5 private boolean active = false; 3.6 3.7 - /** 3.8 - * The menu level. 3.9 - */ 3.10 - private int level; 3.11 - 3.12 public MenuEntry(ResourceKey resourceKey, String pathName) { 3.13 - this(0, resourceKey, pathName); 3.14 - } 3.15 - 3.16 - public MenuEntry(String text, String pathName) { 3.17 - this(0, text, pathName); 3.18 - } 3.19 - 3.20 - public MenuEntry(int level, ResourceKey resourceKey, String pathName) { 3.21 - this.level = level; 3.22 this.text = null; 3.23 this.resourceKey = resourceKey; 3.24 this.pathName = pathName; 3.25 } 3.26 3.27 - public MenuEntry(int level, String text, String pathName) { 3.28 - this.level = level; 3.29 - this.text = text; 3.30 - this.resourceKey = null; 3.31 - this.pathName = pathName; 3.32 - } 3.33 - 3.34 public ResourceKey getResourceKey() { 3.35 return resourceKey; 3.36 } 3.37 @@ -94,14 +73,6 @@ 3.38 } 3.39 3.40 public void setActive(boolean active) { 3.41 - this.active = true; 3.42 - } 3.43 - 3.44 - public int getLevel() { 3.45 - return level; 3.46 - } 3.47 - 3.48 - public void setLevel(int level) { 3.49 - this.level = level; 3.50 + this.active = active; 3.51 } 3.52 }
4.1 --- a/src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java Thu Oct 08 18:28:16 2020 +0200 4.2 +++ b/src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java Thu Oct 08 20:16:47 2020 +0200 4.3 @@ -42,7 +42,6 @@ 4.4 import java.io.IOException; 4.5 import java.sql.Date; 4.6 import java.sql.SQLException; 4.7 -import java.util.ArrayList; 4.8 import java.util.NoSuchElementException; 4.9 import java.util.Optional; 4.10 import java.util.stream.Collectors; 4.11 @@ -68,73 +67,6 @@ 4.12 return "localization.projects"; 4.13 } 4.14 4.15 - private String queryParams(Project p, Version v) { 4.16 - return String.format("pid=%d&vid=%d", 4.17 - p == null ? -1 : p.getId(), 4.18 - v == null ? -1 : v.getId() 4.19 - ); 4.20 - } 4.21 - 4.22 - /** 4.23 - * Creates the navigation menu. 4.24 - * 4.25 - * @param req the servlet request 4.26 - * @param viewModel the current view model 4.27 - */ 4.28 - private void setNavigationMenu(HttpServletRequest req, ProjectView viewModel) { 4.29 - final Project selectedProject = Optional.ofNullable(viewModel.getProjectInfo()).map(ProjectInfo::getProject).orElse(null); 4.30 - 4.31 - final var navigation = new ArrayList<MenuEntry>(); 4.32 - 4.33 - for (ProjectInfo plistInfo : viewModel.getProjectList()) { 4.34 - final var proj = plistInfo.getProject(); 4.35 - final var projEntry = new MenuEntry( 4.36 - proj.getName(), 4.37 - "projects/view?" + queryParams(proj, null) 4.38 - ); 4.39 - navigation.add(projEntry); 4.40 - if (proj.equals(selectedProject)) { 4.41 - final var projInfo = viewModel.getProjectInfo(); 4.42 - projEntry.setActive(true); 4.43 - 4.44 - // **************** 4.45 - // Versions Section 4.46 - // **************** 4.47 - { 4.48 - final var entry = new MenuEntry(1, 4.49 - new ResourceKey(getResourceBundleName(), "menu.versions"), 4.50 - "projects/view?" + queryParams(proj, null) 4.51 - ); 4.52 - navigation.add(entry); 4.53 - } 4.54 - 4.55 - final var level2 = new ArrayList<MenuEntry>(); 4.56 - { 4.57 - final var entry = new MenuEntry( 4.58 - new ResourceKey(getResourceBundleName(), "filter.none"), 4.59 - "projects/view?" + queryParams(proj, null) 4.60 - ); 4.61 - if (viewModel.getVersionFilter() == null) entry.setActive(true); 4.62 - level2.add(entry); 4.63 - } 4.64 - 4.65 - for (Version version : projInfo.getVersions()) { 4.66 - final var entry = new MenuEntry( 4.67 - version.getName(), 4.68 - "projects/view?" + queryParams(proj, version) 4.69 - ); 4.70 - if (version.equals(viewModel.getVersionFilter())) entry.setActive(true); 4.71 - level2.add(entry); 4.72 - } 4.73 - 4.74 - level2.forEach(e -> e.setLevel(2)); 4.75 - navigation.addAll(level2); 4.76 - } 4.77 - } 4.78 - 4.79 - setNavigationMenu(req, navigation); 4.80 - } 4.81 - 4.82 private int syncParamWithSession(HttpServletRequest req, String param, String attr) { 4.83 final var session = req.getSession(); 4.84 final var idParam = getParameter(req, Integer.class, param); 4.85 @@ -179,7 +111,7 @@ 4.86 setViewModel(req, viewModel); 4.87 setContentPage(req, name); 4.88 setStylesheet(req, "projects"); 4.89 - setNavigationMenu(req, viewModel); 4.90 + setNavigationMenu(req, "project-navmenu"); 4.91 return ResponseType.HTML; 4.92 } 4.93 4.94 @@ -232,7 +164,7 @@ 4.95 4.96 dao.getProjectDao().saveOrUpdate(project); 4.97 4.98 - setRedirectLocation(req, "./projects/view?pid="+project.getId()); 4.99 + setRedirectLocation(req, "./projects/versions?pid="+project.getId()); 4.100 setContentPage(req, Constants.JSP_COMMIT_SUCCESSFUL); 4.101 LOG.debug("Successfully updated project {}", project.getName()); 4.102 4.103 @@ -270,6 +202,26 @@ 4.104 return forwardView(req, viewModel, "project-details"); 4.105 } 4.106 4.107 + @RequestMapping(requestPath = "versions", method = HttpMethod.GET) 4.108 + public ResponseType versions(HttpServletRequest req, HttpServletResponse resp, DataAccessObjects dao) throws IOException, SQLException { 4.109 + final var viewModel = new VersionsView(); 4.110 + populate(viewModel, req, dao); 4.111 + viewModel.setVersionFilter(null); 4.112 + 4.113 + final var projectInfo = viewModel.getProjectInfo(); 4.114 + if (projectInfo == null) { 4.115 + resp.sendError(HttpServletResponse.SC_NOT_FOUND, "No project selected."); 4.116 + return ResponseType.NONE; 4.117 + } 4.118 + 4.119 + final var issueDao = dao.getIssueDao(); 4.120 + final var issues = issueDao.list(projectInfo.getProject()); 4.121 + for (var issue : issues) issueDao.joinVersionInformation(issue); 4.122 + viewModel.update(projectInfo.getVersions(), issues); 4.123 + 4.124 + return forwardView(req, viewModel, "versions"); 4.125 + } 4.126 + 4.127 @RequestMapping(requestPath = "versions/edit", method = HttpMethod.GET) 4.128 public ResponseType editVersion(HttpServletRequest req, DataAccessObjects dao) throws SQLException { 4.129 final var viewModel = new VersionEditView(); 4.130 @@ -297,7 +249,7 @@ 4.131 dao.getVersionDao().saveOrUpdate(version); 4.132 4.133 // specifying the pid parameter will purposely reset the session selected version! 4.134 - setRedirectLocation(req, "./projects/view?pid=" + version.getProject().getId()); 4.135 + setRedirectLocation(req, "./projects/versions?pid=" + version.getProject().getId()); 4.136 setContentPage(req, Constants.JSP_COMMIT_SUCCESSFUL); 4.137 } catch (NoSuchElementException | IllegalArgumentException | SQLException ex) { 4.138 LOG.warn("Form validation failure: {}", ex.getMessage());
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/src/main/java/de/uapcore/lightpit/viewmodel/VersionsView.java Thu Oct 08 20:16:47 2020 +0200 5.3 @@ -0,0 +1,25 @@ 5.4 +package de.uapcore.lightpit.viewmodel; 5.5 + 5.6 +import de.uapcore.lightpit.entities.Issue; 5.7 +import de.uapcore.lightpit.entities.Version; 5.8 + 5.9 +import java.util.ArrayList; 5.10 +import java.util.List; 5.11 + 5.12 +public class VersionsView extends ProjectView { 5.13 + 5.14 + private List<VersionInfo> versionInfo = new ArrayList<>(); 5.15 + 5.16 + public void update(List<Version> versions, List<Issue> issues) { 5.17 + versionInfo.clear(); 5.18 + for (var version : versions) { 5.19 + final var info = new VersionInfo(version); 5.20 + info.collectIssues(issues); 5.21 + versionInfo.add(info); 5.22 + } 5.23 + } 5.24 + 5.25 + public List<VersionInfo> getVersionInfo() { 5.26 + return versionInfo; 5.27 + } 5.28 +}
6.1 --- a/src/main/resources/localization/projects.properties Thu Oct 08 18:28:16 2020 +0200 6.2 +++ b/src/main/resources/localization/projects.properties Thu Oct 08 20:16:47 2020 +0200 6.3 @@ -31,10 +31,8 @@ 6.4 6.5 no-projects=Welcome to LightPIT. Start off by creating a new project! 6.6 6.7 -filter.all=all 6.8 -filter.none=none 6.9 - 6.10 menu.versions=Versions 6.11 +menu.versions.unassigned=unassigned 6.12 menu.issues=Issues 6.13 6.14 name=Name 6.15 @@ -49,7 +47,6 @@ 6.16 issues.open=Open 6.17 issues.active=In Progress 6.18 issues.done=Done 6.19 -issues.total=Total 6.20 issues.reported=Reported Issues 6.21 issues.resolved=Assigned Issues 6.22 6.23 @@ -62,8 +59,6 @@ 6.24 placeholder.null-owner=Unassigned 6.25 placeholder.null-assignee=Unassigned 6.26 6.27 -version.open=open 6.28 -version.label=Version 6.29 version.status.Future=Future 6.30 version.status.Unreleased=Unreleased 6.31 version.status.Released=Released
7.1 --- a/src/main/resources/localization/projects_de.properties Thu Oct 08 18:28:16 2020 +0200 7.2 +++ b/src/main/resources/localization/projects_de.properties Thu Oct 08 20:16:47 2020 +0200 7.3 @@ -31,10 +31,8 @@ 7.4 7.5 no-projects=Wilkommen bei LightPIT. Beginnen Sie mit der Erstellung eines Projektes! 7.6 7.7 -filter.all=alle 7.8 -filter.none=keine 7.9 - 7.10 menu.versions=Versionen 7.11 +menu.versions.unassigned=Nicht Zugewiesen 7.12 menu.issues=Vorg\u00e4nge 7.13 7.14 name=Name 7.15 @@ -51,7 +49,6 @@ 7.16 issues.done=Erledigt 7.17 issues.reported=Er\u00f6ffnete Vorg\u00e4nge 7.18 issues.resolved=Enthaltene Vorg\u00e4nge 7.19 -issues.total=Summe 7.20 7.21 version.project=Projekt 7.22 version.name=Version 7.23 @@ -62,8 +59,6 @@ 7.24 placeholder.null-owner=Nicht Zugewiesen 7.25 placeholder.null-assignee=Niemandem 7.26 7.27 -version.open=ansehen 7.28 -version.label=Version 7.29 version.status.Future=Geplant 7.30 version.status.Unreleased=Unver\u00f6ffentlicht 7.31 version.status.Released=Ver\u00f6ffentlicht
8.1 --- a/src/main/webapp/WEB-INF/jsp/issues.jsp Thu Oct 08 18:28:16 2020 +0200 8.2 +++ b/src/main/webapp/WEB-INF/jsp/issues.jsp Thu Oct 08 20:16:47 2020 +0200 8.3 @@ -35,7 +35,7 @@ 8.4 8.5 <c:if test="${not empty version}"> 8.6 <h2> 8.7 - <fmt:message key="version.label" /> <c:out value="${version.name}" /> - <fmt:message key="version.status.${version.status}"/> 8.8 + <fmt:message key="version.name" /> <c:out value="${version.name}" /> - <fmt:message key="version.status.${version.status}"/> 8.9 <a href="./projects/versions/edit?vid=${version.id}">✎</a> 8.10 </h2> 8.11 </c:if>
9.1 --- a/src/main/webapp/WEB-INF/jsp/project-details.jsp Thu Oct 08 18:28:16 2020 +0200 9.2 +++ b/src/main/webapp/WEB-INF/jsp/project-details.jsp Thu Oct 08 20:16:47 2020 +0200 9.3 @@ -49,7 +49,7 @@ 9.4 <c:if test="${not empty viewmodel.versionFilter}"> 9.5 <c:set var="versionInfo" value="${viewmodel.projectDetails.versionInfo}"/> 9.6 <h2> 9.7 - <fmt:message key="version.label" /> <c:out value="${versionInfo.version.name}" /> - <fmt:message key="version.status.${versionInfo.version.status}"/> 9.8 + <fmt:message key="version.name" /> <c:out value="${versionInfo.version.name}" /> - <fmt:message key="version.status.${versionInfo.version.status}"/> 9.9 </h2> 9.10 9.11 <h3><fmt:message key="issues.resolved"/> </h3>
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 10.2 +++ b/src/main/webapp/WEB-INF/jsp/project-navmenu.jsp Thu Oct 08 20:16:47 2020 +0200 10.3 @@ -0,0 +1,60 @@ 10.4 +<%-- 10.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 10.6 + 10.7 +Copyright 2020 Mike Becker. All rights reserved. 10.8 + 10.9 +Redistribution and use in source and binary forms, with or without 10.10 +modification, are permitted provided that the following conditions are met: 10.11 + 10.12 +1. Redistributions of source code must retain the above copyright 10.13 +notice, this list of conditions and the following disclaimer. 10.14 + 10.15 +2. Redistributions in binary form must reproduce the above copyright 10.16 +notice, this list of conditions and the following disclaimer in the 10.17 +documentation and/or other materials provided with the distribution. 10.18 + 10.19 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 10.20 +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 10.21 +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 10.22 +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 10.23 +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 10.24 +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 10.25 +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 10.26 +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 10.27 +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10.28 +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10.29 +--%> 10.30 +<%@page pageEncoding="UTF-8" %> 10.31 +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10.32 +<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 10.33 + 10.34 +<jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.ProjectView" scope="request"/> 10.35 + 10.36 +<c:forEach var="projectInfo" items="${viewmodel.projectList}"> 10.37 + <c:set var="isActive" value="${viewmodel.projectInfo.project eq projectInfo.project}" /> 10.38 + <div class="menuEntry level-0" <c:if test="${isActive}">data-active</c:if> > 10.39 + <a href="projects/versions?pid=${projectInfo.project.id}"> 10.40 + <c:out value="${projectInfo.project.name}"/> 10.41 + </a> 10.42 + </div> 10.43 + <c:if test="${isActive}"> 10.44 + <div class="menuEntry level-1"> 10.45 + <a href="projects/versions?pid=${projectInfo.project.id}"> 10.46 + <fmt:message key="menu.versions"/> 10.47 + </a> 10.48 + </div> 10.49 + <div class="menuEntry level-2"> 10.50 + <a href="projects/view?pid=${projectInfo.project.id}&vid=-1"> 10.51 + <fmt:message key="menu.versions.unassigned" /> 10.52 + </a> 10.53 + </div> 10.54 + <c:forEach var="version" items="${viewmodel.projectInfo.versions}"> 10.55 + <c:set var="isVersionActive" value="${viewmodel.versionFilter eq version}" /> 10.56 + <div class="menuEntry level-2" <c:if test="${isVersionActive}">data-active</c:if> > 10.57 + <a href="projects/view?pid=${projectInfo.project.id}&vid=${version.id}"> 10.58 + <c:out value="${version.name}"/> 10.59 + </a> 10.60 + </div> 10.61 + </c:forEach> 10.62 + </c:if> 10.63 +</c:forEach>
11.1 --- a/src/main/webapp/WEB-INF/jsp/projects.jsp Thu Oct 08 18:28:16 2020 +0200 11.2 +++ b/src/main/webapp/WEB-INF/jsp/projects.jsp Thu Oct 08 20:16:47 2020 +0200 11.3 @@ -69,7 +69,7 @@ 11.4 <c:set var="project" scope="page" value="${projectInfo.project}"/> 11.5 <tr class="nowrap"> 11.6 <td style="width: 2em;"><a href="./projects/edit?pid=${project.id}">✎</a></td> 11.7 - <td><a href="./projects/view?pid=${project.id}"><c:out value="${project.name}"/></a> 11.8 + <td><a href="./projects/versions?pid=${project.id}"><c:out value="${project.name}"/></a> 11.9 </td> 11.10 <td> 11.11 <c:if test="${not empty project.repoUrl}">
12.1 --- a/src/main/webapp/WEB-INF/jsp/site.jsp Thu Oct 08 18:28:16 2020 +0200 12.2 +++ b/src/main/webapp/WEB-INF/jsp/site.jsp Thu Oct 08 20:16:47 2020 +0200 12.3 @@ -39,7 +39,7 @@ 12.4 <%-- Define an alias for the main menu --%> 12.5 <c:set scope="page" var="mainMenu" value="${requestScope[Constants.REQ_ATTR_MENU]}"/> 12.6 12.7 -<%-- Define an alias for the main menu --%> 12.8 +<%-- Define an alias for the navigation menu --%> 12.9 <c:set scope="page" var="navMenu" value="${requestScope[Constants.REQ_ATTR_NAVIGATION]}"/> 12.10 12.11 <%-- Define an alias for the content page name --%> 12.12 @@ -86,9 +86,7 @@ 12.13 <div> 12.14 <c:if test="${not empty navMenu}"> 12.15 <div id="sideMenu"> 12.16 - <c:forEach var="menu" items="${navMenu}"> 12.17 - <%@include file="../jspf/menu-entry.jsp" %> 12.18 - </c:forEach> 12.19 + <c:import url="${navMenu}"/> 12.20 </div> 12.21 </c:if> 12.22 <div id="content-area" <c:if test="${not empty navMenu}">class="sidebar-spacing"</c:if>>
13.1 --- a/src/main/webapp/WEB-INF/jsp/version-form.jsp Thu Oct 08 18:28:16 2020 +0200 13.2 +++ b/src/main/webapp/WEB-INF/jsp/version-form.jsp Thu Oct 08 20:16:47 2020 +0200 13.3 @@ -72,7 +72,7 @@ 13.4 <tr> 13.5 <td colspan="2"> 13.6 <input type="hidden" name="id" value="${version.id}"/> 13.7 - <a href="./projects/view?pid=${version.project.id}" class="button"> 13.8 + <a href="./projects/versions?pid=${version.project.id}" class="button"> 13.9 <fmt:message bundle="${lightpit_bundle}" key="button.cancel"/> 13.10 </a> 13.11 <button type="submit"><fmt:message bundle="${lightpit_bundle}" key="button.okay"/></button>
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 14.2 +++ b/src/main/webapp/WEB-INF/jsp/versions.jsp Thu Oct 08 20:16:47 2020 +0200 14.3 @@ -0,0 +1,101 @@ 14.4 +<%-- 14.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 14.6 + 14.7 +Copyright 2020 Mike Becker. All rights reserved. 14.8 + 14.9 +Redistribution and use in source and binary forms, with or without 14.10 +modification, are permitted provided that the following conditions are met: 14.11 + 14.12 +1. Redistributions of source code must retain the above copyright 14.13 +notice, this list of conditions and the following disclaimer. 14.14 + 14.15 +2. Redistributions in binary form must reproduce the above copyright 14.16 +notice, this list of conditions and the following disclaimer in the 14.17 +documentation and/or other materials provided with the distribution. 14.18 + 14.19 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14.20 +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14.21 +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 14.22 +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 14.23 +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 14.24 +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 14.25 +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 14.26 +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 14.27 +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 14.28 +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14.29 +--%> 14.30 +<%@page pageEncoding="UTF-8" %> 14.31 +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 14.32 +<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 14.33 + 14.34 +<jsp:useBean id="viewmodel" type="de.uapcore.lightpit.viewmodel.VersionsView" scope="request" /> 14.35 + 14.36 +<c:set var="project" scope="page" value="${viewmodel.projectInfo.project}"/> 14.37 +<%@include file="../jspf/project-header.jsp"%> 14.38 + 14.39 +<div id="tool-area"> 14.40 + <a href="./projects/versions/edit" class="button"><fmt:message key="button.version.create"/></a> 14.41 + <a href="./projects/issues/edit?pid=${project.id}" class="button"><fmt:message key="button.issue.create"/></a> 14.42 +</div> 14.43 + 14.44 +<h2><fmt:message key="progress" /></h2> 14.45 + 14.46 +<c:set var="summary" value="${viewmodel.projectInfo.issueSummary}" /> 14.47 +<%@include file="../jspf/issue-summary.jsp"%> 14.48 + 14.49 +<table id="version-list" class="datatable medskip fullwidth"> 14.50 + <colgroup> 14.51 + <col> 14.52 + <col width="20%"> 14.53 + <col width="20%"> 14.54 + <col width="10%"> 14.55 + <col width="10%"> 14.56 + <col width="10%"> 14.57 + <col width="10%"> 14.58 + <col width="10%"> 14.59 + <col width="10%"> 14.60 + </colgroup> 14.61 + <thead> 14.62 + <tr> 14.63 + <th colspan="3"></th> 14.64 + <th colspan="3" class="hcenter"> 14.65 + <fmt:message key="issues.resolved"/> 14.66 + </th> 14.67 + <th colspan="3" class="hcenter"> 14.68 + <fmt:message key="issues.reported"/> 14.69 + </th> 14.70 + </tr> 14.71 + <tr> 14.72 + <th></th> 14.73 + <th><fmt:message key="version.name"/></th> 14.74 + <th><fmt:message key="version.status" /></th> 14.75 + <th class="hcenter"><fmt:message key="issues.open" /></th> 14.76 + <th class="hcenter"><fmt:message key="issues.active" /></th> 14.77 + <th class="hcenter"><fmt:message key="issues.done" /></th> 14.78 + <th class="hcenter"><fmt:message key="issues.open" /></th> 14.79 + <th class="hcenter"><fmt:message key="issues.active" /></th> 14.80 + <th class="hcenter"><fmt:message key="issues.done" /></th> 14.81 + </tr> 14.82 + </thead> 14.83 + <tbody> 14.84 + <c:forEach var="versionInfo" items="${viewmodel.versionInfo}" > 14.85 + <tr> 14.86 + <td style="width: 2em;"><a href="./projects/versions/edit?vid=${versionInfo.version.id}">✎</a></td> 14.87 + <td> 14.88 + <a href="projects/view?pid=${viewmodel.projectInfo.project.id}&vid=${versionInfo.version.id}"> 14.89 + <c:out value="${versionInfo.version.name}"/> 14.90 + </a> 14.91 + </td> 14.92 + <td> 14.93 + <fmt:message key="version.status.${versionInfo.version.status}"/> 14.94 + </td> 14.95 + <td class="hright">${versionInfo.resolvedTotal.open}</td> 14.96 + <td class="hright">${versionInfo.resolvedTotal.active}</td> 14.97 + <td class="hright">${versionInfo.resolvedTotal.done}</td> 14.98 + <td class="hright">${versionInfo.reportedTotal.open}</td> 14.99 + <td class="hright">${versionInfo.reportedTotal.active}</td> 14.100 + <td class="hright">${versionInfo.reportedTotal.done}</td> 14.101 + </tr> 14.102 + </c:forEach> 14.103 + </tbody> 14.104 +</table> 14.105 \ No newline at end of file
15.1 --- a/src/main/webapp/WEB-INF/jspf/menu-entry.jsp Thu Oct 08 18:28:16 2020 +0200 15.2 +++ b/src/main/webapp/WEB-INF/jspf/menu-entry.jsp Thu Oct 08 20:16:47 2020 +0200 15.3 @@ -1,4 +1,4 @@ 15.4 -<div class="menuEntry level-${menu.level}" 15.5 +<div class="menuEntry" 15.6 <c:if test="${menu.active}">data-active</c:if> > 15.7 <a href="${menu.pathName}"> 15.8 <c:if test="${empty menu.resourceKey}">
16.1 --- a/src/main/webapp/lightpit.css Thu Oct 08 18:28:16 2020 +0200 16.2 +++ b/src/main/webapp/lightpit.css Thu Oct 08 20:16:47 2020 +0200 16.3 @@ -67,6 +67,7 @@ 16.4 height: 100%; 16.5 width: 30ch; 16.6 padding-top: 2.25rem; 16.7 + color: #3060f8; 16.8 border-image-source: linear-gradient(to bottom, #606060, rgba(60, 60, 60, .25)); 16.9 border-image-slice: 1; 16.10 border-right-style: solid;