62 lines
1.7 KiB
HTML
62 lines
1.7 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<h3>users</h3>
|
|
<hr>
|
|
<table id="users" class="display" style="width:100%">
|
|
<thead>
|
|
<tr>
|
|
<th>name</th>
|
|
<th>registered on</th>
|
|
<th>online</th>
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for user in users %}
|
|
<tr>
|
|
<td>
|
|
<a class="plain" href="{{ url_for('main.user', userName=user.name) }}">
|
|
{{user.name}}
|
|
</a>
|
|
</td>
|
|
<td data-order="{{ user.createdAt }}">
|
|
<span data-toggle="tooltip" data-placement="right" title="{{ user.createdAt | fmt_datetime }}">
|
|
{{user.createdAt | htime_dt }}
|
|
</span>
|
|
</td>
|
|
<td data-filter="{{ online[user.name] | fancyOnline }}">
|
|
{{online[user.name] | fancyBool | safe }}
|
|
</td>
|
|
<td class="no-sort">
|
|
<span data-toggle="tooltip" data-placement="right" title="delete">
|
|
<a class="nodeco" href="{{ url_for('rest.deleteUser', userName=user.name) }}">
|
|
<i class="fas fa-trash"></i>
|
|
</a>
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<script>
|
|
$(function () {
|
|
new DataTable('#users', {
|
|
paging: true,
|
|
lengthMenu: [15, 30, 50, 100, { label: 'All', value: -1 }],
|
|
pageLength: 30,
|
|
fixedHeader: false,
|
|
select: false,
|
|
keys: false,
|
|
aoColumnDefs: [
|
|
{ 'bSortable': false, 'aTargets': [ -1 ] }
|
|
],
|
|
});
|
|
})
|
|
</script>
|
|
{% endblock %}
|