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
{% if brand_logo_url %}{% endif %}
{{ brand_name | default(value="Rustango Admin") }}
{% if brand_tagline %}{{ brand_tagline }}{% endif %}
Home
Activity
{# #253 follow-up — Change-password link moved into the
Logout form at the bottom of the sidebar to keep all
account actions in one place. The old standalone
link above the model list is intentionally removed. #}
{% if sidebar_groups %}
{% for group in sidebar_groups %}
{{ group.app }}
{% for m in group.models %}
{{ m.name }}
{% endfor %}
{% endfor %}
{% else %}
No models registered.
{% endif %}
{# #253 — sidebar Logout button. Rendered as a POST form so a
cross-site GET can't sign the operator out. The chrome
context only sets `session_user` when the session-auth
middleware seated an `AdminSession` on the request. #}
{% if session_user %}
{% if session_user.username %}
Signed in as {{ session_user.username }}
{% else %}
Signed in
{% endif %}
{% if session_user.is_superuser %}(superuser){% endif %}
{% if change_password_url %}
Change password
{% endif %}
Logout
{% endif %}