removes the sub menu and removes the home module

Tue, 19 May 2020 19:34:57 +0200

author
Mike Becker <universe@uap-core.de>
date
Tue, 19 May 2020 19:34:57 +0200
changeset 70
821c4950b619
parent 69
2223bd79e0c6
child 71
dca186d3911f

removes the sub menu and removes the home module
fixes the queries in the PGIssueDao
adds placeholder for a breadcrumb menu

src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java file | annotate | diff | comparison | revisions
src/main/java/de/uapcore/lightpit/Constants.java file | annotate | diff | comparison | revisions
src/main/java/de/uapcore/lightpit/LightPITModule.java file | annotate | diff | comparison | revisions
src/main/java/de/uapcore/lightpit/MenuEntry.java file | annotate | diff | comparison | revisions
src/main/java/de/uapcore/lightpit/RequestMapping.java file | annotate | diff | comparison | revisions
src/main/java/de/uapcore/lightpit/dao/postgres/PGIssueDao.java file | annotate | diff | comparison | revisions
src/main/java/de/uapcore/lightpit/modules/HomeModule.java file | annotate | diff | comparison | revisions
src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java file | annotate | diff | comparison | revisions
src/main/resources/localization/home.properties file | annotate | diff | comparison | revisions
src/main/resources/localization/home_de.properties file | annotate | diff | comparison | revisions
src/main/resources/localization/lightpit.properties file | annotate | diff | comparison | revisions
src/main/resources/localization/lightpit_de.properties file | annotate | diff | comparison | revisions
src/main/resources/localization/projects.properties file | annotate | diff | comparison | revisions
src/main/resources/localization/projects_de.properties file | annotate | diff | comparison | revisions
src/main/webapp/WEB-INF/dynamic_fragments/home.jsp file | annotate | diff | comparison | revisions
src/main/webapp/WEB-INF/dynamic_fragments/project-details.jsp file | annotate | diff | comparison | revisions
src/main/webapp/WEB-INF/dynamic_fragments/project-form.jsp file | annotate | diff | comparison | revisions
src/main/webapp/WEB-INF/dynamic_fragments/projects.jsp file | annotate | diff | comparison | revisions
src/main/webapp/WEB-INF/dynamic_fragments/versions.jsp file | annotate | diff | comparison | revisions
src/main/webapp/WEB-INF/jsp/site.jsp file | annotate | diff | comparison | revisions
src/main/webapp/WEB-INF/jspf/menu-entry.jspf file | annotate | diff | comparison | revisions
src/main/webapp/home.css file | annotate | diff | comparison | revisions
src/main/webapp/index.jsp file | annotate | diff | comparison | revisions
src/main/webapp/lightpit.css file | annotate | diff | comparison | revisions
src/main/webapp/projects.css file | annotate | diff | comparison | revisions
--- a/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java	Tue May 19 18:49:48 2020 +0200
+++ b/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java	Tue May 19 19:34:57 2020 +0200
@@ -92,8 +92,6 @@
      */
     private final Map<HttpMethod, Map<String, Method>> mappings = new HashMap<>();
 
-    private final List<MenuEntry> subMenu = new ArrayList<>();
-
     /**
      * Gives implementing modules access to the {@link ModuleManager}.
      *
@@ -187,9 +185,6 @@
                     }
                     if (paramsInjectible) {
                         String requestPath = "/" + mapping.get().requestPath();
-                        if (!mapping.get().requestPath().isBlank() && !mapping.get().menuKey().isBlank()) {
-                            requestPath += "/";
-                        }
 
                         if (mappings
                                 .computeIfAbsent(mapping.get().method(), k -> new HashMap<>())
@@ -200,14 +195,6 @@
                             );
                         }
 
-                        final var menuKey = mapping.get().menuKey();
-                        if (!menuKey.isBlank()) {
-                            subMenu.add(new MenuEntry(
-                                    new ResourceKey(moduleInfo.getBundleBaseName(), menuKey),
-                                    moduleInfo.getModulePath() + requestPath,
-                                    mapping.get().menuSequence()));
-                        }
-
                         LOG.debug("{} {} maps to {}::{}",
                                 mapping.get().method(),
                                 requestPath,
@@ -325,7 +312,6 @@
             throws IOException, ServletException {
 
         req.setAttribute(Constants.REQ_ATTR_MENU, getModuleManager().getMainMenu());
-        req.setAttribute(Constants.REQ_ATTR_SUB_MENU, subMenu);
         req.getRequestDispatcher(SITE_JSP).forward(req, resp);
     }
 
--- a/src/main/java/de/uapcore/lightpit/Constants.java	Tue May 19 18:49:48 2020 +0200
+++ b/src/main/java/de/uapcore/lightpit/Constants.java	Tue May 19 19:34:57 2020 +0200
@@ -68,11 +68,6 @@
     public static final String REQ_ATTR_MENU = fqn(AbstractLightPITServlet.class, "mainMenu");
 
     /**
-     * Key for the request attribute containing the sub menu list.
-     */
-    public static final String REQ_ATTR_SUB_MENU = fqn(AbstractLightPITServlet.class, "subMenu");
-
-    /**
      * Key for the request attribute containing the base href.
      */
     public static final String REQ_ATTR_BASE_HREF = fqn(AbstractLightPITServlet.class, "base_href");
--- a/src/main/java/de/uapcore/lightpit/LightPITModule.java	Tue May 19 18:49:48 2020 +0200
+++ b/src/main/java/de/uapcore/lightpit/LightPITModule.java	Tue May 19 19:34:57 2020 +0200
@@ -50,14 +50,6 @@
     String bundleBaseName();
 
     /**
-     * An array of required modules, identified by the string representation of
-     * their class names.
-     *
-     * @return an array of class names of required modules
-     */
-    String[] requires() default {};
-
-    /**
      * The path for this module, which will also be used for the menu entry.
      * <p>
      * This path must adhere to the URL pattern of the Servlet but must not
--- a/src/main/java/de/uapcore/lightpit/MenuEntry.java	Tue May 19 18:49:48 2020 +0200
+++ b/src/main/java/de/uapcore/lightpit/MenuEntry.java	Tue May 19 19:34:57 2020 +0200
@@ -60,6 +60,10 @@
         this.sequence = sequence;
     }
 
+    public MenuEntry(ResourceKey resourceKey, String pathName) {
+        this(resourceKey, pathName, 0);
+    }
+
     public ResourceKey getResourceKey() {
         return resourceKey;
     }
--- a/src/main/java/de/uapcore/lightpit/RequestMapping.java	Tue May 19 18:49:48 2020 +0200
+++ b/src/main/java/de/uapcore/lightpit/RequestMapping.java	Tue May 19 19:34:57 2020 +0200
@@ -51,30 +51,10 @@
 
     /**
      * Specifies the request path relative to the module path.
-     * <p>
-     * If a menu key is specified, this is also the path, which is linked
-     * by the menu entry.
-     * <p>
-     * The path must be specified <em>without</em> leading and trailing slash.
+     * The path must be specified <em>without</em> leading slash, but may have a trailing slash.
+     * Requests will only be handled if the path exactly matches.
      *
      * @return the request path the annotated method should handle
      */
     String requestPath() default "";
-
-    /**
-     * Specifies the properties key for the sub menu label.
-     * An empty string (default) means that no sub menu entry shall be created.
-     * <p>
-     * This should only be used for {@link HttpMethod#GET} requests.
-     *
-     * @return the properties key
-     */
-    String menuKey() default "";
-
-    /**
-     * May be changed to control the ordering of menu items.
-     *
-     * @return an integer to control the ordering
-     */
-    int menuSequence() default 0;
 }
--- a/src/main/java/de/uapcore/lightpit/dao/postgres/PGIssueDao.java	Tue May 19 18:49:48 2020 +0200
+++ b/src/main/java/de/uapcore/lightpit/dao/postgres/PGIssueDao.java	Tue May 19 19:34:57 2020 +0200
@@ -47,22 +47,22 @@
 
     public PGIssueDao(Connection connection) throws SQLException {
         list = connection.prepareStatement(
-                "select id, project, status, category, subject, description, " +
+                "select issue.id, issue.project, issue.status, issue.category, issue.subject, issue.description, " +
                         "vplan.id, vplan.name, vdone.id, vdone.name, " +
-                        "created, updated, eta " +
-                        "from lpit_issue " +
+                        "issue.created, issue.updated, issue.eta " +
+                        "from lpit_issue issue " +
                         "left join lpit_version vplan on vplan.id = version_plan " +
                         "left join lpit_version vdone on vdone.id = version_done " +
-                        "where project = ? ");
+                        "where issue.project = ? ");
 
         find = connection.prepareStatement(
-                "select id, project, status, category, subject, description, " +
+                "select issue.id, issue.project, issue.status, issue.category, issue.subject, issue.description, " +
                         "vplan.id, vplan.name, vdone.id, vdone.name, " +
-                        "created, updated, eta " +
-                        "from lpit_issue " +
+                        "issue.created, issue.updated, issue.eta " +
+                        "from lpit_issue issue " +
                         "left join lpit_version vplan on vplan.id = version_plan " +
                         "left join lpit_version vdone on vdone.id = version_done " +
-                        "where id = ? ");
+                        "where issue.id = ? ");
 
         insert = connection.prepareStatement(
                 "insert into lpit_issue (project, status, category, subject, description, version_plan, version_done, eta) " +
@@ -86,17 +86,17 @@
     }
 
     public Issue mapColumns(ResultSet result) throws SQLException {
-        final var project = new Project(result.getInt("project"));
-        final var issue = new Issue(result.getInt("id"), project);
-        issue.setStatus(IssueStatus.valueOf(result.getString("status")));
-        issue.setCategory(IssueCategory.valueOf(result.getString("category")));
-        issue.setSubject(result.getString("subject"));
-        issue.setDescription(result.getString("description"));
+        final var project = new Project(result.getInt("issue.project"));
+        final var issue = new Issue(result.getInt("issue.id"), project);
+        issue.setStatus(IssueStatus.valueOf(result.getString("issue.status")));
+        issue.setCategory(IssueCategory.valueOf(result.getString("issue.category")));
+        issue.setSubject(result.getString("issue.subject"));
+        issue.setDescription(result.getString("issue.description"));
         issue.setScheduledVersion(obtainVersion(result, project, "vplan."));
         issue.setResolvedVersion(obtainVersion(result, project, "vdone."));
-        issue.setCreated(result.getTimestamp("created"));
-        issue.setUpdated(result.getTimestamp("updated"));
-        issue.setEta(result.getDate("eta"));
+        issue.setCreated(result.getTimestamp("issue.created"));
+        issue.setUpdated(result.getTimestamp("issue.updated"));
+        issue.setEta(result.getDate("issue.eta"));
         return issue;
     }
 
--- a/src/main/java/de/uapcore/lightpit/modules/HomeModule.java	Tue May 19 18:49:48 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2018 Mike Becker. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- *   1. Redistributions of source code must retain the above copyright
- *      notice, this list of conditions and the following disclaimer.
- *
- *   2. Redistributions in binary form must reproduce the above copyright
- *      notice, this list of conditions and the following disclaimer in the
- *      documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- */
-package de.uapcore.lightpit.modules;
-
-import de.uapcore.lightpit.*;
-
-import javax.servlet.annotation.WebServlet;
-import javax.servlet.http.HttpServletRequest;
-
-/**
- * Entry point for the application.
- */
-@LightPITModule(
-        bundleBaseName = "localization.home",
-        modulePath = "home",
-        defaultPriority = -10000
-)
-@WebServlet(
-        name = "HomeModule",
-        urlPatterns = "/home/*"
-)
-public final class HomeModule extends AbstractLightPITServlet {
-
-    @RequestMapping(method = HttpMethod.GET)
-    public ResponseType handle(HttpServletRequest req) {
-
-        setDynamicFragment(req, "home");
-        setStylesheet(req, "home");
-
-        return ResponseType.HTML;
-    }
-}
--- a/src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java	Tue May 19 18:49:48 2020 +0200
+++ b/src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java	Tue May 19 19:34:57 2020 +0200
@@ -74,12 +74,6 @@
     }
 
     @RequestMapping(method = HttpMethod.GET)
-    public ResponseType indexRedirect(HttpServletResponse resp) throws IOException {
-        resp.sendRedirect("index/");
-        return ResponseType.NONE;
-    }
-
-    @RequestMapping(requestPath = "index", method = HttpMethod.GET, menuKey = "menu.index")
     public ResponseType index(HttpServletRequest req, DataAccessObjects dao) throws SQLException {
 
         final var projectList = dao.getProjectDao().list();
@@ -120,7 +114,7 @@
 
             dao.getProjectDao().saveOrUpdate(project);
 
-            setRedirectLocation(req, "./projects/index/");
+            setRedirectLocation(req, "./projects/");
             setDynamicFragment(req, Constants.DYN_FRAGMENT_COMMIT_SUCCESSFUL);
             LOG.debug("Successfully updated project {}", project.getName());
         } catch (NoSuchElementException | NumberFormatException | SQLException ex) {
@@ -135,8 +129,8 @@
         return ResponseType.HTML;
     }
 
-    @RequestMapping(requestPath = "versions", method = HttpMethod.GET, menuKey = "menu.versions")
-    public ResponseType versions(HttpServletRequest req, HttpServletResponse resp, DataAccessObjects dao) throws IOException, SQLException {
+    @RequestMapping(requestPath = "view", method = HttpMethod.GET)
+    public ResponseType view(HttpServletRequest req, HttpServletResponse resp, DataAccessObjects dao) throws IOException, SQLException {
         final var selectedProject = getSelectedProject(req, dao);
         if (selectedProject == null) {
             resp.sendError(HttpServletResponse.SC_FORBIDDEN);
@@ -144,7 +138,9 @@
         }
 
         req.setAttribute("versions", dao.getVersionDao().list(selectedProject));
-        setDynamicFragment(req, "versions");
+        req.setAttribute("issues", dao.getIssueDao().list(selectedProject));
+
+        setDynamicFragment(req, "project-details");
 
         return ResponseType.HTML;
     }
@@ -197,21 +193,6 @@
         return ResponseType.HTML;
     }
 
-
-    @RequestMapping(requestPath = "issues", method = HttpMethod.GET, menuKey = "menu.issues")
-    public ResponseType issues(HttpServletRequest req, HttpServletResponse resp, DataAccessObjects dao) throws IOException, SQLException {
-        final var selectedProject = getSelectedProject(req, dao);
-        if (selectedProject == null) {
-            resp.sendError(HttpServletResponse.SC_FORBIDDEN);
-            return ResponseType.NONE;
-        }
-
-        req.setAttribute("issues", dao.getVersionDao().list(selectedProject));
-        setDynamicFragment(req, "issues");
-
-        return ResponseType.HTML;
-    }
-
     @RequestMapping(requestPath = "issues/edit", method = HttpMethod.GET)
     public ResponseType editIssue(HttpServletRequest req, HttpServletResponse resp, DataAccessObjects dao) throws IOException, SQLException {
         final var selectedProject = getSelectedProject(req, dao);
--- a/src/main/resources/localization/home.properties	Tue May 19 18:49:48 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-# Copyright 2018 Mike Becker. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
-
-menuLabel = Home
-
-version=LightPIT - Version 0.1 (Snapshot) 
\ No newline at end of file
--- a/src/main/resources/localization/home_de.properties	Tue May 19 18:49:48 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-# Copyright 2018 Mike Becker. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
-
-menuLabel = Startseite
-
-version=LightPIT - Version 0.1 (Entwicklungsversion) 
--- a/src/main/resources/localization/lightpit.properties	Tue May 19 18:49:48 2020 +0200
+++ b/src/main/resources/localization/lightpit.properties	Tue May 19 19:34:57 2020 +0200
@@ -21,6 +21,8 @@
 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+version=LightPIT - Version 0.1 (Snapshot) 
+
 button.okay=OK
 button.cancel=Cancel
 
--- a/src/main/resources/localization/lightpit_de.properties	Tue May 19 18:49:48 2020 +0200
+++ b/src/main/resources/localization/lightpit_de.properties	Tue May 19 19:34:57 2020 +0200
@@ -21,6 +21,8 @@
 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+version=LightPIT - Version 0.1 (Entwicklungsversion) 
+
 button.okay=OK
 button.cancel=Abbrechen
 
--- a/src/main/resources/localization/projects.properties	Tue May 19 18:49:48 2020 +0200
+++ b/src/main/resources/localization/projects.properties	Tue May 19 19:34:57 2020 +0200
@@ -23,12 +23,9 @@
 
 menuLabel=Projects
 
-menu.index=Index
-menu.versions=Versions
-menu.issues=Issues
-
 button.create=New Project
 button.version.create=New Version
+button.issue.create=New Issue
 
 no-projects=Welcome to LightPIT. Start off by creating a new project!
 
@@ -48,4 +45,11 @@
 version.status.Unreleased=Unreleased
 version.status.Released=Released
 version.status.LTS=LTS
-version.status.Deprecated=Deprecated
\ No newline at end of file
+version.status.Deprecated=Deprecated
+
+thead.issue.subject=Subject
+thead.issue.category=Category
+thead.issue.status=Status
+thead.issue.created=Created
+thead.issue.updated=Updated
+thead.issue.eta=ETA
--- a/src/main/resources/localization/projects_de.properties	Tue May 19 18:49:48 2020 +0200
+++ b/src/main/resources/localization/projects_de.properties	Tue May 19 19:34:57 2020 +0200
@@ -23,12 +23,9 @@
 
 menuLabel=Projekte
 
-menu.index=Index
-menu.versions=Versionen
-menu.issues=Vorg\u00e4nge
-
 button.create=Neues Projekt
 button.version.create=Neue Version
+button.issue.create=Neuer Vorgang
 
 no-projects=Wilkommen bei LightPIT. Beginnen Sie mit der Erstellung eines Projektes!
 
@@ -49,3 +46,10 @@
 version.status.Released=Ver\u00f6ffentlicht
 version.status.LTS=Langzeitsupport
 version.status.Deprecated=Veraltet
+
+thead.issue.subject=Thema
+thead.issue.category=Kategorie
+thead.issue.status=Status
+thead.issue.created=Erstellt
+thead.issue.updated=Aktualisiert
+thead.issue.eta=Zieldatum
--- a/src/main/webapp/WEB-INF/dynamic_fragments/home.jsp	Tue May 19 18:49:48 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-<%--
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
-Copyright 2018 Mike Becker. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---%>
-<%@page pageEncoding="UTF-8" %>
-<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-
-<div class="smalltext">
-    <fmt:message key="version" />
-</div>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/webapp/WEB-INF/dynamic_fragments/project-details.jsp	Tue May 19 19:34:57 2020 +0200
@@ -0,0 +1,79 @@
+<%--
+DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+Copyright 2018 Mike Becker. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+--%>
+<%@page pageEncoding="UTF-8" %>
+<%@page import="de.uapcore.lightpit.Constants" %>
+<%@page import="de.uapcore.lightpit.modules.ProjectsModule" %>
+<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+
+<c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/>
+<c:set scope="page" var="selectedProject" value="${sessionScope[ProjectsModule.SESSION_ATTR_SELECTED_PROJECT]}"/>
+
+<jsp:useBean id="versions" type="java.util.List<de.uapcore.lightpit.entities.Version>" scope="request"/>
+<jsp:useBean id="issues" type="java.util.List<de.uapcore.lightpit.entities.Issue>" scope="request"/>
+
+<div id="tool-area">
+    <a href="./${moduleInfo.modulePath}/versions/edit" class="button"><fmt:message key="button.version.create" /></a>
+    <a href="./${moduleInfo.modulePath}/issues/edit" class="button"><fmt:message key="button.issue.create" /></a>
+</div>
+
+<c:if test="${not empty versions}">
+<table id="version-list" class="datatable medskip">
+    <thead>
+    <tr>
+        <th></th>
+        <th><fmt:message key="thead.version.name"/></th>
+        <th><fmt:message key="thead.version.status"/></th>
+    </tr>
+    </thead>
+    <tbody>
+    <c:forEach var="version" items="${versions}">
+        <tr class="nowrap" >
+            <td style="width: 2em;"><a href="./${moduleInfo.modulePath}/versions/edit?id=${version.id}">&#x270e;</a></td>
+            <td><c:out value="${version.name}"/></td>
+            <td><fmt:message key="version.status.${version.status}" /></td>
+        </tr>
+    </c:forEach>
+    </tbody>
+</table>
+</c:if>
+
+<table id="issue-list" class="datatable medskip">
+    <thead>
+    <tr>
+        <th></th>
+        <th><fmt:message key="thead.issue.subject" /></th>
+        <th><fmt:message key="thead.issue.category" /></th>
+        <th><fmt:message key="thead.issue.status" /></th>
+        <th><fmt:message key="thead.issue.created" /></th>
+        <th><fmt:message key="thead.issue.updated" /></th>
+        <th><fmt:message key="thead.issue.eta" /></th>
+        <!-- TODO: add other information -->
+    </tr>
+    </thead>
+    <!-- TODO: add actual list -->
+</table>
--- a/src/main/webapp/WEB-INF/dynamic_fragments/project-form.jsp	Tue May 19 18:49:48 2020 +0200
+++ b/src/main/webapp/WEB-INF/dynamic_fragments/project-form.jsp	Tue May 19 19:34:57 2020 +0200
@@ -69,7 +69,7 @@
         <tr>
             <td colspan="2">
                 <input type="hidden" name="id" value="${project.id}" />
-                <a href="./${moduleInfo.modulePath}/index/" class="button"><fmt:message bundle="${lightpit_bundle}" key="button.cancel"/></a>
+                <a href="./${moduleInfo.modulePath}/" class="button"><fmt:message bundle="${lightpit_bundle}" key="button.cancel"/></a>
                 <button type="submit"><fmt:message bundle="${lightpit_bundle}" key="button.okay" /></button>
             </td>
         </tr>
--- a/src/main/webapp/WEB-INF/dynamic_fragments/projects.jsp	Tue May 19 18:49:48 2020 +0200
+++ b/src/main/webapp/WEB-INF/dynamic_fragments/projects.jsp	Tue May 19 19:34:57 2020 +0200
@@ -65,9 +65,9 @@
     </thead>
     <tbody>
     <c:forEach var="project" items="${projects}">
-        <tr class="nowrap" <c:if test="${project eq selectedProject}">data-selected</c:if> >
+        <tr class="nowrap">
             <td style="width: 2em;"><a href="./${moduleInfo.modulePath}/edit?id=${project.id}">&#x270e;</a></td>
-            <td><a href="./${moduleInfo.modulePath}/index/?pid=${project.id}"><c:out value="${project.name}"/></a></td>
+            <td><a href="./${moduleInfo.modulePath}/view?pid=${project.id}"><c:out value="${project.name}"/></a></td>
             <td><c:out value="${project.description}"/></td>
             <td>
                 <c:if test="${not empty project.repoUrl}">
--- a/src/main/webapp/WEB-INF/dynamic_fragments/versions.jsp	Tue May 19 18:49:48 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-<%--
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
-Copyright 2018 Mike Becker. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---%>
-<%@page pageEncoding="UTF-8" %>
-<%@page import="de.uapcore.lightpit.Constants" %>
-<%@page import="de.uapcore.lightpit.modules.ProjectsModule" %>
-<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-
-<c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/>
-<c:set scope="page" var="selectedProject" value="${sessionScope[ProjectsModule.SESSION_ATTR_SELECTED_PROJECT]}"/>
-
-<jsp:useBean id="versions" type="java.util.List<de.uapcore.lightpit.entities.Version>" scope="request"/>
-
-<c:if test="${empty selectedProject}">
-    <div class="info-box">
-    <fmt:message key="no-projects" />
-    </div>
-</c:if>
-<c:if test="${not empty selectedProject}">
-<div id="tool-area">
-    <a href="./${moduleInfo.modulePath}/versions/edit" class="button"><fmt:message key="button.version.create" /></a>
-</div>
-
-<c:if test="${not empty versions}">
-<table id="project-list" class="datatable medskip">
-    <thead>
-    <tr>
-        <th></th>
-        <th><fmt:message key="thead.version.name"/></th>
-        <th><fmt:message key="thead.version.status"/></th>
-    </tr>
-    </thead>
-    <tbody>
-    <c:forEach var="version" items="${versions}">
-        <tr class="nowrap" >
-            <td style="width: 2em;"><a href="./${moduleInfo.modulePath}/versions/edit?id=${version.id}">&#x270e;</a></td>
-            <td><c:out value="${version.name}"/></td>
-            <td><fmt:message key="version.status.${version.status}" /></td>
-        </tr>
-    </c:forEach>
-    </tbody>
-</table>
-</c:if>
-</c:if>
--- a/src/main/webapp/WEB-INF/jsp/site.jsp	Tue May 19 18:49:48 2020 +0200
+++ b/src/main/webapp/WEB-INF/jsp/site.jsp	Tue May 19 19:34:57 2020 +0200
@@ -26,6 +26,7 @@
 --%>
 <%@page contentType="text/html" pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %>
 <%@page import="de.uapcore.lightpit.Constants" %>
+<%@page import="de.uapcore.lightpit.modules.ProjectsModule" %>
 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
 <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
@@ -39,9 +40,6 @@
 <%-- Define an alias for the main menu --%>
 <c:set scope="page" var="mainMenu" value="${requestScope[Constants.REQ_ATTR_MENU]}"/>
 
-<%-- Define an alias for the sub menu --%>
-<c:set scope="page" var="subMenu" value="${requestScope[Constants.REQ_ATTR_SUB_MENU]}"/>
-
 <%-- Define an alias for the fragment name --%>
 <c:set scope="page" var="fragment" value="${requestScope[Constants.REQ_ATTR_FRAGMENT]}"/>
 
@@ -59,6 +57,9 @@
 <fmt:setLocale scope="request" value="${sessionScope[Constants.SESSION_ATTR_LANGUAGE]}"/>
 </c:if>
 
+<%-- Selected project, if any --%>
+<c:set scope="page" var="selectedProject" value="${sessionScope[ProjectsModule.SESSION_ATTR_SELECTED_PROJECT]}"/>
+
 <!DOCTYPE html>
 <html>
     <head>
@@ -80,16 +81,23 @@
     <body>
         <div id="mainMenu">
             <c:forEach var="menu" items="${mainMenu}">
-                <%@ include file="../jspf/menu-entry.jspf" %>
+                <div class="menuEntry"
+                        <c:set var="menuPath" value="/${menu.pathName}"/>
+                        <c:if test="${fn:startsWith(requestPath, menuPath)}">
+                            data-active
+                        </c:if>
+                >
+                    <a href="${menu.pathName}">
+                        <fmt:bundle basename="${menu.resourceKey.bundle}">
+                            <fmt:message key="${menu.resourceKey.key}"/>
+                        </fmt:bundle>
+                    </a>
+                </div>
             </c:forEach>
         </div>
-        <c:if test="${not empty subMenu}">
-            <div id="subMenu">
-                <c:forEach var="menu" items="${subMenu}">
-                    <%@ include file="../jspf/menu-entry.jspf" %>
-                </c:forEach>
-            </div>
-        </c:if>
+        <div id="breadcrumbs">
+            <%-- TODO: find a strategy to define the breadcrumbs  --%>
+        </div>
         <div id="content-area">
             <c:if test="${not empty fragment}">
                 <fmt:setBundle scope="request" basename="${moduleInfo.bundleBaseName}"/>
--- a/src/main/webapp/WEB-INF/jspf/menu-entry.jspf	Tue May 19 18:49:48 2020 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-<%--
-DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
-Copyright 2018 Mike Becker. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
-notice, this list of conditions and the following disclaimer in the
-documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---%>
-<div class="menuEntry"
-        <c:set var="menuPath" value="/${menu.pathName}"/>
-        <c:if test="${fn:startsWith(requestPath, menuPath)}">
-            data-active
-        </c:if>
->
-    <a href="${menu.pathName}">
-        <fmt:bundle basename="${menu.resourceKey.bundle}">
-            <fmt:message key="${menu.resourceKey.key}"/>
-        </fmt:bundle>
-    </a>
-</div>
\ No newline at end of file
--- a/src/main/webapp/index.jsp	Tue May 19 18:49:48 2020 +0200
+++ b/src/main/webapp/index.jsp	Tue May 19 19:34:57 2020 +0200
@@ -25,8 +25,8 @@
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 --%>
 <%@page import="de.uapcore.lightpit.Functions" %>
-<%@page import="de.uapcore.lightpit.modules.HomeModule" %>
+<%@ page import="de.uapcore.lightpit.modules.ProjectsModule" %>
 <%
     response.setStatus(response.SC_MOVED_TEMPORARILY);
-    response.setHeader("Location", Functions.modulePathOf(HomeModule.class));
+    response.setHeader("Location", Functions.modulePathOf(ProjectsModule.class));
 %>
--- a/src/main/webapp/lightpit.css	Tue May 19 18:49:48 2020 +0200
+++ b/src/main/webapp/lightpit.css	Tue May 19 19:34:57 2020 +0200
@@ -47,7 +47,7 @@
     text-decoration: none;
 }
 
-#mainMenu, #subMenu {
+#mainMenu, #breadcrumbs {
     width: 100%;
     display: flex;
     flex-flow: row wrap;
@@ -62,7 +62,7 @@
     background: #e0e0e5;
 }
 
-#subMenu {
+#breadcrumbs {
     background: #f7f7ff;
 }
 
@@ -77,7 +77,7 @@
     background: #d0d0d5;
 }
 
-#subMenu .menuEntry[data-active] {
+#breadcrumbs .menuEntry[data-active] {
     background: #e7e7ef
 }
 
--- a/src/main/webapp/projects.css	Tue May 19 18:49:48 2020 +0200
+++ b/src/main/webapp/projects.css	Tue May 19 19:34:57 2020 +0200
@@ -26,7 +26,3 @@
  * POSSIBILITY OF SUCH DAMAGE.
  *
  */
-
-#project-list tr[data-selected] {
-    background: lightgoldenrodyellow;
-}

mercurial