Tue, 19 May 2020 19:34:57 +0200
removes the sub menu and removes the home module
fixes the queries in the PGIssueDao
adds placeholder for a breadcrumb menu
1.1 --- a/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java Tue May 19 18:49:48 2020 +0200 1.2 +++ b/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java Tue May 19 19:34:57 2020 +0200 1.3 @@ -92,8 +92,6 @@ 1.4 */ 1.5 private final Map<HttpMethod, Map<String, Method>> mappings = new HashMap<>(); 1.6 1.7 - private final List<MenuEntry> subMenu = new ArrayList<>(); 1.8 - 1.9 /** 1.10 * Gives implementing modules access to the {@link ModuleManager}. 1.11 * 1.12 @@ -187,9 +185,6 @@ 1.13 } 1.14 if (paramsInjectible) { 1.15 String requestPath = "/" + mapping.get().requestPath(); 1.16 - if (!mapping.get().requestPath().isBlank() && !mapping.get().menuKey().isBlank()) { 1.17 - requestPath += "/"; 1.18 - } 1.19 1.20 if (mappings 1.21 .computeIfAbsent(mapping.get().method(), k -> new HashMap<>()) 1.22 @@ -200,14 +195,6 @@ 1.23 ); 1.24 } 1.25 1.26 - final var menuKey = mapping.get().menuKey(); 1.27 - if (!menuKey.isBlank()) { 1.28 - subMenu.add(new MenuEntry( 1.29 - new ResourceKey(moduleInfo.getBundleBaseName(), menuKey), 1.30 - moduleInfo.getModulePath() + requestPath, 1.31 - mapping.get().menuSequence())); 1.32 - } 1.33 - 1.34 LOG.debug("{} {} maps to {}::{}", 1.35 mapping.get().method(), 1.36 requestPath, 1.37 @@ -325,7 +312,6 @@ 1.38 throws IOException, ServletException { 1.39 1.40 req.setAttribute(Constants.REQ_ATTR_MENU, getModuleManager().getMainMenu()); 1.41 - req.setAttribute(Constants.REQ_ATTR_SUB_MENU, subMenu); 1.42 req.getRequestDispatcher(SITE_JSP).forward(req, resp); 1.43 } 1.44
2.1 --- a/src/main/java/de/uapcore/lightpit/Constants.java Tue May 19 18:49:48 2020 +0200 2.2 +++ b/src/main/java/de/uapcore/lightpit/Constants.java Tue May 19 19:34:57 2020 +0200 2.3 @@ -68,11 +68,6 @@ 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 sub menu list. 2.8 - */ 2.9 - public static final String REQ_ATTR_SUB_MENU = fqn(AbstractLightPITServlet.class, "subMenu"); 2.10 - 2.11 - /** 2.12 * Key for the request attribute containing the base href. 2.13 */ 2.14 public static final String REQ_ATTR_BASE_HREF = fqn(AbstractLightPITServlet.class, "base_href");
3.1 --- a/src/main/java/de/uapcore/lightpit/LightPITModule.java Tue May 19 18:49:48 2020 +0200 3.2 +++ b/src/main/java/de/uapcore/lightpit/LightPITModule.java Tue May 19 19:34:57 2020 +0200 3.3 @@ -50,14 +50,6 @@ 3.4 String bundleBaseName(); 3.5 3.6 /** 3.7 - * An array of required modules, identified by the string representation of 3.8 - * their class names. 3.9 - * 3.10 - * @return an array of class names of required modules 3.11 - */ 3.12 - String[] requires() default {}; 3.13 - 3.14 - /** 3.15 * The path for this module, which will also be used for the menu entry. 3.16 * <p> 3.17 * This path must adhere to the URL pattern of the Servlet but must not
4.1 --- a/src/main/java/de/uapcore/lightpit/MenuEntry.java Tue May 19 18:49:48 2020 +0200 4.2 +++ b/src/main/java/de/uapcore/lightpit/MenuEntry.java Tue May 19 19:34:57 2020 +0200 4.3 @@ -60,6 +60,10 @@ 4.4 this.sequence = sequence; 4.5 } 4.6 4.7 + public MenuEntry(ResourceKey resourceKey, String pathName) { 4.8 + this(resourceKey, pathName, 0); 4.9 + } 4.10 + 4.11 public ResourceKey getResourceKey() { 4.12 return resourceKey; 4.13 }
5.1 --- a/src/main/java/de/uapcore/lightpit/RequestMapping.java Tue May 19 18:49:48 2020 +0200 5.2 +++ b/src/main/java/de/uapcore/lightpit/RequestMapping.java Tue May 19 19:34:57 2020 +0200 5.3 @@ -51,30 +51,10 @@ 5.4 5.5 /** 5.6 * Specifies the request path relative to the module path. 5.7 - * <p> 5.8 - * If a menu key is specified, this is also the path, which is linked 5.9 - * by the menu entry. 5.10 - * <p> 5.11 - * The path must be specified <em>without</em> leading and trailing slash. 5.12 + * The path must be specified <em>without</em> leading slash, but may have a trailing slash. 5.13 + * Requests will only be handled if the path exactly matches. 5.14 * 5.15 * @return the request path the annotated method should handle 5.16 */ 5.17 String requestPath() default ""; 5.18 - 5.19 - /** 5.20 - * Specifies the properties key for the sub menu label. 5.21 - * An empty string (default) means that no sub menu entry shall be created. 5.22 - * <p> 5.23 - * This should only be used for {@link HttpMethod#GET} requests. 5.24 - * 5.25 - * @return the properties key 5.26 - */ 5.27 - String menuKey() default ""; 5.28 - 5.29 - /** 5.30 - * May be changed to control the ordering of menu items. 5.31 - * 5.32 - * @return an integer to control the ordering 5.33 - */ 5.34 - int menuSequence() default 0; 5.35 }
6.1 --- a/src/main/java/de/uapcore/lightpit/dao/postgres/PGIssueDao.java Tue May 19 18:49:48 2020 +0200 6.2 +++ b/src/main/java/de/uapcore/lightpit/dao/postgres/PGIssueDao.java Tue May 19 19:34:57 2020 +0200 6.3 @@ -47,22 +47,22 @@ 6.4 6.5 public PGIssueDao(Connection connection) throws SQLException { 6.6 list = connection.prepareStatement( 6.7 - "select id, project, status, category, subject, description, " + 6.8 + "select issue.id, issue.project, issue.status, issue.category, issue.subject, issue.description, " + 6.9 "vplan.id, vplan.name, vdone.id, vdone.name, " + 6.10 - "created, updated, eta " + 6.11 - "from lpit_issue " + 6.12 + "issue.created, issue.updated, issue.eta " + 6.13 + "from lpit_issue issue " + 6.14 "left join lpit_version vplan on vplan.id = version_plan " + 6.15 "left join lpit_version vdone on vdone.id = version_done " + 6.16 - "where project = ? "); 6.17 + "where issue.project = ? "); 6.18 6.19 find = connection.prepareStatement( 6.20 - "select id, project, status, category, subject, description, " + 6.21 + "select issue.id, issue.project, issue.status, issue.category, issue.subject, issue.description, " + 6.22 "vplan.id, vplan.name, vdone.id, vdone.name, " + 6.23 - "created, updated, eta " + 6.24 - "from lpit_issue " + 6.25 + "issue.created, issue.updated, issue.eta " + 6.26 + "from lpit_issue issue " + 6.27 "left join lpit_version vplan on vplan.id = version_plan " + 6.28 "left join lpit_version vdone on vdone.id = version_done " + 6.29 - "where id = ? "); 6.30 + "where issue.id = ? "); 6.31 6.32 insert = connection.prepareStatement( 6.33 "insert into lpit_issue (project, status, category, subject, description, version_plan, version_done, eta) " + 6.34 @@ -86,17 +86,17 @@ 6.35 } 6.36 6.37 public Issue mapColumns(ResultSet result) throws SQLException { 6.38 - final var project = new Project(result.getInt("project")); 6.39 - final var issue = new Issue(result.getInt("id"), project); 6.40 - issue.setStatus(IssueStatus.valueOf(result.getString("status"))); 6.41 - issue.setCategory(IssueCategory.valueOf(result.getString("category"))); 6.42 - issue.setSubject(result.getString("subject")); 6.43 - issue.setDescription(result.getString("description")); 6.44 + final var project = new Project(result.getInt("issue.project")); 6.45 + final var issue = new Issue(result.getInt("issue.id"), project); 6.46 + issue.setStatus(IssueStatus.valueOf(result.getString("issue.status"))); 6.47 + issue.setCategory(IssueCategory.valueOf(result.getString("issue.category"))); 6.48 + issue.setSubject(result.getString("issue.subject")); 6.49 + issue.setDescription(result.getString("issue.description")); 6.50 issue.setScheduledVersion(obtainVersion(result, project, "vplan.")); 6.51 issue.setResolvedVersion(obtainVersion(result, project, "vdone.")); 6.52 - issue.setCreated(result.getTimestamp("created")); 6.53 - issue.setUpdated(result.getTimestamp("updated")); 6.54 - issue.setEta(result.getDate("eta")); 6.55 + issue.setCreated(result.getTimestamp("issue.created")); 6.56 + issue.setUpdated(result.getTimestamp("issue.updated")); 6.57 + issue.setEta(result.getDate("issue.eta")); 6.58 return issue; 6.59 } 6.60
7.1 --- a/src/main/java/de/uapcore/lightpit/modules/HomeModule.java Tue May 19 18:49:48 2020 +0200 7.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 7.3 @@ -1,58 +0,0 @@ 7.4 -/* 7.5 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 7.6 - * 7.7 - * Copyright 2018 Mike Becker. All rights reserved. 7.8 - * 7.9 - * Redistribution and use in source and binary forms, with or without 7.10 - * modification, are permitted provided that the following conditions are met: 7.11 - * 7.12 - * 1. Redistributions of source code must retain the above copyright 7.13 - * notice, this list of conditions and the following disclaimer. 7.14 - * 7.15 - * 2. Redistributions in binary form must reproduce the above copyright 7.16 - * notice, this list of conditions and the following disclaimer in the 7.17 - * documentation and/or other materials provided with the distribution. 7.18 - * 7.19 - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 7.20 - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 7.21 - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 7.22 - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 7.23 - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 7.24 - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 7.25 - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 7.26 - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 7.27 - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 7.28 - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 7.29 - * POSSIBILITY OF SUCH DAMAGE. 7.30 - * 7.31 - */ 7.32 -package de.uapcore.lightpit.modules; 7.33 - 7.34 -import de.uapcore.lightpit.*; 7.35 - 7.36 -import javax.servlet.annotation.WebServlet; 7.37 -import javax.servlet.http.HttpServletRequest; 7.38 - 7.39 -/** 7.40 - * Entry point for the application. 7.41 - */ 7.42 -@LightPITModule( 7.43 - bundleBaseName = "localization.home", 7.44 - modulePath = "home", 7.45 - defaultPriority = -10000 7.46 -) 7.47 -@WebServlet( 7.48 - name = "HomeModule", 7.49 - urlPatterns = "/home/*" 7.50 -) 7.51 -public final class HomeModule extends AbstractLightPITServlet { 7.52 - 7.53 - @RequestMapping(method = HttpMethod.GET) 7.54 - public ResponseType handle(HttpServletRequest req) { 7.55 - 7.56 - setDynamicFragment(req, "home"); 7.57 - setStylesheet(req, "home"); 7.58 - 7.59 - return ResponseType.HTML; 7.60 - } 7.61 -}
8.1 --- a/src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java Tue May 19 18:49:48 2020 +0200 8.2 +++ b/src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java Tue May 19 19:34:57 2020 +0200 8.3 @@ -74,12 +74,6 @@ 8.4 } 8.5 8.6 @RequestMapping(method = HttpMethod.GET) 8.7 - public ResponseType indexRedirect(HttpServletResponse resp) throws IOException { 8.8 - resp.sendRedirect("index/"); 8.9 - return ResponseType.NONE; 8.10 - } 8.11 - 8.12 - @RequestMapping(requestPath = "index", method = HttpMethod.GET, menuKey = "menu.index") 8.13 public ResponseType index(HttpServletRequest req, DataAccessObjects dao) throws SQLException { 8.14 8.15 final var projectList = dao.getProjectDao().list(); 8.16 @@ -120,7 +114,7 @@ 8.17 8.18 dao.getProjectDao().saveOrUpdate(project); 8.19 8.20 - setRedirectLocation(req, "./projects/index/"); 8.21 + setRedirectLocation(req, "./projects/"); 8.22 setDynamicFragment(req, Constants.DYN_FRAGMENT_COMMIT_SUCCESSFUL); 8.23 LOG.debug("Successfully updated project {}", project.getName()); 8.24 } catch (NoSuchElementException | NumberFormatException | SQLException ex) { 8.25 @@ -135,8 +129,8 @@ 8.26 return ResponseType.HTML; 8.27 } 8.28 8.29 - @RequestMapping(requestPath = "versions", method = HttpMethod.GET, menuKey = "menu.versions") 8.30 - public ResponseType versions(HttpServletRequest req, HttpServletResponse resp, DataAccessObjects dao) throws IOException, SQLException { 8.31 + @RequestMapping(requestPath = "view", method = HttpMethod.GET) 8.32 + public ResponseType view(HttpServletRequest req, HttpServletResponse resp, DataAccessObjects dao) throws IOException, SQLException { 8.33 final var selectedProject = getSelectedProject(req, dao); 8.34 if (selectedProject == null) { 8.35 resp.sendError(HttpServletResponse.SC_FORBIDDEN); 8.36 @@ -144,7 +138,9 @@ 8.37 } 8.38 8.39 req.setAttribute("versions", dao.getVersionDao().list(selectedProject)); 8.40 - setDynamicFragment(req, "versions"); 8.41 + req.setAttribute("issues", dao.getIssueDao().list(selectedProject)); 8.42 + 8.43 + setDynamicFragment(req, "project-details"); 8.44 8.45 return ResponseType.HTML; 8.46 } 8.47 @@ -197,21 +193,6 @@ 8.48 return ResponseType.HTML; 8.49 } 8.50 8.51 - 8.52 - @RequestMapping(requestPath = "issues", method = HttpMethod.GET, menuKey = "menu.issues") 8.53 - public ResponseType issues(HttpServletRequest req, HttpServletResponse resp, DataAccessObjects dao) throws IOException, SQLException { 8.54 - final var selectedProject = getSelectedProject(req, dao); 8.55 - if (selectedProject == null) { 8.56 - resp.sendError(HttpServletResponse.SC_FORBIDDEN); 8.57 - return ResponseType.NONE; 8.58 - } 8.59 - 8.60 - req.setAttribute("issues", dao.getVersionDao().list(selectedProject)); 8.61 - setDynamicFragment(req, "issues"); 8.62 - 8.63 - return ResponseType.HTML; 8.64 - } 8.65 - 8.66 @RequestMapping(requestPath = "issues/edit", method = HttpMethod.GET) 8.67 public ResponseType editIssue(HttpServletRequest req, HttpServletResponse resp, DataAccessObjects dao) throws IOException, SQLException { 8.68 final var selectedProject = getSelectedProject(req, dao);
9.1 --- a/src/main/resources/localization/home.properties Tue May 19 18:49:48 2020 +0200 9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 9.3 @@ -1,26 +0,0 @@ 9.4 -# Copyright 2018 Mike Becker. All rights reserved. 9.5 -# 9.6 -# Redistribution and use in source and binary forms, with or without 9.7 -# modification, are permitted provided that the following conditions are met: 9.8 -# 9.9 -# 1. Redistributions of source code must retain the above copyright 9.10 -# notice, this list of conditions and the following disclaimer. 9.11 -# 9.12 -# 2. Redistributions in binary form must reproduce the above copyright 9.13 -# notice, this list of conditions and the following disclaimer in the 9.14 -# documentation and/or other materials provided with the distribution. 9.15 -# 9.16 -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 9.17 -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 9.18 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 9.19 -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 9.20 -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 9.21 -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 9.22 -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 9.23 -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 9.24 -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9.25 -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9.26 - 9.27 -menuLabel = Home 9.28 - 9.29 -version=LightPIT - Version 0.1 (Snapshot) 9.30 \ No newline at end of file
10.1 --- a/src/main/resources/localization/home_de.properties Tue May 19 18:49:48 2020 +0200 10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 10.3 @@ -1,26 +0,0 @@ 10.4 -# Copyright 2018 Mike Becker. All rights reserved. 10.5 -# 10.6 -# Redistribution and use in source and binary forms, with or without 10.7 -# modification, are permitted provided that the following conditions are met: 10.8 -# 10.9 -# 1. Redistributions of source code must retain the above copyright 10.10 -# notice, this list of conditions and the following disclaimer. 10.11 -# 10.12 -# 2. Redistributions in binary form must reproduce the above copyright 10.13 -# notice, this list of conditions and the following disclaimer in the 10.14 -# documentation and/or other materials provided with the distribution. 10.15 -# 10.16 -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 10.17 -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 10.18 -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 10.19 -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 10.20 -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 10.21 -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 10.22 -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 10.23 -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 10.24 -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10.25 -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10.26 - 10.27 -menuLabel = Startseite 10.28 - 10.29 -version=LightPIT - Version 0.1 (Entwicklungsversion)
11.1 --- a/src/main/resources/localization/lightpit.properties Tue May 19 18:49:48 2020 +0200 11.2 +++ b/src/main/resources/localization/lightpit.properties Tue May 19 19:34:57 2020 +0200 11.3 @@ -21,6 +21,8 @@ 11.4 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 11.5 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11.6 11.7 +version=LightPIT - Version 0.1 (Snapshot) 11.8 + 11.9 button.okay=OK 11.10 button.cancel=Cancel 11.11
12.1 --- a/src/main/resources/localization/lightpit_de.properties Tue May 19 18:49:48 2020 +0200 12.2 +++ b/src/main/resources/localization/lightpit_de.properties Tue May 19 19:34:57 2020 +0200 12.3 @@ -21,6 +21,8 @@ 12.4 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 12.5 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12.6 12.7 +version=LightPIT - Version 0.1 (Entwicklungsversion) 12.8 + 12.9 button.okay=OK 12.10 button.cancel=Abbrechen 12.11
13.1 --- a/src/main/resources/localization/projects.properties Tue May 19 18:49:48 2020 +0200 13.2 +++ b/src/main/resources/localization/projects.properties Tue May 19 19:34:57 2020 +0200 13.3 @@ -23,12 +23,9 @@ 13.4 13.5 menuLabel=Projects 13.6 13.7 -menu.index=Index 13.8 -menu.versions=Versions 13.9 -menu.issues=Issues 13.10 - 13.11 button.create=New Project 13.12 button.version.create=New Version 13.13 +button.issue.create=New Issue 13.14 13.15 no-projects=Welcome to LightPIT. Start off by creating a new project! 13.16 13.17 @@ -48,4 +45,11 @@ 13.18 version.status.Unreleased=Unreleased 13.19 version.status.Released=Released 13.20 version.status.LTS=LTS 13.21 -version.status.Deprecated=Deprecated 13.22 \ No newline at end of file 13.23 +version.status.Deprecated=Deprecated 13.24 + 13.25 +thead.issue.subject=Subject 13.26 +thead.issue.category=Category 13.27 +thead.issue.status=Status 13.28 +thead.issue.created=Created 13.29 +thead.issue.updated=Updated 13.30 +thead.issue.eta=ETA
14.1 --- a/src/main/resources/localization/projects_de.properties Tue May 19 18:49:48 2020 +0200 14.2 +++ b/src/main/resources/localization/projects_de.properties Tue May 19 19:34:57 2020 +0200 14.3 @@ -23,12 +23,9 @@ 14.4 14.5 menuLabel=Projekte 14.6 14.7 -menu.index=Index 14.8 -menu.versions=Versionen 14.9 -menu.issues=Vorg\u00e4nge 14.10 - 14.11 button.create=Neues Projekt 14.12 button.version.create=Neue Version 14.13 +button.issue.create=Neuer Vorgang 14.14 14.15 no-projects=Wilkommen bei LightPIT. Beginnen Sie mit der Erstellung eines Projektes! 14.16 14.17 @@ -49,3 +46,10 @@ 14.18 version.status.Released=Ver\u00f6ffentlicht 14.19 version.status.LTS=Langzeitsupport 14.20 version.status.Deprecated=Veraltet 14.21 + 14.22 +thead.issue.subject=Thema 14.23 +thead.issue.category=Kategorie 14.24 +thead.issue.status=Status 14.25 +thead.issue.created=Erstellt 14.26 +thead.issue.updated=Aktualisiert 14.27 +thead.issue.eta=Zieldatum
15.1 --- a/src/main/webapp/WEB-INF/dynamic_fragments/home.jsp Tue May 19 18:49:48 2020 +0200 15.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 15.3 @@ -1,32 +0,0 @@ 15.4 -<%-- 15.5 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 15.6 - 15.7 -Copyright 2018 Mike Becker. All rights reserved. 15.8 - 15.9 -Redistribution and use in source and binary forms, with or without 15.10 -modification, are permitted provided that the following conditions are met: 15.11 - 15.12 -1. Redistributions of source code must retain the above copyright 15.13 -notice, this list of conditions and the following disclaimer. 15.14 - 15.15 -2. Redistributions in binary form must reproduce the above copyright 15.16 -notice, this list of conditions and the following disclaimer in the 15.17 -documentation and/or other materials provided with the distribution. 15.18 - 15.19 -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15.20 -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15.21 -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 15.22 -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 15.23 -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 15.24 -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 15.25 -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 15.26 -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 15.27 -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 15.28 -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15.29 ---%> 15.30 -<%@page pageEncoding="UTF-8" %> 15.31 -<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 15.32 - 15.33 -<div class="smalltext"> 15.34 - <fmt:message key="version" /> 15.35 -</div> 15.36 \ No newline at end of file
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 16.2 +++ b/src/main/webapp/WEB-INF/dynamic_fragments/project-details.jsp Tue May 19 19:34:57 2020 +0200 16.3 @@ -0,0 +1,79 @@ 16.4 +<%-- 16.5 +DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 16.6 + 16.7 +Copyright 2018 Mike Becker. All rights reserved. 16.8 + 16.9 +Redistribution and use in source and binary forms, with or without 16.10 +modification, are permitted provided that the following conditions are met: 16.11 + 16.12 +1. Redistributions of source code must retain the above copyright 16.13 +notice, this list of conditions and the following disclaimer. 16.14 + 16.15 +2. Redistributions in binary form must reproduce the above copyright 16.16 +notice, this list of conditions and the following disclaimer in the 16.17 +documentation and/or other materials provided with the distribution. 16.18 + 16.19 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16.20 +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.21 +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16.22 +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 16.23 +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 16.24 +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 16.25 +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 16.26 +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 16.27 +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16.28 +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16.29 +--%> 16.30 +<%@page pageEncoding="UTF-8" %> 16.31 +<%@page import="de.uapcore.lightpit.Constants" %> 16.32 +<%@page import="de.uapcore.lightpit.modules.ProjectsModule" %> 16.33 +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 16.34 +<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 16.35 + 16.36 +<c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/> 16.37 +<c:set scope="page" var="selectedProject" value="${sessionScope[ProjectsModule.SESSION_ATTR_SELECTED_PROJECT]}"/> 16.38 + 16.39 +<jsp:useBean id="versions" type="java.util.List<de.uapcore.lightpit.entities.Version>" scope="request"/> 16.40 +<jsp:useBean id="issues" type="java.util.List<de.uapcore.lightpit.entities.Issue>" scope="request"/> 16.41 + 16.42 +<div id="tool-area"> 16.43 + <a href="./${moduleInfo.modulePath}/versions/edit" class="button"><fmt:message key="button.version.create" /></a> 16.44 + <a href="./${moduleInfo.modulePath}/issues/edit" class="button"><fmt:message key="button.issue.create" /></a> 16.45 +</div> 16.46 + 16.47 +<c:if test="${not empty versions}"> 16.48 +<table id="version-list" class="datatable medskip"> 16.49 + <thead> 16.50 + <tr> 16.51 + <th></th> 16.52 + <th><fmt:message key="thead.version.name"/></th> 16.53 + <th><fmt:message key="thead.version.status"/></th> 16.54 + </tr> 16.55 + </thead> 16.56 + <tbody> 16.57 + <c:forEach var="version" items="${versions}"> 16.58 + <tr class="nowrap" > 16.59 + <td style="width: 2em;"><a href="./${moduleInfo.modulePath}/versions/edit?id=${version.id}">✎</a></td> 16.60 + <td><c:out value="${version.name}"/></td> 16.61 + <td><fmt:message key="version.status.${version.status}" /></td> 16.62 + </tr> 16.63 + </c:forEach> 16.64 + </tbody> 16.65 +</table> 16.66 +</c:if> 16.67 + 16.68 +<table id="issue-list" class="datatable medskip"> 16.69 + <thead> 16.70 + <tr> 16.71 + <th></th> 16.72 + <th><fmt:message key="thead.issue.subject" /></th> 16.73 + <th><fmt:message key="thead.issue.category" /></th> 16.74 + <th><fmt:message key="thead.issue.status" /></th> 16.75 + <th><fmt:message key="thead.issue.created" /></th> 16.76 + <th><fmt:message key="thead.issue.updated" /></th> 16.77 + <th><fmt:message key="thead.issue.eta" /></th> 16.78 + <!-- TODO: add other information --> 16.79 + </tr> 16.80 + </thead> 16.81 + <!-- TODO: add actual list --> 16.82 +</table>
17.1 --- a/src/main/webapp/WEB-INF/dynamic_fragments/project-form.jsp Tue May 19 18:49:48 2020 +0200 17.2 +++ b/src/main/webapp/WEB-INF/dynamic_fragments/project-form.jsp Tue May 19 19:34:57 2020 +0200 17.3 @@ -69,7 +69,7 @@ 17.4 <tr> 17.5 <td colspan="2"> 17.6 <input type="hidden" name="id" value="${project.id}" /> 17.7 - <a href="./${moduleInfo.modulePath}/index/" class="button"><fmt:message bundle="${lightpit_bundle}" key="button.cancel"/></a> 17.8 + <a href="./${moduleInfo.modulePath}/" class="button"><fmt:message bundle="${lightpit_bundle}" key="button.cancel"/></a> 17.9 <button type="submit"><fmt:message bundle="${lightpit_bundle}" key="button.okay" /></button> 17.10 </td> 17.11 </tr>
18.1 --- a/src/main/webapp/WEB-INF/dynamic_fragments/projects.jsp Tue May 19 18:49:48 2020 +0200 18.2 +++ b/src/main/webapp/WEB-INF/dynamic_fragments/projects.jsp Tue May 19 19:34:57 2020 +0200 18.3 @@ -65,9 +65,9 @@ 18.4 </thead> 18.5 <tbody> 18.6 <c:forEach var="project" items="${projects}"> 18.7 - <tr class="nowrap" <c:if test="${project eq selectedProject}">data-selected</c:if> > 18.8 + <tr class="nowrap"> 18.9 <td style="width: 2em;"><a href="./${moduleInfo.modulePath}/edit?id=${project.id}">✎</a></td> 18.10 - <td><a href="./${moduleInfo.modulePath}/index/?pid=${project.id}"><c:out value="${project.name}"/></a></td> 18.11 + <td><a href="./${moduleInfo.modulePath}/view?pid=${project.id}"><c:out value="${project.name}"/></a></td> 18.12 <td><c:out value="${project.description}"/></td> 18.13 <td> 18.14 <c:if test="${not empty project.repoUrl}">
19.1 --- a/src/main/webapp/WEB-INF/dynamic_fragments/versions.jsp Tue May 19 18:49:48 2020 +0200 19.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 19.3 @@ -1,68 +0,0 @@ 19.4 -<%-- 19.5 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 19.6 - 19.7 -Copyright 2018 Mike Becker. All rights reserved. 19.8 - 19.9 -Redistribution and use in source and binary forms, with or without 19.10 -modification, are permitted provided that the following conditions are met: 19.11 - 19.12 -1. Redistributions of source code must retain the above copyright 19.13 -notice, this list of conditions and the following disclaimer. 19.14 - 19.15 -2. Redistributions in binary form must reproduce the above copyright 19.16 -notice, this list of conditions and the following disclaimer in the 19.17 -documentation and/or other materials provided with the distribution. 19.18 - 19.19 -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19.20 -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19.21 -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19.22 -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 19.23 -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.24 -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 19.25 -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 19.26 -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 19.27 -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 19.28 -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 19.29 ---%> 19.30 -<%@page pageEncoding="UTF-8" %> 19.31 -<%@page import="de.uapcore.lightpit.Constants" %> 19.32 -<%@page import="de.uapcore.lightpit.modules.ProjectsModule" %> 19.33 -<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 19.34 -<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 19.35 - 19.36 -<c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/> 19.37 -<c:set scope="page" var="selectedProject" value="${sessionScope[ProjectsModule.SESSION_ATTR_SELECTED_PROJECT]}"/> 19.38 - 19.39 -<jsp:useBean id="versions" type="java.util.List<de.uapcore.lightpit.entities.Version>" scope="request"/> 19.40 - 19.41 -<c:if test="${empty selectedProject}"> 19.42 - <div class="info-box"> 19.43 - <fmt:message key="no-projects" /> 19.44 - </div> 19.45 -</c:if> 19.46 -<c:if test="${not empty selectedProject}"> 19.47 -<div id="tool-area"> 19.48 - <a href="./${moduleInfo.modulePath}/versions/edit" class="button"><fmt:message key="button.version.create" /></a> 19.49 -</div> 19.50 - 19.51 -<c:if test="${not empty versions}"> 19.52 -<table id="project-list" class="datatable medskip"> 19.53 - <thead> 19.54 - <tr> 19.55 - <th></th> 19.56 - <th><fmt:message key="thead.version.name"/></th> 19.57 - <th><fmt:message key="thead.version.status"/></th> 19.58 - </tr> 19.59 - </thead> 19.60 - <tbody> 19.61 - <c:forEach var="version" items="${versions}"> 19.62 - <tr class="nowrap" > 19.63 - <td style="width: 2em;"><a href="./${moduleInfo.modulePath}/versions/edit?id=${version.id}">✎</a></td> 19.64 - <td><c:out value="${version.name}"/></td> 19.65 - <td><fmt:message key="version.status.${version.status}" /></td> 19.66 - </tr> 19.67 - </c:forEach> 19.68 - </tbody> 19.69 -</table> 19.70 -</c:if> 19.71 -</c:if>
20.1 --- a/src/main/webapp/WEB-INF/jsp/site.jsp Tue May 19 18:49:48 2020 +0200 20.2 +++ b/src/main/webapp/WEB-INF/jsp/site.jsp Tue May 19 19:34:57 2020 +0200 20.3 @@ -26,6 +26,7 @@ 20.4 --%> 20.5 <%@page contentType="text/html" pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> 20.6 <%@page import="de.uapcore.lightpit.Constants" %> 20.7 +<%@page import="de.uapcore.lightpit.modules.ProjectsModule" %> 20.8 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 20.9 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 20.10 <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 20.11 @@ -39,9 +40,6 @@ 20.12 <%-- Define an alias for the main menu --%> 20.13 <c:set scope="page" var="mainMenu" value="${requestScope[Constants.REQ_ATTR_MENU]}"/> 20.14 20.15 -<%-- Define an alias for the sub menu --%> 20.16 -<c:set scope="page" var="subMenu" value="${requestScope[Constants.REQ_ATTR_SUB_MENU]}"/> 20.17 - 20.18 <%-- Define an alias for the fragment name --%> 20.19 <c:set scope="page" var="fragment" value="${requestScope[Constants.REQ_ATTR_FRAGMENT]}"/> 20.20 20.21 @@ -59,6 +57,9 @@ 20.22 <fmt:setLocale scope="request" value="${sessionScope[Constants.SESSION_ATTR_LANGUAGE]}"/> 20.23 </c:if> 20.24 20.25 +<%-- Selected project, if any --%> 20.26 +<c:set scope="page" var="selectedProject" value="${sessionScope[ProjectsModule.SESSION_ATTR_SELECTED_PROJECT]}"/> 20.27 + 20.28 <!DOCTYPE html> 20.29 <html> 20.30 <head> 20.31 @@ -80,16 +81,23 @@ 20.32 <body> 20.33 <div id="mainMenu"> 20.34 <c:forEach var="menu" items="${mainMenu}"> 20.35 - <%@ include file="../jspf/menu-entry.jspf" %> 20.36 + <div class="menuEntry" 20.37 + <c:set var="menuPath" value="/${menu.pathName}"/> 20.38 + <c:if test="${fn:startsWith(requestPath, menuPath)}"> 20.39 + data-active 20.40 + </c:if> 20.41 + > 20.42 + <a href="${menu.pathName}"> 20.43 + <fmt:bundle basename="${menu.resourceKey.bundle}"> 20.44 + <fmt:message key="${menu.resourceKey.key}"/> 20.45 + </fmt:bundle> 20.46 + </a> 20.47 + </div> 20.48 </c:forEach> 20.49 </div> 20.50 - <c:if test="${not empty subMenu}"> 20.51 - <div id="subMenu"> 20.52 - <c:forEach var="menu" items="${subMenu}"> 20.53 - <%@ include file="../jspf/menu-entry.jspf" %> 20.54 - </c:forEach> 20.55 - </div> 20.56 - </c:if> 20.57 + <div id="breadcrumbs"> 20.58 + <%-- TODO: find a strategy to define the breadcrumbs --%> 20.59 + </div> 20.60 <div id="content-area"> 20.61 <c:if test="${not empty fragment}"> 20.62 <fmt:setBundle scope="request" basename="${moduleInfo.bundleBaseName}"/>
21.1 --- a/src/main/webapp/WEB-INF/jspf/menu-entry.jspf Tue May 19 18:49:48 2020 +0200 21.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 21.3 @@ -1,38 +0,0 @@ 21.4 -<%-- 21.5 -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 21.6 - 21.7 -Copyright 2018 Mike Becker. All rights reserved. 21.8 - 21.9 -Redistribution and use in source and binary forms, with or without 21.10 -modification, are permitted provided that the following conditions are met: 21.11 - 21.12 -1. Redistributions of source code must retain the above copyright 21.13 -notice, this list of conditions and the following disclaimer. 21.14 - 21.15 -2. Redistributions in binary form must reproduce the above copyright 21.16 -notice, this list of conditions and the following disclaimer in the 21.17 -documentation and/or other materials provided with the distribution. 21.18 - 21.19 -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21.20 -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21.21 -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21.22 -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 21.23 -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21.24 -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21.25 -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21.26 -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 21.27 -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 21.28 -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 21.29 ---%> 21.30 -<div class="menuEntry" 21.31 - <c:set var="menuPath" value="/${menu.pathName}"/> 21.32 - <c:if test="${fn:startsWith(requestPath, menuPath)}"> 21.33 - data-active 21.34 - </c:if> 21.35 -> 21.36 - <a href="${menu.pathName}"> 21.37 - <fmt:bundle basename="${menu.resourceKey.bundle}"> 21.38 - <fmt:message key="${menu.resourceKey.key}"/> 21.39 - </fmt:bundle> 21.40 - </a> 21.41 -</div> 21.42 \ No newline at end of file
22.1 --- a/src/main/webapp/index.jsp Tue May 19 18:49:48 2020 +0200 22.2 +++ b/src/main/webapp/index.jsp Tue May 19 19:34:57 2020 +0200 22.3 @@ -25,8 +25,8 @@ 22.4 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22.5 --%> 22.6 <%@page import="de.uapcore.lightpit.Functions" %> 22.7 -<%@page import="de.uapcore.lightpit.modules.HomeModule" %> 22.8 +<%@ page import="de.uapcore.lightpit.modules.ProjectsModule" %> 22.9 <% 22.10 response.setStatus(response.SC_MOVED_TEMPORARILY); 22.11 - response.setHeader("Location", Functions.modulePathOf(HomeModule.class)); 22.12 + response.setHeader("Location", Functions.modulePathOf(ProjectsModule.class)); 22.13 %>
23.1 --- a/src/main/webapp/lightpit.css Tue May 19 18:49:48 2020 +0200 23.2 +++ b/src/main/webapp/lightpit.css Tue May 19 19:34:57 2020 +0200 23.3 @@ -47,7 +47,7 @@ 23.4 text-decoration: none; 23.5 } 23.6 23.7 -#mainMenu, #subMenu { 23.8 +#mainMenu, #breadcrumbs { 23.9 width: 100%; 23.10 display: flex; 23.11 flex-flow: row wrap; 23.12 @@ -62,7 +62,7 @@ 23.13 background: #e0e0e5; 23.14 } 23.15 23.16 -#subMenu { 23.17 +#breadcrumbs { 23.18 background: #f7f7ff; 23.19 } 23.20 23.21 @@ -77,7 +77,7 @@ 23.22 background: #d0d0d5; 23.23 } 23.24 23.25 -#subMenu .menuEntry[data-active] { 23.26 +#breadcrumbs .menuEntry[data-active] { 23.27 background: #e7e7ef 23.28 } 23.29
24.1 --- a/src/main/webapp/projects.css Tue May 19 18:49:48 2020 +0200 24.2 +++ b/src/main/webapp/projects.css Tue May 19 19:34:57 2020 +0200 24.3 @@ -26,7 +26,3 @@ 24.4 * POSSIBILITY OF SUCH DAMAGE. 24.5 * 24.6 */ 24.7 - 24.8 -#project-list tr[data-selected] { 24.9 - background: lightgoldenrodyellow; 24.10 -}