summaryrefslogtreecommitdiffstats
path: root/ogcp/templates
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/templates')
-rw-r--r--ogcp/templates/macros.html10
-rw-r--r--ogcp/templates/tree.html2
2 files changed, 6 insertions, 6 deletions
diff --git a/ogcp/templates/macros.html b/ogcp/templates/macros.html
index e114692..5e10b0f 100644
--- a/ogcp/templates/macros.html
+++ b/ogcp/templates/macros.html
@@ -23,9 +23,9 @@
{% endmacro %}
-{% macro scopes_tree_collapse_level(scopes, parent_room, parent_id, state, selection_mode) -%}
+{% macro scopes_tree_collapse_level(scopes, parent_server, parent_room, parent_id, state, selection_mode) -%}
{% for scope in scopes %}
- <li id="{{ scope["name"]|replace(".", "_")|replace(" ", "_") }}_{{ scope["id"] }}" class="nav-item">
+ <li id="{{ parent_server }}_{{ scope["name"]|replace(".", "_")|replace(" ", "_") }}_{{ scope["id"] }}" class="nav-item">
{% if scope["type"] == "server" %}
<input class="form-check-input" type="checkbox" form="scopesForm"
value="{{ scope["server_ip_port"] }}" onclick="return false;"
@@ -53,7 +53,7 @@
{% 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}}"
+ <a class="nav-link {% if not scope["scope"] %}disabled{% endif %}" href="#{{parent_server ~ parent_id ~ "-" ~ loop.index}}"
{% if scope["scope"] %}data-toggle="collapse"{% endif %}>
{% if "state" in scope %}
<i class="nav-icon fa-circle
@@ -70,8 +70,8 @@
{{ scope["name"] }}
</a>
{% if scope["scope"] %}
- <ul class="nav flex-column collapse level{{i}}" id="scope{{parent_id ~ "-" ~ loop.index}}">
- {{ scopes_tree_collapse_level(scope["scope"], parent_room, parent_id ~ "-" ~ loop.index, state, selection_mode) }}
+ <ul class="nav flex-column collapse level{{i}}" id="{{parent_server ~ parent_id ~ "-" ~ loop.index}}">
+ {{ scopes_tree_collapse_level(scope["scope"], parent_server, parent_room, parent_id ~ "-" ~ loop.index, state, selection_mode) }}
</ul>
{% endif %}
</li>
diff --git a/ogcp/templates/tree.html b/ogcp/templates/tree.html
index fc06105..5cc53c9 100644
--- a/ogcp/templates/tree.html
+++ b/ogcp/templates/tree.html
@@ -1,2 +1,2 @@
{% import "macros.html" as macros %}
-{{ macros.scopes_tree_collapse_level(scopes["scope"], '', '', '', 'scopes') }}
+{{ macros.scopes_tree_collapse_level(scopes["scope"], parent_server, '', '', '', 'scopes') }}