add id to sections and use unique id for client-items
This commit is contained in:
parent
4ddc6bbf41
commit
5d2e3e00a3
|
@ -19,10 +19,12 @@
|
|||
{% endif %}
|
||||
{% for headline, list in objs %}
|
||||
{% if list|length > 0 %}
|
||||
{% set headline_id = headline|lower|replace(' ', '_') %}
|
||||
<h1>{{ headline }}</h2>
|
||||
<ul class="list-group">
|
||||
<ul class="list-group" id="{{ headline_id }}">
|
||||
{% for client, value in list %}
|
||||
<li id="{{ client.nick }}" onclick="window.location = '#{{ client.nick }}'" class="list-group-item{{ ' list-group-item-success' if client.connected else loop.cycle('" style="background-color: #eee;', '') }}">
|
||||
{% set id = headline_id + "." + client.nick %}
|
||||
<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;', '') }}">
|
||||
<span {% if not client.connected %}class="hint--right" data-hint="{{ client.last_seen|frmttime }}"{% endif %}>{{ client.nick }}{{ " (" + client.identifier + ")" if debug }}</span>
|
||||
<span class="badge">{{ value }}</span>
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue