2016-11-22 16:59:57 -05:00
{% set clients = server.clients %}
{% for headline, clients in [
('Onlinetime', clients.onlinetime),
('Kicks', clients.kicks),
('Passive kicks', clients.pkicks),
('Bans', clients.bans),
('Passive bans', clients.pbans)
] %}
{% if clients|length > 0 %}
{% set headline_id = [server.sid, headline|lower|replace(' ', '_')]|join('.') %}
2016-11-10 15:57:30 -05:00
<h2 onclick="window.location = '#{{ headline_id }}'">{{ headline }}</h2>
2016-06-10 10:04:24 -04:00
<ul class="list-group" id="{{ headline_id }}">
2016-11-22 16:59:57 -05:00
{% for client, value in clients %}
{% set id = [headline_id, client.nick|striptags]|join('.') %}
2016-06-10 10:04:24 -04:00
<li id="{{ id }}" onclick="window.location = '#{{ id }}'" class="list-group-item{{ ' list-group-item-success' if client.connected else loop.cycle('" style="background-color: #eee;', '') }}">
2017-02-10 17:04:52 -05:00
<span>{{ client.nick }}{{ " (" + client.identifier + ")" if debug }}</span>
2017-02-10 17:34:23 -05:00
<span class="badge"><div{% if not client.connected and headline == 'Onlinetime' %} class="hint--left" data-hint="{{ client.last_seen|frmttime }}"{% endif %}>{{ value }}</div></span>
2015-08-27 06:28:00 -04:00
</li>
2015-06-08 15:25:37 -04:00
{% endfor %}
</ul>
{% endif %}
{% endfor %}