From 7a8d8375d0fd4b486b6978d453479f3ad615f676 Mon Sep 17 00:00:00 2001 From: Whatever Cloud Date: Mon, 1 Jan 2024 20:38:05 +0100 Subject: [PATCH] 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. --- cps/templates/detail.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cps/templates/detail.html b/cps/templates/detail.html index 30430663..f28839f6 100755 --- a/cps/templates/detail.html +++ b/cps/templates/detail.html @@ -205,8 +205,8 @@ {% for c in cc %} -
- {% if entry['custom_column_' ~ c.id]|length > 0 %} + {% if entry['custom_column_' ~ c.id]|length > 0 %} +
{{ c.name }}: {% for column in entry['custom_column_' ~ c.id] %} {% if c.datatype == 'rating' %} @@ -235,8 +235,9 @@ {% endif %} {% endif %} {% endfor %} - {% endif %} -
+ +
+ {% endif %} {% endfor %} {% endif %} {% if not current_user.is_anonymous %}