mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Fix appending values to lists in templates
This commit is contained in:
parent
065d6a5025
commit
0ec7c6c5f8
3 changed files with 7 additions and 7 deletions
4
src/ui/templates/bans.html
vendored
4
src/ui/templates/bans.html
vendored
|
|
@ -5,10 +5,10 @@
|
|||
{% set terms = [] %}
|
||||
{% for ban in bans %}
|
||||
{% if ban["reason"] not in reasons %}
|
||||
{% set reasons = reasons.append(ban["reason"]) %}
|
||||
{% if reasons.append(ban["reason"]) %}{% endif %}
|
||||
{% endif %}
|
||||
{% if ban["term"] not in terms %}
|
||||
{% set terms = terms.append(ban["term"]) %}
|
||||
{% if terms.append(ban["term"]) %}{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<!-- actions -->
|
||||
|
|
|
|||
8
src/ui/templates/reports.html
vendored
8
src/ui/templates/reports.html
vendored
|
|
@ -6,16 +6,16 @@
|
|||
{% set countries = [] %}
|
||||
{% for report in reports %}
|
||||
{% if report["method"] not in methods %}
|
||||
{% set methods = methods.append(report["method"]) %}
|
||||
{% if methods.append(report["method"]) %}{% endif %}
|
||||
{% endif %}
|
||||
{% if report["status"] not in codes %}
|
||||
{% set codes = codes.append(report["status"]) %}
|
||||
{% if codes.append(report["status"]) %}{% endif %}
|
||||
{% endif %}
|
||||
{% if report["reason"] not in reasons %}
|
||||
{% set reasons = reasons.append(report["reason"]) %}
|
||||
{% if reasons.append(report["reason"]) %}{% endif %}
|
||||
{% endif %}
|
||||
{% if report["country"] not in countries %}
|
||||
{% set countries = countries.append(report["country"]) %}
|
||||
{% if countries.append(report["country"]) %}{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<div class="{% if reports|length == 0 %}w-full overflow-hidden grid grid-cols-12 max-h-100 sm:max-h-125 col-span-12 p-4 relative break-words {% else %}hidden{% endif %} ">
|
||||
|
|
|
|||
2
src/ui/templates/settings_plugins.html
vendored
2
src/ui/templates/settings_plugins.html
vendored
|
|
@ -226,7 +226,7 @@
|
|||
{% if current_endpoint
|
||||
== "global-config" and value['context'] == "global" and value['multiple'] and not value['multiple'] in multList or current_endpoint ==
|
||||
"services" and value['context'] == "multisite" and value['multiple'] and not value['multiple'] in multList %}
|
||||
{% set multList = multList.append(value['multiple']) %}
|
||||
{% if multList.append(value['multiple']) %}{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for multiple in multList %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue