From 26d46853c403eb0774c94086332c50d4160d1565 Mon Sep 17 00:00:00 2001 From: Kumi Date: Sun, 23 Jun 2024 17:00:04 +0200 Subject: [PATCH] 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. --- .../templates/resolver/prefix_list.html | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/freedoi/resolver/templates/resolver/prefix_list.html b/freedoi/resolver/templates/resolver/prefix_list.html index 5bac9a4..11b0127 100644 --- a/freedoi/resolver/templates/resolver/prefix_list.html +++ b/freedoi/resolver/templates/resolver/prefix_list.html @@ -8,18 +8,16 @@ {% if object_list|length == 0 %}
  • No prefixes. - {% if not user.is_superuser %}You can request prefixes by contacting the administrator. - {% endif %} - {% endif %} -
  • + {% if not user.is_superuser %}You can request prefixes by contacting the administrator.{% endif %} + + {% endif %} + {% for prefix in object_list %} +
  • + {{ prefix.prefix }} ‐ {{ prefix.name }} +
  • + {% endfor %} + + {% if user.is_superuser %} + Create new prefix {% endif %} - {% for prefix in object_list %} -
  • - {{ prefix.prefix }} ‐ {{ prefix.name }} -
  • - {% endfor %} - -{% if user.is_superuser %} - Create new prefix -{% endif %} {% endblock content %}