# HG changeset patch # User Mike Becker # Date 1589726284 -7200 # Node ID 3e287f361c7a64b328d17dea469b9df9eebe8e6e # Parent ed51c5b1f3e52fef998523b9e350a602a4200961 moves project index to separate sub path unfortunately the current menu highlighting strategy sucks and this is the easiest way so that everything looks correct diff -r ed51c5b1f3e5 -r 3e287f361c7a src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java --- a/src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java Sun May 17 16:28:13 2020 +0200 +++ b/src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java Sun May 17 16:38:04 2020 +0200 @@ -63,7 +63,13 @@ public static final String SESSION_ATTR_SELECTED_PROJECT = fqn(ProjectsModule.class, "selected-project"); - @RequestMapping(method = HttpMethod.GET, menuKey = "menu.index") + @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(); req.setAttribute("projects", projectList); @@ -122,7 +128,7 @@ dao.getProjectDao().saveOrUpdate(project); - setRedirectLocation(req, "./projects/"); + setRedirectLocation(req, "./projects/index/"); setDynamicFragment(req, Constants.DYN_FRAGMENT_COMMIT_SUCCESSFUL); LOG.debug("Successfully updated project {}", project.getName()); } catch (NoSuchElementException | NumberFormatException | SQLException ex) { diff -r ed51c5b1f3e5 -r 3e287f361c7a src/main/webapp/WEB-INF/dynamic_fragments/project-form.jsp --- a/src/main/webapp/WEB-INF/dynamic_fragments/project-form.jsp Sun May 17 16:28:13 2020 +0200 +++ b/src/main/webapp/WEB-INF/dynamic_fragments/project-form.jsp Sun May 17 16:38:04 2020 +0200 @@ -69,7 +69,7 @@ - + diff -r ed51c5b1f3e5 -r 3e287f361c7a src/main/webapp/WEB-INF/dynamic_fragments/projects.jsp --- a/src/main/webapp/WEB-INF/dynamic_fragments/projects.jsp Sun May 17 16:28:13 2020 +0200 +++ b/src/main/webapp/WEB-INF/dynamic_fragments/projects.jsp Sun May 17 16:38:04 2020 +0200 @@ -67,7 +67,7 @@ data-selected > - +