<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Accounts</title>
<link type="text/css" rel="stylesheet" href="/css/style.css" />
<link type="text/css" rel="stylesheet" href="/css/tablesorter.css" />
<script type="text/javascript" src="/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="/js/jquery.tablesorter.min.js"></script>
</head>
<body onload="load()">
{% if error %}
<div>{{ errorMessage }}</div>
{% else %}
<div>
<table>
<thead>
<tr>
<th>User Name</th>
<th>User Oid</th>
<th>Created</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ user.name }}</td><td>{{ user.oid }}</td><td>{{ user.created }}</td>
</tr>
</tbody>
</table>
</div>
<br/>
<div>
<table>
<thead>
<tr>
<th>Account Name</th>
<th>Account Oid</th>
<th>Created</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ account.name }}</td><td>{{ account.oid }}</td>
<td><script type="text/javascript">
var d = new Date( {{ account.created }} * 1000 );
document.write( d.toISOString() )
</script>
<em>({{ account.created }})</em>
</td>
</tr>
</tbody>
</table>
</div><br/>
<strong>Users</strong>
<div>
<table id="users" class="tablesorter">
<thead>
<tr>
<th>User Name</th>
<th>User Oid</th>
<th>Created</th>
</tr>
</thead>
<tbody>
{% for item in users %}
<tr>
<td>{{ item.oid }}</td><td>{{ item.name }}</td><td>{{ item.created }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<br/>
<strong>Spaces</strong>
<div>
<table id="spaces" class="tablesorter">
<thead>
<tr>
<th>Space Oid</th>
<th>Space Name</th>
<th>Created</th>
</tr>
</thead>
<tbody>
{% for item in spaces %}
<tr>
<td>{{ item.oid }}</td><td>{{ item.name }}</td><td>{{ item.created }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<br/>
<script type="text/javascript">
$(document).ready(function() {
$("#users").tablesorter( {sortList:[[0,0]]} );
$("#spaces").tablesorter( {sortList:[[0,0]]} );
});
function load() {
alert("Page is loaded");
}
</script>
{% endif %}
</body>
</html>