summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/macros.html
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-03-02 11:10:29 +0100
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-03-03 11:41:16 +0100
commit3db3659499e7e59aa92a0103ec6bc6050cef5a4a (patch)
tree5b43df1156d1c5c880c2b85d4a40a58eb55d79cd /ogcp/templates/macros.html
parentdc8759d2b90b47b7009a74f69348560777c088c9 (diff)
Use pill style in confirmation pages
Draw selected clients from confirmation pages like selected clients from scopes and commands pages.
Diffstat (limited to 'ogcp/templates/macros.html')
-rw-r--r--ogcp/templates/macros.html18
1 files changed, 10 insertions, 8 deletions
diff --git a/ogcp/templates/macros.html b/ogcp/templates/macros.html
index 6999fd6..745b154 100644
--- a/ogcp/templates/macros.html
+++ b/ogcp/templates/macros.html
@@ -53,14 +53,16 @@
<div id="selected-clients" class="d-flex flex-wrap justify-content-center"></div>
{% endmacro %}
-{% macro cmd_selected_clients(ip_list) -%}
-<ul class="list-group mx-5 list-group-horizontal-sm d-flex flex-wrap">
-{% set max_clients = 50 %}
-{% for ip in ip_list[:max_clients] %}
- <li class="list-group-item flex-fill list-group-item-info">{{ ip }}</li>
- {% if loop.last %}
- <li class="list-group-item flex-fill list-group-item-info">...</li>
+{% macro cmd_selected_clients(selected_clients) -%}
+<div class="d-flex flex-wrap justify-content-center">
+ {% set max_clients = 50 %}
+ {% for name_id, ip in selected_clients[:max_clients] %}
+ <div id="pill-{{ name_id|replace(".", "_") }}" class="badge badge-pill badge-light">
+ {{ name_id }}<br>{{ ip }}
+ </div>
+ {% if loop.last and (selected_clients|length > max_clients) %}
+ <div class="badge badge-pill badge-light">...</div>
{% endif %}
{% endfor %}
-</ul>
+</div>
{% endmacro %}