fix(template): correct HTML structure in prefix_list
Adjusted the HTML structure in prefix_list template to fix the conditional rendering of the 'No prefixes' message. This change ensures that closing list tag renders correctly and prevents layout issues. The 'Create new prefix' button for superusers was also repositioned for better code readability. Fixes layout glitch when no prefixes are present.
This commit is contained in:
parent
8abb12bb06
commit
26d46853c4
1 changed files with 11 additions and 13 deletions
|
@ -8,18 +8,16 @@
|
|||
{% if object_list|length == 0 %}
|
||||
<li class="list-group-item">
|
||||
No prefixes.
|
||||
{% if not user.is_superuser %}You can request prefixes by contacting the administrator.
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% if not user.is_superuser %}You can request prefixes by contacting the administrator.{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% for prefix in object_list %}
|
||||
<li class="list-group-item">
|
||||
<a href="{% url 'prefix_detail' prefix.pk %}">{{ prefix.prefix }} ‐ {{ prefix.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if user.is_superuser %}
|
||||
<a class="btn btn-primary mt-3" href="{% url 'prefix_create' %}">Create new prefix</a>
|
||||
{% endif %}
|
||||
{% for prefix in object_list %}
|
||||
<li class="list-group-item">
|
||||
<a href="{% url 'prefix_detail' prefix.pk %}">{{ prefix.prefix }} ‐ {{ prefix.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if user.is_superuser %}
|
||||
<a class="btn btn-primary mt-3" href="{% url 'prefix_create' %}">Create new prefix</a>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
|
|
Loading…
Reference in a new issue