Display contacts, popup for image, cleanup of more info

pull/576/head
Justin Richer 11 years ago
parent bf6e6b64c3
commit dd391ebf3c

@ -4,6 +4,7 @@
<%@ taglib prefix="authz" uri="http://www.springframework.org/security/tags"%> <%@ taglib prefix="authz" uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="o" tagdir="/WEB-INF/tags"%> <%@ taglib prefix="o" tagdir="/WEB-INF/tags"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<o:header title="Approve Access" /> <o:header title="Approve Access" />
<o:topbar /> <o:topbar />
<div class="container main"> <div class="container main">
@ -38,46 +39,74 @@
<%-- TODO: wire up to stats engine and customize display of this block --%> <%-- TODO: wire up to stats engine and customize display of this block --%>
<c:if test="${ client.dynamicallyRegistered }"> <c:if test="${ client.dynamicallyRegistered }">
<div class="alert alert-block"> <div class="alert alert-block <c:out value="${ count eq 0 ? 'alert-error' : 'alert-warn' }" />">
<h4> <h4>
<i class="icon-globe"></i> Caution: <i class="icon-globe"></i> Caution:
</h4> </h4>
This software was dynamically registered and has been used by This software was dynamically registered and it has been approved
<span class="label"><c:out value="${ count }" /></span> <span class="label"><c:out value="${ count }" /></span>
user<c:out value="${ count == 1 ? '' : 's' }"/>. time<c:out value="${ count == 1 ? '' : 's' }"/> previously.
</div> </div>
</c:if> </c:if>
<c:if test="${ not empty client.logoUri }"> <c:if test="${ not empty client.logoUri }">
<ul class="thumbnails"> <ul class="thumbnails">
<li class="span4"> <li class="span5">
<div class="thumbnail"> <a class="thumbnail" data-toggle="modal" data-target="#logoModal"><img src="${client.logoUri }" /></a>
<img src="${client.logoUri }" />
</div>
</li> </li>
</ul> </ul>
</c:if> <!-- Modal -->
<div class="alert alert-info"> <div id="logoModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="logoModalLabel" aria-hidden="true">
${client.clientDescription} <div class="modal-header">
<c:if test="${ (not empty client.clientUri) || (not empty client.policyUri) || (not empty client.tosUri) }"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<div> <h3 id="logoModalLabel">
<a id="toggleMoreInformation" class="small" href="#"><i class="icon-chevron-right"></i> more information</a> <c:choose>
</div> <c:when test="${empty client.clientName}">
<div id="moreInformation" class="hide"> <em><c:out value="${client.clientId}" /></em>
<ul> </c:when>
<c:otherwise>
<em><c:out value="${client.clientName}" /></em>
</c:otherwise>
</c:choose>
</h3>
</div>
<div class="modal-body">
<img src="${client.logoUri }" />
<c:if test="${ not empty client.clientUri }"> <c:if test="${ not empty client.clientUri }">
<li>Home page: <a href="<c:out value="${ client.clientUri }" />"><c:out value="${ client.clientUri }" /></a> <a href="<c:out value="${ client.clientUri }" />"><c:out value="${ client.clientUri }" /></a>
</c:if>
<c:if test="${ not empty client.policyUri }">
<li>Policy: <a href="<c:out value="${ client.policyUri }" />"><c:out value="${ client.policyUri }" /></a>
</c:if>
<c:if test="${ not empty client.tosUri }">
<li>Terms of Service: <a href="<c:out value="${ client.tosUri }" />"><c:out value="${ client.tosUri }" /></a>
</c:if> </c:if>
</ul> </div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</div>
</c:if>
<c:if test="${ (not empty client.clientDescription) || (not empty client.clientUri) || (not empty client.policyUri) || (not empty client.tosUri) || (not empty contacts) }">
<div class="alert alert-info">
${client.clientDescription}
<c:if test="${ (not empty client.clientUri) || (not empty client.policyUri) || (not empty client.tosUri) || (not empty contacts) }">
<div id="toggleMoreInformation" style="cursor: pointer;">
<i class="icon-chevron-right"></i> more information
</div>
<div id="moreInformation" class="hide">
<ul>
<c:if test="${ not empty client.clientUri }">
<li>Home page: <a href="<c:out value="${ client.clientUri }" />"><c:out value="${ client.clientUri }" /></a></li>
</c:if>
<c:if test="${ not empty client.policyUri }">
<li>Policy: <a href="<c:out value="${ client.policyUri }" />"><c:out value="${ client.policyUri }" /></a></li>
</c:if>
<c:if test="${ not empty client.tosUri }">
<li>Terms of Service: <a href="<c:out value="${ client.tosUri }" />"><c:out value="${ client.tosUri }" /></a></li>
</c:if>
<c:if test="${ (not empty contacts) }">
<li>Administrative Contacts: <c:out value="${ contacts }" /></li>
</c:if>
</ul>
</div>
</c:if>
</div> </div>
</c:if> </c:if>
</div>
<div> <div>
<c:choose> <c:choose>
<c:when test="${ empty client.redirectUris }"> <c:when test="${ empty client.redirectUris }">
@ -91,10 +120,8 @@
</div> </div>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<small> You will be redirected to the following page
<strong>You will be redirected to the following page if you click Approve: <code><c:out value="${redirect_uri}" /></code>
if you click Approve: </strong><code><c:out value="${redirect_uri}" /></code>
</small>
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
</div> </div>
@ -141,7 +168,7 @@
data-html="true" data-html="true"
data-placement="right" data-placement="right"
data-trigger="hover" data-trigger="hover"
data-title="Claim values:" data-title="These values will be sent:"
data-content="<div style=&quot;text-align: left;&quot;> data-content="<div style=&quot;text-align: left;&quot;>
<ul> <ul>
<c:forEach var="claim" items="${ claims[scope.value] }"> <c:forEach var="claim" items="${ claims[scope.value] }">

@ -46,6 +46,7 @@ import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.SessionAttributes; import org.springframework.web.bind.annotation.SessionAttributes;
import com.google.common.base.Joiner;
import com.google.common.base.Splitter; import com.google.common.base.Splitter;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
@ -174,6 +175,13 @@ public class OAuthConfirmationController {
model.put("count", count); model.put("count", count);
// contacts
if (client.getContacts() != null) {
String contacts = Joiner.on(", ").join(client.getContacts());
model.put("contacts", contacts);
}
return "approve"; return "approve";
} }

Loading…
Cancel
Save