summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/macros.html
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/templates/macros.html')
-rw-r--r--ogcp/templates/macros.html9
1 files changed, 6 insertions, 3 deletions
diff --git a/ogcp/templates/macros.html b/ogcp/templates/macros.html
index eda57ed..077bad5 100644
--- a/ogcp/templates/macros.html
+++ b/ogcp/templates/macros.html
@@ -28,7 +28,8 @@
{% macro scopes_tree_collapse_level(scopes, parent_room, parent_id, state, selection_mode) -%}
{% for scope in scopes %}
- <li id="{{ scope["name"]|replace(".", "_")|replace(" ", "_") }}_{{ scope["id"] }}" class="nav-item">
+ {% set scope_name = scope["name"]|replace(".", "_")|replace(" ", "_") %}
+ <li id="{{ scope_name }}_{{ scope["id"] }}" class="nav-item">
{% set input_id = "input" ~ parent_id ~ "-" ~ loop.index %}
{% if scope["type"] == "server" %}
<input id="{{ input_id }}" class="form-check-input" type="checkbox" form="scopesForm"
@@ -62,8 +63,10 @@
{% if scope.get("selected", False) %}checked{% endif %}
name="{{ scope["name"] }}_{{ scope["id"] }}" />
{% endif %}
- <a class="nav-link {% if not scope["scope"] %}disabled{% endif %}" href="#scope{{parent_id ~ "-" ~ loop.index}}"
- {% if scope["scope"] %}data-toggle="collapse"{% endif %}>
+ <a class="nav-link {% if not scope["scope"] %}disabled{% endif %}"
+ id="{{ scope["type"] }}-{{ scope.get('id', scope_name) }}"
+ href="#scope{{parent_id ~ "-" ~ loop.index}}"
+ {% if scope["scope"] %}data-toggle="collapse"{% endif %}>
{% if "state" in scope %}
<i class="nav-icon fa-circle
{% if scope['state'] == 'OPG' %}fas text-warning