From 3399eed45ad96a126a9bc8845a27778505b0edc6 Mon Sep 17 00:00:00 2001 From: Amanda Anganes Date: Thu, 31 Jan 2013 11:14:59 -0500 Subject: [PATCH] Added about, contact, and stats pages. Still largely placeholders, but the topbar works correctly now at least. --- .../openid/connect/web/ManagerController.java | 20 ++++++++++ .../src/main/webapp/WEB-INF/tags/topbar.tag | 37 +++++++++++++++++-- .../src/main/webapp/WEB-INF/views/about.jsp | 27 ++++++++++++++ .../src/main/webapp/WEB-INF/views/contact.jsp | 30 +++++++++++++++ .../src/main/webapp/WEB-INF/views/stats.jsp | 28 ++++++++++++++ 5 files changed, 138 insertions(+), 4 deletions(-) create mode 100644 openid-connect-server/src/main/webapp/WEB-INF/views/about.jsp create mode 100644 openid-connect-server/src/main/webapp/WEB-INF/views/contact.jsp create mode 100644 openid-connect-server/src/main/webapp/WEB-INF/views/stats.jsp diff --git a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ManagerController.java b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ManagerController.java index 11dfeb40f..04a4a5a3e 100644 --- a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ManagerController.java +++ b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ManagerController.java @@ -43,6 +43,26 @@ public class ManagerController { return "home"; } + + @RequestMapping({"about", "about/"}) + public String showAboutPage(ModelMap m) { + return "about"; + } + + @RequestMapping({"stats", "stats/"}) + public String showStatsPage(ModelMap m) { + + Map summary = statsService.calculateSummaryStats(); + + m.put("statsSummary", summary); + + return "stats"; + } + + @RequestMapping({"contact", "contact/"}) + public String showContactPage(ModelMap m) { + return "contact"; + } @PreAuthorize("hasRole('ROLE_USER')") // TODO: this probably shouldn't be here @RequestMapping("manage/**") diff --git a/openid-connect-server/src/main/webapp/WEB-INF/tags/topbar.tag b/openid-connect-server/src/main/webapp/WEB-INF/tags/topbar.tag index 443ade3a5..17cd8bc4c 100644 --- a/openid-connect-server/src/main/webapp/WEB-INF/tags/topbar.tag +++ b/openid-connect-server/src/main/webapp/WEB-INF/tags/topbar.tag @@ -1,3 +1,4 @@ +<%@attribute name="pageName" required="false" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %> @@ -35,10 +36,38 @@ OpenID Connect Server