/
account.html
92 lines (84 loc) · 3.13 KB
/
account.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
{% extends "base.html" %}
{% set active_page = "account" %}
{% block title %} Your account {% endblock %}
{% block divs %}
<h2> Account overview for {{ logged_in_user.username }} </h2>
<div class="container-fluid">
<div class="row">
<div class="col-sm-1">
<form action="/logout" method="get">
<button class="btn btn-sm btn-responsive btn-info" type="submit">Log out</button>
</form>
</div>
<div class="col-sm-2">
<form action="/users/reset_password_for/{{ logged_in_user.id }}" method="get">
<button class="btn btn-sm btn-responsive btn-info" type="submit">Send password reset instructions</button>
</form>
</div>
<div class="col-sm-9">
{% if user_is_admin %}
<form action="/users" method="get">
<button class="btn btn-sm btn-responsive btn-info" type="submit">List active users</button>
</form>
{% endif %}
</div>
<div class="row" style="margin-top: 4em;">
<div class="col-sm-12">
<table class="table">
<tbody>
<tr>
<td>
Email address
</td>
<td>
{{logged_in_user.email }}
</td>
</tr>
<tr>
<td>
Time Zone
</td>
<td>
{{logged_in_user.timezone }}
</td>
</tr>
<tr>
<td>
Last login was
</td>
<td>
{{ logged_in_user.last_login_at | localized_datetime }}
</td>
</tr>
<tr>
<td>
Assets owned
</td>
<td>
<a href="/assets">{{ num_assets }}</a>
</td>
</tr>
<tr>
<td>
Roles
</td>
<td>
{{ roles }}
</td>
</tr>
{% if not user_is_anonymous %}
<tr>
<td>
Fresh access token
</td>
<td>
{{ logged_in_user.get_auth_token() }}
</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}