This repository has been archived on 2024-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
tracman-server/views/admin/users.html

66 lines
1.5 KiB
HTML
Raw Normal View History

2016-03-21 18:03:37 -06:00
{% extends 'templates/base.html' %}
{% block title %}Tracman | Users{% endblock %}
2016-03-26 17:04:56 -06:00
{% block head %}
2016-03-31 15:01:27 -06:00
{{ super() }}
2016-03-21 18:03:37 -06:00
<style>
.container { max-width:90%; }
</style>
2016-03-26 17:04:56 -06:00
{% endblock %}
2016-03-21 18:03:37 -06:00
2016-03-26 17:04:56 -06:00
{% block main %}
2016-03-21 18:03:37 -06:00
<section class='dark'>
<div class='container'>
<h1>Users</h1>
<table id='users-table' class='table table-hover'>
<thead><tr>
<th>Name</th>
<th>Slug</th>
<th>Joined</th>
<th>Last login</th>
<th>Moved</th>
</tr></thead>
<tbody>
{% for usr in users %}
<tr>
<td>{{ usr.name }}</td>
<td><a href="/trac/{{ usr.slug }}">/{{ usr.slug }}</a></td>
<td id='{{ usr.id }}-created'></td>
<td id='{{ usr.id }}-logged'></td>
<td id='{{ usr.id }}-moved'></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
<script src="/static/js/moment.min.js"></script>
<script>
{% for usr in users %}
{% if usr.created %}
$('#{{ usr.id }}-created').text(
moment("{{ usr.created }}", "ddd MMM DD YYYY HH:mm:ss [GMT]ZZ").format('l')
);
{% endif %}
{% if usr.lastLogin %}
$('#{{ usr.id }}-logged').text(
moment("{{ usr.lastLogin }}", "ddd MMM DD YYYY HH:mm:ss [GMT]ZZ").fromNow()
);
{% endif %}
2016-03-31 15:01:27 -06:00
{% if usr.last.time %}
2016-03-21 18:03:37 -06:00
$('#{{ usr.id }}-moved').text(
moment("{{ usr.last.time }}", "ddd MMM DD YYYY HH:mm:ss [GMT]ZZ").fromNow()
);
2016-03-31 15:01:27 -06:00
{% else %}
$('#{{ usr.id }}-moved').text("never");
2016-03-21 18:03:37 -06:00
{% endif %}
{% endfor %}
</script>
{% endblock %}