Refactor detail.html to optimize custom_column rendering

The div with class "real_custom_columns" is now only rendered if the custom_column data exists, removing blank space in details view.
This commit is contained in:
Whatever Cloud 2024-01-01 20:38:05 +01:00
parent 4401cf66d1
commit 7a8d8375d0

View File

@ -205,8 +205,8 @@
{% for c in cc %} {% for c in cc %}
<div class="real_custom_columns">
{% if entry['custom_column_' ~ c.id]|length > 0 %} {% if entry['custom_column_' ~ c.id]|length > 0 %}
<div class="real_custom_columns">
{{ c.name }}: {{ c.name }}:
{% for column in entry['custom_column_' ~ c.id] %} {% for column in entry['custom_column_' ~ c.id] %}
{% if c.datatype == 'rating' %} {% if c.datatype == 'rating' %}
@ -235,8 +235,9 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %}
</div> </div>
{% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if not current_user.is_anonymous %} {% if not current_user.is_anonymous %}