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('.') %}
2017-02-27 16:16:16 -05:00
<h2><a href="#{{ headline_id }}">{{ headline }}</a></h2>
2017-02-25 07:26:38 -05:00
<ul class="list-group my-3" id="{{ headline_id }}">
2016-11-22 16:59:57 -05:00
{% for client, value in clients %}
{% set id = [headline_id, client.nick|striptags]|join('.') %}
2017-02-24 18:19:12 -05:00
<li id="{{ id }}" class="list-group-item justify-content-between{{ ' list-group-item-success' if client.connected else loop.cycle('" style="background-color: #eee;', '') }}">
2017-02-27 16:16:16 -05:00
<span class="hint--right hint--medium--xs" data-hint="{{ client.nick_history|join(', ') }}"><a href="#{{ id }}">{{ client.nick }}{{ " (" + client.identifier + ")" if debug }}</a></span>
2017-02-24 18:19:12 -05:00
<span class="badge badge-default badge-pill"><div{% if not client.connected and headline == 'Onlinetime' %} class="hint--left" data-hint="{{ client.last_seen|lastseen }}"{% 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 %}