Added about, contact, and stats pages. Still largely placeholders, but the topbar works correctly now at least.
parent
0be254c99a
commit
3399eed45a
|
@ -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<String, Integer> 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/**")
|
||||
|
|
|
@ -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" %>
|
||||
<c:choose>
|
||||
|
@ -35,10 +36,38 @@
|
|||
<a class="brand" href="">OpenID Connect Server</a>
|
||||
<div class="nav-collapse collapse">
|
||||
<ul class="nav">
|
||||
<li class="active"><a href="">Home</a></li>
|
||||
<li><a href="about">About</a></li>
|
||||
<li><a href="stats">Statistics</a></li>
|
||||
<li><a href="contact">Contact</a></li>
|
||||
<c:choose>
|
||||
<c:when test="${pageName == 'Home' || empty pageName}">
|
||||
<li class="active"><a href="">Home</a></li>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<li><a href="">Home</a></li>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<c:choose>
|
||||
<c:when test="${pageName == 'About'}">
|
||||
<li class="active"><a href="">About</a></li>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<li><a href="about">About</a></li>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<c:choose>
|
||||
<c:when test="${pageName == 'Statistics'}">
|
||||
<li class="active"><a href="">Statistics</a></li>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<li><a href="stats">Statistics</a></li>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<c:choose>
|
||||
<c:when test="${pageName == 'Contact'}">
|
||||
<li class="active"><a href="">Contact</a></li>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<li><a href="contact">Contact</a></li>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</ul>
|
||||
<ul class="nav pull-right">
|
||||
<security:authorize access="hasRole('ROLE_USER')">
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ taglib prefix="o" tagdir="/WEB-INF/tags" %>
|
||||
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
|
||||
|
||||
<!-- TODO: highlight proper section of topbar; what is the right way to do this? -->
|
||||
|
||||
<o:header title="welcome"/>
|
||||
<o:topbar pageName="About"/>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<o:sidebar/>
|
||||
<div class="span10">
|
||||
<!-- Main hero unit for a primary marketing message or call to action -->
|
||||
<div class="hero-unit">
|
||||
|
||||
<p>
|
||||
This OpenID Connect service is built from the MITREid Connect Open Source project started by The MITRE Corporation.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<o:copyright/>
|
||||
<o:footer/>
|
|
@ -0,0 +1,30 @@
|
|||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ taglib prefix="o" tagdir="/WEB-INF/tags" %>
|
||||
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
|
||||
|
||||
<!-- TODO: highlight proper section of topbar; what is the right way to do this? -->
|
||||
|
||||
<o:header title="welcome"/>
|
||||
<o:topbar pageName="Contact"/>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<o:sidebar/>
|
||||
<div class="span10">
|
||||
<!-- Main hero unit for a primary marketing message or call to action -->
|
||||
<div class="hero-unit">
|
||||
|
||||
<h2>Contact</h2>
|
||||
<p>
|
||||
For general assistance, email Bob at <a href="mailto:email@address.com?Subject=OIDC%20Server%20Assistance">email@address.com</a>.
|
||||
To offer feedback, email Sue at <a href="mailto:email@address.com?Subject=OIDC%20Server%20Feedback">email@address.com</a>.
|
||||
To report a system failure or bug report, email Joe at <a href="mailto:email@address.com?Subject=OIDC%20Server%20Failure">email@address.com</a>.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<o:copyright/>
|
||||
<o:footer/>
|
|
@ -0,0 +1,28 @@
|
|||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ taglib prefix="o" tagdir="/WEB-INF/tags" %>
|
||||
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
|
||||
|
||||
<!-- TODO: highlight proper section of topbar; what is the right way to do this? -->
|
||||
|
||||
<o:header title="welcome"/>
|
||||
<o:topbar pageName="Statistics"/>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<o:sidebar/>
|
||||
<div class="span10">
|
||||
<!-- Main hero unit for a primary marketing message or call to action -->
|
||||
<div class="hero-unit">
|
||||
<h2>Current Statistics</h2>
|
||||
|
||||
<p>There have been <span class="label label-info">${statsSummary["userCount"]}</span> users of this
|
||||
system who have logged in to <span class="label label-info">${statsSummary["clientCount"]}</span>
|
||||
total sites, for a total of <span class="label label-info">${statsSummary["approvalCount"]}</span> site approvals.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<o:copyright/>
|
||||
<o:footer/>
|
Loading…
Reference in New Issue