133 lines
No EOL
2.8 KiB
Text
133 lines
No EOL
2.8 KiB
Text
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
|
pageEncoding="UTF-8"%>
|
|
<%@ page import="java.util.Map"%>
|
|
<%@ page import="java.util.HashMap"%>
|
|
<%@ page import="java.util.List"%>
|
|
<%@ page import="java.util.ArrayList"%>
|
|
<%@ page import="java.util.Set"%>
|
|
<%@ page import="java.util.HashSet"%>
|
|
<%@ page import="java.util.Collections"%>
|
|
<%@ page import="java.util.Comparator"%>
|
|
<%@ page import="com.stephenschafer.email.Mapping"%>
|
|
<%@ page import="com.stephenschafer.email.Util"%>
|
|
<%@ page import="com.stephenschafer.email.User"%>
|
|
<%
|
|
final String address = request.getParameter("address");
|
|
final User user = Util.identify(session);
|
|
if (user == null) {
|
|
session.setAttribute("return-servlet-path", request.getServletPath());
|
|
session.setAttribute("return-query-string", request.getQueryString());
|
|
response.sendRedirect("login.jsp");
|
|
return;
|
|
}
|
|
Util.updateSession(session);
|
|
@SuppressWarnings("unchecked")
|
|
final List<String> targetList = (List<String>) session.getAttribute("target-list");
|
|
final Mapping mapping = address == null ? null : Util.getMapping(address);
|
|
final String username = user.getName();
|
|
final String header = "Mapping";
|
|
final String descriptionValue = mapping == null ? "" : mapping.getDisplayDescription();
|
|
final String dateValue = mapping == null ? "" : mapping.getFormattedDate();
|
|
%>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title>Mapping</title>
|
|
<style>
|
|
body {
|
|
font-family: sans-serif;
|
|
font-size: 10pt;
|
|
color: #333;
|
|
}
|
|
table {
|
|
font-family: inherit;
|
|
font-size: inherit;
|
|
}
|
|
table.mapping tr td {
|
|
padding-right: 1em;
|
|
}
|
|
table.mapping tr td:first-of-type {
|
|
white-space: nowrap;
|
|
}
|
|
div.buttons {
|
|
margin-top: 2em;
|
|
}
|
|
@media only screen and (min-resolution:2x) {
|
|
body {
|
|
font-size: 300%;
|
|
}
|
|
h1 {
|
|
display: none;
|
|
}
|
|
button {
|
|
margin-bottom: .5em;
|
|
font-size: inherit;
|
|
}
|
|
input {
|
|
display: block;
|
|
margin-bottom: .5em;
|
|
font-size: inherit;
|
|
}
|
|
input[type="checkbox"] {
|
|
width: 1em;
|
|
height: 1em;
|
|
}
|
|
select {
|
|
display: block;
|
|
margin-bottom: .5em;
|
|
font-size: inherit;
|
|
}
|
|
label {
|
|
display: block;
|
|
margin-bottom: .5em;
|
|
font-size: inherit;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body">
|
|
<h1><%=header %></h1>
|
|
<table class="mapping">
|
|
|
|
<tr>
|
|
<td>Target</td>
|
|
<td>
|
|
<%=mapping.getTarget()%>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>Email Address</td>
|
|
<td>
|
|
<%=mapping.getAddress()%>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>Description</td>
|
|
<td>
|
|
<%=mapping.getDisplayDescription()%>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>Date</td>
|
|
<td>
|
|
<%=mapping.getFormattedDate()%>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>Disabled</td>
|
|
<td>
|
|
<%=mapping.isDisabled() ? "true" : "false" %>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
<div class="buttons">
|
|
<button type="button" onclick="window.location.href='edit.jsp?mobile=true'">New</button>
|
|
</div>
|
|
</body>
|
|
</html> |