blob: 2436c955d7660a449032e449417e68b33c0669e6 (
plain)
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
|
{% extends "layout.html" %}
{% block head%}
{{super()}}
{% endblock %}
{% block content %}
<div class="container">
<h1>{{ _('Registered users') }}</h1>
<table class="table table-striped">
<thead>
<tr>
<th>#</th>
<th>{{ _('Nickname') }}</th>
<th>{{ _('Email') }}</th>
<th>{{ _('Last seen') }}</th>
<th>{{ _('Actions') }}</th>
</tr>
</thead>
<tbody>
{% for user in users|sort(attribute="last_seen")|reverse %}
<tr {% if user.activation_key != "" %}class="warning"{% endif %}>
<td>{{ loop.index }}</td>
{% if user.id == current_user.id %}
<td><a href="{{ url_for("user.management") }}">{{ user.nickname }}</a> (It's you!)</td>
{% else %}
<td><a href="{{ url_for("admin.user", user_id=user.id) }}">{{ user.nickname }}</a></td>
{% endif %}
<td><a href="mailto:{{ user.email }}">{{ user.email }}</a></td>
<td class="date">{{ user.last_seen }}</td>
<td>
<a href="{{ url_for("admin.user", user_id=user.id) }}"><i class="glyphicon glyphicon-user" title="{{ _('View this user') }}"></i></a>
<a href="{{ url_for("admin.user_form", user_id=user.id) }}"><i class="glyphicon glyphicon-edit" title="{{ _('Edit this user') }}"></i></a>
{% if user.id != current_user.id %}
<a href="{{ url_for("admin.toggle_user", user_id=user.id) }}">
{% if user.activation_key == "" %}
<i class="glyphicon glyphicon-ban-circle" title="{{ _("Disable this account") }}"></i>
{% else %}
<i class="glyphicon glyphicon-ok-circle" title="{{ _("Enable this account") }}"></i>
{% endif %}
</a>
<a href="{{ url_for("admin.delete_user", user_id=user.id) }}"><i class="glyphicon glyphicon-remove" title="{{ _('Delete this user') }}" onclick="return confirm('{{ _('You are going to delete this account.') }}');"></i></a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ url_for("admin.user_form") }}" class="btn btn-default">{{ _('Add a new user') }}</a>
<h1>{{ _('Send notification messages') }}</h1>
<form action="" method="post">
{{ form.hidden_tag() }}
{{ form.subject.label }}
{{ form.subject(class_="form-control") }} {% for error in form.subject.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %}
{{ form.message.label }}
{{ form.message(class_="form-control", rows=8) }} {% for error in form.message.errors %} <span style="color: red;">{{ error }}<br /></span>{% endfor %}
<br />
{{ form.submit(class_="btn btn-default") }}
</form>
</div>
{% endblock %}
|